goaccess-1.9.3/0000755000175000017300000000000014626467007007066 5goaccess-1.9.3/configure.ac0000644000175000017300000001777414626464565011322 # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([goaccess],[1.9.3],[hello@goaccess.io],[],[https://goaccess.io]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR([src/goaccess.c]) AC_CONFIG_HEADERS([src/config.h]) # Use empty CFLAGS by default so autoconf does not add # CFLAGS="-O2 -g" # NOTE: Needs to go after AC_INIT and before AC_PROG_CC to select an # empty default instead. : ${CFLAGS=""} # Prefer host default compiler AC_PROG_CC([cc gcc clang]) AM_PROG_CC_C_O # Check for programs AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.19]) # Fix `undefined reference to `libintl_gettext'` on docker: AC_CHECK_LIB([intl], [libintl_dgettext]) # Fix undefined reference to dgettext on NetBSD AC_CHECK_LIB([intl], [dgettext]) # pthread AC_CHECK_LIB([pthread], [pthread_create], [], [AC_MSG_ERROR([pthread is missing])]) CFLAGS="$CFLAGS -pthread" # DEBUG AC_ARG_ENABLE([debug],[AS_HELP_STRING([--enable-debug],[Create a debug build. Default is disabled])],[debug="$enableval"],[debug=no]) if test "$debug" = "yes"; then AC_DEFINE([_DEBUG], 1, [Debug option]) fi AM_CONDITIONAL([DEBUG], [test "x$debug" = "xyes"]) # Handle rdynamic only on systems using GNU ld AC_CANONICAL_HOST AC_MSG_CHECKING([whether to build with rdynamic for GNU ld]) with_rdyanimc=yes case "$host_os" in *darwin*|*cygwin*|*aix*|*mingw*) with_rdyanimc=no ;; esac AC_MSG_RESULT([$with_rdyanimc]) AM_CONDITIONAL([WITH_RDYNAMIC], [test "x$with_rdyanimc" = "xyes"]) # Add ASAN AC_CANONICAL_HOST AC_ARG_ENABLE([asan], [AS_HELP_STRING([--enable-asan], [Enable address sanitizer])], [with_asan=$enableval], [with_asan=no]) AC_MSG_CHECKING([whether to build with address sanitizer]) case "$host_os" in *cygwin*|*aix*|*mingw*) with_asan=no ;; esac AC_MSG_RESULT([$with_asan]) AM_CONDITIONAL([WITH_ASAN], [test "x$with_asan" = "xyes"]) # Check for libc implementation on NetBSD AC_CHECK_HEADERS([sha.h sha1.h]) AC_CHECK_FUNCS([SHA1Init]) AM_CONDITIONAL([USE_SHA1], [test "x$ac_cv_func_SHA1Init" != "xyes"]) # Build with OpenSSL AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl],[Build with OpenSSL support. Default is disabled])],[openssl="$withval"],[openssl="no"]) if test "$openssl" = 'yes'; then AC_CHECK_LIB([ssl], [SSL_CTX_new],,[AC_MSG_ERROR([ssl library missing])]) AC_CHECK_LIB([crypto], [CRYPTO_free],,[AC_MSG_ERROR([crypto library missing])]) AC_CHECK_LIB([ssl], [SSL_CIPHER_standard_name], [AC_DEFINE([HAVE_CIPHER_STD_NAME], 1, [HAVE_CIPHER_STD_NAME])]) fi # GeoIP AC_ARG_ENABLE([geoip],[AS_HELP_STRING([--enable-geoip],[Enable GeoIP country lookup. Supported types: mmdb, legacy. Default is disabled])],[geoip="$enableval"],[geoip=no]) geolocation="N/A" if test "$geoip" = "mmdb"; then AC_CHECK_LIB([maxminddb], [MMDB_open], [], [AC_MSG_ERROR([ *** Missing development files for libmaxminddb library. ])]) geolocation="GeoIP2" AC_DEFINE([HAVE_GEOLOCATION], 1, [Build using GeoIP.]) elif test "$geoip" = "legacy"; then AC_CHECK_LIB([GeoIP], [GeoIP_new], [], [AC_MSG_ERROR([ *** Missing development files for the GeoIP library ])]) geolocation="GeoIP Legacy" AC_DEFINE([HAVE_GEOLOCATION], 1, [Build using GeoIP.]) elif test "$geoip" != "no"; then AC_MSG_ERROR([*** Invalid argument for GeoIP: $geoip]) fi AM_CONDITIONAL([GEOIP_LEGACY], [test "x$geoip" = "xlegacy"]) AM_CONDITIONAL([GEOIP_MMDB], [test "x$geoip" = "xmmdb"]) # GNU getline / POSIX.1-2008 AC_ARG_WITH([getline],[AS_HELP_STRING([--with-getline],[Build using dynamic line buffer. Default is disabled])],[with_getline=$withval],[with_getline=no]) if test "$with_getline" = "yes"; then AC_DEFINE([WITH_GETLINE], 1, [Build using GNU getline.]) fi # UTF8 AC_ARG_ENABLE([utf8],[AS_HELP_STRING([--enable-utf8],[Enable ncurses library that handles wide characters. Default is disabled])],[utf8="$enableval"],[utf8=no]) if test "$utf8" = "yes"; then libncursesw=ncursesw # Simply called libncurses on OS X case "$host_os" in *darwin*) libncursesw=ncurses ;; esac AC_CHECK_LIB([$libncursesw], [mvaddwstr], [], [AC_MSG_ERROR([*** Missing development libraries for ncursesw])]) AC_SEARCH_LIBS([tputs], [tinfow], ,[AC_MSG_ERROR([Cannot find a library providing tputs])]) AC_DEFINE([HAVE_LIBNCURSESW], [1], ["ncursesw is present."]) have_ncurses="yes" AC_CHECK_HEADERS([ncursesw/ncurses.h],[have_ncurses=yes], [], [ #ifdef HAVE_NCURSESW_NCURSES_H #include #endif ]) AC_CHECK_HEADERS([ncurses.h],[have_ncurses=yes], [], [ #ifdef HAVE_NCURSES_H #include #endif ]) if test "$have_ncurses" != "yes"; then AC_MSG_ERROR([Missing ncursesw header file]) fi else AC_CHECK_LIB([ncurses], [refresh], [], [AC_CHECK_LIB([curses], [refresh], [], [AC_MSG_ERROR([*** Missing development libraries for ncurses])])]) AC_SEARCH_LIBS([tputs], [tinfo], ,[AC_MSG_ERROR([Cannot find a library providing tputs])]) have_ncurses="yes" AC_CHECK_HEADERS([ncurses/ncurses.h],[have_ncurses=yes], [], [ #ifdef HAVE_NCURSES_NCURSES_H #include #endif ]) AC_CHECK_HEADERS([ncurses.h],[have_ncurses=yes], [], [ #ifdef HAVE_NCURSES_H #include #endif ]) AC_CHECK_HEADERS([curses.h],[have_ncurses=yes], [], [ #ifdef HAVE_CURSES_H #include #endif ]) if test "$have_ncurses" != "yes"; then AC_MSG_ERROR([Missing ncurses header file]) fi fi # Default Hash storage="In-Memory with On-Disk Persistent Storage" HAS_SEDTR=no AC_CHECK_PROG([SED_CHECK],[sed],[yes],[no]) if test x"$SED_CHECK" = x"yes" ; then AC_CHECK_PROG([TR_CHECK],[tr],[yes],[no]) if test x"$TR_CHECK" = x"yes" ; then HAS_SEDTR=yes fi fi AM_CONDITIONAL([HAS_SEDTR], [test "x$HAS_SEDTR" = xyes]) # detect Cygwin or MinGW and use mmap family replacements USE_MMAP=no case $host in *-*-mingw32* | *-*-cygwin* | *-*-windows*) USE_MMAP=yes AC_MSG_NOTICE([using custom mmap for Cygwin/MinGW]) ;; esac AM_CONDITIONAL([USE_MMAP], [test "x$USE_MMAP" = xyes]) # Solaris AC_CHECK_LIB([nsl], [gethostbyname]) AC_CHECK_LIB([socket], [socket]) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h]) AC_CHECK_HEADERS([fcntl.h]) AC_CHECK_HEADERS([inttypes.h]) AC_CHECK_HEADERS([limits.h]) AC_CHECK_HEADERS([locale.h]) AC_CHECK_HEADERS([netdb.h]) AC_CHECK_HEADERS([netinet/in.h]) AC_CHECK_HEADERS([stddef.h]) AC_CHECK_HEADERS([stdint.h]) AC_CHECK_HEADERS([stdlib.h]) AC_CHECK_HEADERS([string.h]) AC_CHECK_HEADERS([strings.h]) AC_CHECK_HEADERS([sys/socket.h]) AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_HEADERS([unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_CHECK_TYPES([ptrdiff_t]) AC_STRUCT_TM AC_TYPE_INT64_T AC_TYPE_INT8_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T # Checks for library functions. AC_FUNC_FSEEKO AC_FUNC_MEMCMP AC_FUNC_MKTIME AC_FUNC_STAT AC_FUNC_STRFTIME AC_FUNC_STRTOD AC_CHECK_FUNCS([floor]) AC_CHECK_FUNCS([gethostbyaddr]) AC_CHECK_FUNCS([gethostbyname]) AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNCS([malloc]) AC_CHECK_FUNCS([memmove]) AC_CHECK_FUNCS([memset]) AC_CHECK_FUNCS([mkfifo]) AC_CHECK_FUNCS([poll]) AC_CHECK_FUNCS([realloc]) AC_CHECK_FUNCS([realpath]) AC_CHECK_FUNCS([regcomp]) AC_CHECK_FUNCS([setlocale]) AC_CHECK_FUNCS([socket]) AC_CHECK_FUNCS([strcasecmp]) AC_CHECK_FUNCS([strchr]) AC_CHECK_FUNCS([strcspn]) AC_CHECK_FUNCS([strdup]) AC_CHECK_FUNCS([strerror]) AC_CHECK_FUNCS([strncasecmp]) AC_CHECK_FUNCS([strpbrk]) AC_CHECK_FUNCS([strrchr]) AC_CHECK_FUNCS([strspn]) AC_CHECK_FUNCS([strstr]) AC_CHECK_FUNCS([strtol]) AC_CHECK_FUNCS([strtoull]) AC_CHECK_FUNCS([timegm]) AC_CONFIG_FILES([Makefile po/Makefile.in]) AC_OUTPUT cat << EOF Your build configuration: Prefix : $prefix Package : $PACKAGE_NAME Version : $VERSION Compiler flags : $CFLAGS Linker flags : $LIBS $LDFLAGS UTF-8 support : $utf8 Dynamic buffer : $with_getline ASan : $with_asan Geolocation : $geolocation Storage method : $storage TLS/SSL : $openssl Bugs : $PACKAGE_BUGREPORT EOF goaccess-1.9.3/goaccess.10000644000175000017300000012470114626464710010662 .TH goaccess 1 "MAY 2024" GNU+Linux "User Manuals" .SH NAME goaccess \- fast web log analyzer and interactive viewer. .SH SYNOPSIS .LP .B goaccess [filename] [options...] [-c][-M][-H][-q][-d][...] .SH DESCRIPTION .B goaccess GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a .I terminal in *nix systems or through your .I browser. .P It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly. .P GoAccess parses the specified web log file and outputs the data to the X terminal. Features include: .IP "General Statistics:" This panel gives a summary of several metrics, such as the number of valid and invalid requests, time taken to analyze the dataset, unique visitors, requested files, static files (CSS, ICO, JPG, etc) HTTP referrers, 404s, size of the parsed log file and bandwidth consumption. .IP "Unique visitors" This panel shows metrics such as hits, unique visitors and cumulative bandwidth per date. HTTP requests containing the same IP, the same date, and the same user agent are considered a unique visitor. By default, it includes web crawlers/spiders. .IP Optionally, date specificity can be set to the hour level using .I --date-spec=hr which will display dates such as 05/Jun/2016:16, or to the minute level producing 05/Jun/2016:16:59. This is great if you want to track your daily traffic at the hour or minute level. .IP "Requested files" This panel displays the most requested (non-static) files on your web server. It shows hits, unique visitors, and percentage, along with the cumulative bandwidth, protocol, and the request method used. .IP "Requested static files" Lists the most frequently static files such as: JPG, CSS, SWF, JS, GIF, and PNG file types, along with the same metrics as the last panel. Additional static files can be added to the configuration file. .IP "404 or Not Found" Displays the same metrics as the previous request panels, however, its data contains all pages that were not found on the server, or commonly known as 404 status code. .IP "Hosts" This panel has detailed information on the hosts themselves. This is great for spotting aggressive crawlers and identifying who's eating your bandwidth. Expanding the panel can display more information such as host's reverse DNS lookup result, country of origin and city. If the .I -a argument is enabled, a list of user agents can be displayed by selecting the desired IP address, and then pressing ENTER. .IP "Operating Systems" This panel will report which operating system the host used when it hit the server. It attempts to provide the most specific version of each operating system. .IP "Browsers" This panel will report which browser the host used when it hit the server. It attempts to provide the most specific version of each browser. .IP "Visit Times" This panel will display an hourly report. This option displays 24 data points, one for each hour of the day. .IP Optionally, hour specificity can be set to the tenth of an hour level using .I --hour-spec=min which will display hours as 16:4 This is great if you want to spot peaks of traffic on your server. .IP "Virtual Hosts" This panel will display all the different virtual hosts parsed from the access log. This panel is displayed if .I %v is used within the log-format string. .IP "Referrers URLs" If the host in question accessed the site via another resource, or was linked/diverted to you from another host, the URL they were referred from will be provided in this panel. See `--ignore-panel` in your configuration file to enable it. .I disabled by default. .IP "Referring Sites" This panel will display only the host part but not the whole URL. The URL where the request came from. .IP "Keyphrases" It reports keyphrases used on Google search, Google cache, and Google translate that have lead to your web server. At present, it only supports Google search queries via HTTP. See `--ignore-panel` in your configuration file to enable it. .I disabled by default. .IP "Geo Location" Determines where an IP address is geographically located. Statistics are broken down by continent and country. It needs to be compiled with GeoLocation support. .IP "HTTP Status Codes" The values of the numeric status code to HTTP requests. .IP "ASN" This panel displays ASN (Autonomous System Numbers) data for GeoIP2 and legacy databases. Great for detecting malicious traffic and blocking accordingly. .IP "Remote User (HTTP authentication)" This is the userid of the person requesting the document as determined by HTTP authentication. If the document is not password protected, this part will be "-" just like the previous one. This panel is not enabled unless .I %e is given within the log-format variable. .IP "Cache Status" If you are using caching on your server, you may be at the point where you want to know if your request is being cached and served from the cache. This panel shows the cache status of the object the server served. This panel is not enabled unless .I %C is given within the log-format variable. The status can be either `MISS`, `BYPASS`, `EXPIRED`, `STALE`, `UPDATING`, `REVALIDATED` or `HIT` .IP "MIME Types" This panel specifies Media Types (formerly known as MIME types) and Media Subtypes which will be assigned and listed underneath. This panel is not enabled unless .I %M is given within the log-format variable. See https://www.iana.org/assignments/media-types/media-types.xhtml for more details. .IP "Encryption Settings" This panel shows the SSL/TLS protocol used along the Cipher Suites. This panel is not enabled unless .I %K is given within the log-format variable. .P .I NOTE: Optionally and if configured, all panels can display the average time taken to serve the request. .SH STORAGE .P There are three storage options that can be used with GoAccess. Choosing one will depend on your environment and needs. .TP Default Hash Tables In-memory storage provides better performance at the cost of limiting the dataset size to the amount of available physical memory. GoAccess uses in-memory hash tables. It has very good memory usage and pretty good performance. This storage has support for on-disk persistence. .SH CONFIGURATION .P Multiple options can be used to configure GoAccess. For a complete up-to-date list of configure options, run .I ./configure --help .TP \fB\-\-enable-debug Compile with debugging symbols and turn off compiler optimizations. .TP \fB\-\-enable-utf8 Compile with wide character support. Ncursesw is required. .TP \fB\-\-enable-geoip= Compile with GeoLocation support. MaxMind's GeoIP is required. .I legacy will utilize the original GeoIP databases. .I mmdb will utilize the enhanced GeoIP2 databases. .TP \fB\-\-with-getline Dynamically expands line buffer in order to parse full line requests instead of using a fixed size buffer of 4096. .TP \fB\-\-with-openssl Compile GoAccess with OpenSSL support for its WebSocket server. .SH OPTIONS .P The following options can be supplied to the command or specified in the configuration file. If specified in the configuration file, long options need to be used without prepending -- and without using the equal sign =. .SS LOG/DATE/TIME FORMAT .TP \fB\-\-time-format= The time-format variable followed by a space, specifies the log format time containing either a name of a predefined format (see options below) or any combination of regular characters and special format specifiers. .IP They all begin with a percentage (%) sign. See `man strftime`. .I %T or %H:%M:%S. .IP Note that if a timestamp is given in microseconds, .I %f must be used as time-format. If the timestamp is given in milliseconds .I %* must be used as time-format. .TP \fB\-\-date-format= The date-format variable followed by a space, specifies the log format time containing either a name of a predefined format (see options below) or any combination of regular characters and special format specifiers. .IP They all begin with a percentage (%) sign. See `man strftime`. .I %Y-%m-%d. .IP Note that if a timestamp is given in microseconds, .I %f must be used as date-format. If the timestamp is given in milliseconds .I %* must be used as date-format. .TP \fB\-\-datetime-format= The date and time format combines the two variables into a single option. This gives the ability to get the timezone from a request and convert it to another timezone for output. See .I --tz= .IP They all begin with a percentage (%) sign. See `man strftime`. e.g., .I %d/%b/%Y:%H:%M:%S %z. .IP Note that if --datetime-format is used, .I %x must be passed in the log-format variable to represent the date and time field. .TP \fB\-\-log-format= The log-format variable followed by a space or .I \\\\t for tab-delimited, specifies the log format string. Note that if there are spaces within the format, the string needs to be enclosed in single/double quotes. Inner quotes need to be escaped. .IP In addition to specifying the raw log/date/time formats, for simplicity, any of the following predefined log format names can be supplied to the log/date/time-format variables. GoAccess can also handle one predefined name in one variable and another predefined name in another variable. .IP COMBINED - Combined Log Format, VCOMBINED - Combined Log Format with Virtual Host, COMMON - Common Log Format, VCOMMON - Common Log Format with Virtual Host, W3C - W3C Extended Log File Format, SQUID - Native Squid Log Format, CLOUDFRONT - Amazon CloudFront Web Distribution, CLOUDSTORAGE - Google Cloud Storage, AWSELB - Amazon Elastic Load Balancing, AWSS3 - Amazon Simple Storage Service (S3) AWSALB - Amazon Application Load Balancer CADDY - Caddy's JSON Structured format (local/info format) TRAEFIKCLF - Traefik's CLF flavor .IP .I Note: Generally, you need quotes around values that include white spaces, commas, pipes, quotes, and/or brackets. Inner quotes must be escaped. .IP .I Note: Piping data into GoAccess won't prompt a log/date/time configuration dialog, you will need to previously define it in your configuration file or in the command line. .IP .I Note: The default GoAccess format for CADDY is the 'local/info' format. Nevertheless, if needed, you have the option to utilize a custom GoAccess log format to match your particular configuration. .SS USER INTERFACE OPTIONS .TP \fB\-c \-\-config-dialog Prompt log/time/date configuration window on program start. Only when curses is initialized. .TP \fB\-i \-\-hl-header Color highlight active terminal panel. .TP \fB\-m \-\-with-mouse Enable mouse support on main terminal dashboard. .TP \fB\-\-\-color= Specify custom colors for the terminal output. .I Color Syntax DEFINITION space/tab colorFG#:colorBG# [attributes,PANEL] FG# = foreground color [-1...255] (-1 = default term color) BG# = background color [-1...255] (-1 = default term color) Optionally, it is possible to apply color attributes (multiple attributes are comma separated), such as: .I bold, .I underline, .I normal, .I reverse, .I blink If desired, it is possible to apply custom colors per panel, that is, a metric in the REQUESTS panel can be of color A, while the same metric in the BROWSERS panel can be of color B. .I Available color definitions: COLOR_MTRC_HITS COLOR_MTRC_VISITORS COLOR_MTRC_DATA COLOR_MTRC_BW COLOR_MTRC_AVGTS COLOR_MTRC_CUMTS COLOR_MTRC_MAXTS COLOR_MTRC_PROT COLOR_MTRC_MTHD COLOR_MTRC_HITS_PERC COLOR_MTRC_HITS_PERC_MAX COLOR_MTRC_VISITORS_PERC COLOR_MTRC_VISITORS_PERC_MAX COLOR_PANEL_COLS COLOR_BARS COLOR_ERROR COLOR_SELECTED COLOR_PANEL_ACTIVE COLOR_PANEL_HEADER COLOR_PANEL_DESC COLOR_OVERALL_LBLS COLOR_OVERALL_VALS COLOR_OVERALL_PATH COLOR_ACTIVE_LABEL COLOR_BG COLOR_DEFAULT COLOR_PROGRESS See configuration file for a sample color scheme. .TP \fB\-\-color-scheme=<1|2|3> Choose among color schemes. .I 1 for the default grey scheme. .I 2 for the green scheme. .I 3 for the Monokai scheme (shown only if terminal supports 256 colors). .TP \fB\-\-crawlers-only Parse and display only crawlers (bots). .TP \fB\-\-html-custom-css= Specifies a custom CSS file path to load in the HTML report. .TP \fB\-\-html-custom-js= Specifies a custom JS file path to load in the HTML report. .TP \fB\-\-html-report-title= Set HTML report page title and header. .TP \fB\-\-html-refresh=<secs> Refresh the HTML report every X seconds. The value has to be between 1 and 60 seconds. The default is set to refresh the HTML report every 1 second. .TP \fB\-\-html-prefs=<JSON> Set HTML report default preferences. Supply a valid JSON object containing the HTML preferences. It allows the ability to customize each panel plot. See example below. .IP .I Note: The JSON object passed needs to be a one line JSON string. For instance, .IP .nf \-\-html-prefs='{"theme":"bright","perPage":5,"layout":"horizontal","showTables":true,"visitors":{"plot":{"chartType":"bar"}}}' .fi .TP \fB\-\-json-pretty-print Format JSON output using tabs and newlines. .IP .I Note: This is not recommended when outputting a real-time HTML report since the WebSocket payload will much much larger. .TP \fB\-\-max-items=<number> The maximum number of items to display per panel. The maximum can be a number between 1 and n. .IP .I Note: Only the CSV and JSON output allow a maximum number greater than the default value of 366 (or 50 in the real-time HTML output) items per panel. .TP \fB\-\-no-color Turn off colored output. This is the default output on terminals that do not support colors. .TP \fB\-\-no-column-names Don't write column names in the terminal output. By default, it displays column names for each available metric in every panel. .TP \fB\-\-no-csv-summary Disable summary metrics on the CSV output. .TP \fB\-\-no-progress Disable progress metrics [total requests/requests per second]. .TP \fB\-\-no-tab-scroll Disable scrolling through panels when TAB is pressed or when a panel is selected using a numeric key. .TP \fB\-\-no-html-last-updated Do not show the last updated field displayed in the HTML generated report. .TP \fB\-\-no-parsing-spinner Do now show the progress metrics and parsing spinner. .TP \fB\-\-tz=<timezone> Outputs the report date/time data in the given timezone. Note that it uses the canonical timezone name. e.g., .I Europe/Berlin or .I America/Chicago or .I Africa/Cairo If an invalid timezone name is given, the output will be in GMT. See .I --datetime-format in order to properly specify a timezone in the date/time format. .SS SERVER OPTIONS .P .I Note This is just a WebSocket server to provide the raw real-time data. It is not a WebServer itself. To access your reports html file, you will still need your own HTTP server, place the generated report in it's document root dir and open the html file in your browser. The browser will then open another WebSocket-connection to the ws-server you may setup here, to keep the dashboard up-to-date. .TP \fB\-\-addr Specify IP address to bind the server to. Otherwise it binds to 0.0.0.0. .IP Usually there is no need to specify the address, unless you intentionally would like to bind the server to a different address within your server. .TP \fB\-\-daemonize Run GoAccess as daemon (only if \fB\-\-real-time-html enabled). .IP Note: It's important to make use of absolute paths across GoAccess' configuration. .TP \fB\-\-user-name=<username> Run GoAccess as the specified user. .IP Note: It's important to ensure the user or the users' group can access the input and output files as well as any other files needed. Other groups the user belongs to will be ignored. As such it's advised to run GoAccess behind a SSL proxy as it's unlikely this user can access the SSL certificates. .TP \fB\-\-origin=<url> Ensure clients send the specified origin header upon the WebSocket handshake. .TP \fB\-\-pid-file=<path/goaccess.pid> Write the daemon PID to a file when used along the --daemonize option. .TP \fB\-\-port=<port> Specify the port to use. By default GoAccess' WebSocket server listens on port 7890. .TP \fB\-\-real-time-html Enable real-time HTML output. .IP GoAccess uses its own WebSocket server to push the data from the server to the client. See http://gwsocket.io for more details how the WebSocket server works. .TP \fB\-\-ws-url=<[scheme://]url[:port]> URL to which the WebSocket server responds. This is the URL supplied to the WebSocket constructor on the client side. .IP Optionally, it is possible to specify the WebSocket URI scheme, such as .I ws:// or .I wss:// for unencrypted and encrypted connections. e.g., .I wss://goaccess.io .IP If GoAccess is running behind a proxy, you could set the client side to connect to a different port by specifying the host followed by a colon and the port. e.g., .I goaccess.io:9999 .IP By default, it will attempt to connect to the generated report's hostname. If GoAccess is running on a remote server, the host of the remote server should be specified here. Also, make sure it is a valid host and NOT an http address. .TP \fB\-\-ping-interval=<secs> Enable WebSocket ping with specified interval in seconds. This helps prevent idle connections getting disconnected. .TP \fB\-\-fifo-in=<path/file> Creates a named pipe (FIFO) that reads from on the given path/file. .TP \fB\-\-fifo-out=<path/file> Creates a named pipe (FIFO) that writes to the given path/file. .TP \fB\-\-ssl-cert=<cert.crt> Path to TLS/SSL certificate. In order to enable TLS/SSL support, GoAccess requires that \-\-ssl-cert and \-\-ssl-key are used. Only if configured using --with-openssl .TP \fB\-\-ssl-key=<priv.key> Path to TLS/SSL private key. In order to enable TLS/SSL support, GoAccess requires that \-\-ssl-cert and \-\-ssl-key are used. Only if configured using --with-openssl .SS FILE OPTIONS .TP \fB\- The log file to parse is read from stdin. .TP \fB\-f \-\-log-file=<logfile> Specify the path to the input log file. If set in the config file, it will take priority over -f from the command line. .TP \fB\-S \-\-log-size=<bytes> Specify the log size in bytes. This is useful when piping in logs for processing in which the log size can be explicitly set. .TP \fB\-l \-\-debug-file=<debugfile> Send all debug messages to the specified file. .TP \fB\-p \-\-config-file=<configfile> Specify a custom configuration file to use. If set, it will take priority over the global configuration file (if any). .TP \fB\-\-external-assets Output HTML assets to external JS/CSS files. Great if you are setting up Content Security Policy (CSP). This will create two separate files, .I goaccess.js and .I goaccess.css , in the same directory as your report.html file. .TP \fB\-\-invalid-requests=<filename> Log invalid requests to the specified file. .TP \fB\-\-unknowns-log=<filename> Log unknown browsers and OSs to the specified file. .TP \fB\-\-no-global-config Do not load the global configuration file. This directory should normally be /usr/local/etc, unless specified with .I --sysconfdir=/dir. See --dcf option for finding the default configuration file. .SS PARSE OPTIONS .TP \fB\-a \-\-agent-list Enable a list of user-agents by host. For faster parsing, do not enable this flag. .TP \fB\-d \-\-with-output-resolver Enable IP resolver on HTML|JSON output. .TP \fB\-e \-\-exclude-ip=<IP|IP-range> Exclude an IPv4 or IPv6 from being counted. Applicable solely during access log data processing, it does not exclude persisted data. Ranges can be included as well using a dash in between the IPs (start-end). .IP .I Examples: exclude-ip 127.0.0.1 exclude-ip 192.168.0.1-192.168.0.100 exclude-ip ::1 exclude-ip 0:0:0:0:0:ffff:808:804-0:0:0:0:0:ffff:808:808 .TP \fB\-j \-\-jobs=<1-6> This specifies the number of parallel processing threads to be used during the execution of the program. It determines the degree of concurrency when analyzing log data, allowing for parallel processing of multiple tasks simultaneously. It defaults to 1 thread. It's common to set the number of jobs based on the available hardware resources, such as the number of CPU cores. .TP \fB\-H \-\-http-protocol=<yes|no> Set/unset HTTP request protocol. This will create a request key containing the request protocol + the actual request. .TP \fB\-M \-\-http-method=<yes|no> Set/unset HTTP request method. This will create a request key containing the request method + the actual request. .TP \fB\-o \-\-output=<path/file.[json|csv|html]> Write output to stdout given one of the following files and the corresponding extension for the output format: .IP /path/file.csv - Comma-separated values (CSV) /path/file.json - JSON (JavaScript Object Notation) /path/file.html - HTML .TP \fB\-q \-\-no-query-string Ignore request's query string. i.e., www.google.com/page.htm?query => www.google.com/page.htm. .IP .I Note: Removing the query string can greatly decrease memory consumption, especially on timestamped requests. .TP \fB\-r \-\-no-term-resolver Disable IP resolver on terminal output. .TP \fB\-\-444-as-404 Treat non-standard status code 444 as 404. .TP \fB\-\-4xx-to-unique-count Add 4xx client errors to the unique visitors count. .TP \fB\-\-anonymize-ip Anonymize the client IP address. The IP anonymization option sets the last octet of IPv4 user IP addresses and the last 80 bits of IPv6 addresses to zeros. e.g., 192.168.20.100 => 192.168.20.0 e.g., 2a03:2880:2110:df07:face:b00c::1 => 2a03:2880:2110:df07:: .IP .I Note: This deactivates -a. .TP \fB\-\-chunk-size=<256-32768> This determines the number of lines that form a chunk. This parameter influences the size of the data processed concurrently by each thread, allowing for parallelization of the file reading and processing tasks. The value of chunk-size affects the efficiency of the parallel processing and can be adjusted based on factors such as system resources and the characteristics of the input data. .IP Low Values: If chunk-size is set too low, it might result in inefficient processing. For instance, if each chunk contains a very small number of lines, the overhead of managing and coordinating parallel processing might outweigh the benefits. .IP Large Values: Conversely, if chunk-size is set too high, it could lead to resource exhaustion. Each chunk represents a portion of data that a thread processes in parallel. Setting chunk-size to an excessively large value might cause memory issues, particularly if there are many parallel threads running simultaneously. .TP \fB\-\-anonymize-level Specifies the anonymization levels: 1 => default, 2 => strong, 3 => pedantic. .TS allbox; lb lb lb lb l l l l. Bits-hidden Level 1 Level 2 Level 3 T{ .BR IPv4 T} 8 16 24 T{ .BR IPv6 T} 64 80 96 .TE .TP \fB\-\-all-static-files Include static files that contain a query string. e.g., /fonts/fontawesome-webfont.woff?v=4.0.3 .TP \fB\-\-browsers-file=<path> By default GoAccess parses an "essential/basic" curated list of browsers & crawlers. If you need to add additional browsers, use this option. Include an additional delimited list of browsers/crawlers/feeds etc. See config/browsers.list for an example or https://raw.githubusercontent.com/allinurl/goaccess/master/config/browsers.list .TP \fB\-\-date-spec=<date|hr|min> Set the date specificity to either date (default), hr to display hours or min to display minutes appended to the date. .IP This is used in the visitors panel. It's useful for tracking visitors at the hour level. For instance, an hour specificity would yield to display traffic as 18/Dec/2010:19 or minute specificity 18/Dec/2010:19:59. .TP \fB\-\-double-decode Decode double-encoded values. This includes, user-agent, request, and referrer. .TP \fB\-\-enable-panel=<PANEL> Enable parsing and displaying the given panel. .IP .I Available panels: VISITORS REQUESTS REQUESTS_STATIC NOT_FOUND HOSTS OS BROWSERS VISIT_TIMES VIRTUAL_HOSTS REFERRERS REFERRING_SITES KEYPHRASES STATUS_CODES REMOTE_USER CACHE_STATUS GEO_LOCATION MIME_TYPE TLS_TYPE .TP \fB\-\-fname-as-vhost=<regex> Use log filename(s) as virtual host(s). POSIX regex is passed to extract the virtual host from the filename. e.g., .I --fname-as-vhost='[a-z]*\.[a-z]*' can be used to extract awesome.com.log => awesome.com. .TP \fB\-\-hide-referrer=<NEEDLE> Hide a referrer but still count it. Wild cards are allowed in the needle. i.e., *.bing.com. .TP \fB\-\-hour-spec=<hr|min> Set the time specificity to either hour (default) or min to display the tenth of an hour appended to the hour. .IP This is used in the time distribution panel. It's useful for tracking peaks of traffic on your server at specific times. .TP \fB\-\-ignore-crawlers Ignore crawlers from being counted. .TP \fB\-\-unknowns-as-crawlers Classify unknown OS and browsers as crawlers. .TP \fB\-\-ignore-panel=<PANEL> Ignore parsing and displaying the given panel. .IP .I Available panels: VISITORS REQUESTS REQUESTS_STATIC NOT_FOUND HOSTS OS BROWSERS VISIT_TIMES VIRTUAL_HOSTS REFERRERS REFERRING_SITES KEYPHRASES STATUS_CODES REMOTE_USER CACHE_STATUS GEO_LOCATION MIME_TYPE TLS_TYPE .TP \fB\-\-ignore-referrer=<referrer> Ignore referrers from being counted. Wildcards allowed. e.g., .I *.domain.com .I ww?.domain.* .TP \fB\-\-ignore-statics=<req|panel> Ignore static file requests. .I req Only ignore request from valid requests .I panels Ignore request from panels. Note that it will count them towards the total number of requests .TP \fB\-\-ignore-status=<CODE> Ignore parsing and displaying one or multiple status code(s). For multiple status codes, use this option multiple times. .TP \fB\-\-keep-last=<num_days> Keep the last specified number of days in storage. This will recycle the storage tables. e.g., keep & show only the last 7 days. .TP \fB\-\-no-ip-validation Disable client IP validation. Useful if IP addresses have been obfuscated before being logged. The log still needs to contain a placeholder for .I %h usually it's a resolved IP. e.g. .I ord37s19-in-f14.1e100.net. .TP \fB\-\-no-strict-status Disable HTTP status code validation. Some servers would record this value only if a connection was established to the target and the target sent a response. Otherwise, it could be recorded as -. .TP \fB\-\-num-tests=<number> Number of lines from the access log to test against the provided log/date/time format. By default, the parser is set to test 10 lines. If set to 0, the parser won't test any lines and will parse the whole access log. If a line matches the given log/date/time format before it reaches .I <number>, the parser will consider the log to be valid, otherwise GoAccess will return EXIT_FAILURE and display the relevant error messages. .TP \fB\-\-process-and-exit Parse log and exit without outputting data. Useful if we are looking to only add new data to the on-disk database without outputting to a file or a terminal. .TP \fB\-\-real-os Display real OS names. e.g, Windows XP, Snow Leopard. .TP \fB\-\-sort-panel=<PANEL,FIELD,ORDER> Sort panel on initial load. Sort options are separated by comma. Options are in the form: PANEL,METRIC,ORDER .IP .I Available metrics: BY_HITS - Sort by hits BY_VISITORS - Sort by unique visitors BY_DATA - Sort by data BY_BW - Sort by bandwidth BY_AVGTS - Sort by average time served BY_CUMTS - Sort by cumulative time served BY_MAXTS - Sort by maximum time served BY_PROT - Sort by http protocol BY_MTHD - Sort by http method .IP .I Available orders: ASC DESC .TP \fB\-\-static-file=<extension> Add static file extension. e.g.: .I .mp3 Extensions are case sensitive. .SS GEOLOCATION OPTIONS .TP \fB\-g \-\-std-geoip Standard GeoIP database for less memory usage. .TP \fB\-\-geoip-database=<geofile> Specify path to GeoIP database file. i.e., GeoLiteCity.dat. If using GeoIP2, you will need to download the GeoLite2 City or Country database from MaxMind.com and use the option --geoip-database to specify the database. You can also get updated database files for GeoIP legacy, you can find these as GeoLite Legacy Databases from MaxMind.com. IPv4 and IPv6 files are supported as well. For updated DB URLs, please see the default GoAccess configuration file. .I Note: --geoip-city-data is an alias of --geoip-database. .SS OTHER OPTIONS .TP \fB\-h \-\-help The help. .TP \fB\-s \-\-storage Display current storage method. i.e., B+ Tree, Hash. .TP \fB\-V \-\-version Display version information and exit. .TP \fB\-\-dcf Display the path of the default config file when `-p` is not used. .SS PERSISTENCE STORAGE OPTIONS .TP \fB\-\-persist Persist parsed data into disk. If database files exist, files will be overwritten. This should be set to the first dataset. See examples below. .TP \fB\-\-restore Load previously stored data from disk. If reading persisted data only, the database files need to exist. See .I --persist and examples below. .TP \fB\-\-db-path=<dir> Path where the on-disk database files are stored. The default value is the .I /tmp directory. .SH CUSTOM LOG/DATE FORMAT GoAccess can parse virtually any web log format. .P Predefined options include, Common Log Format (CLF), Combined Log Format (XLF/ELF), including virtual host, Amazon CloudFront (Download Distribution), Google Cloud Storage and W3C format (IIS). .P GoAccess allows any custom format string as well. .P There are two ways to configure the log format. The easiest is to run GoAccess with .I -c to prompt a configuration window. Otherwise, it can be configured under ~/.goaccessrc or the %sysconfdir%. .IP "time-format" The .I time-format variable followed by a space, specifies the log format time containing any combination of regular characters and special format specifiers. They all begin with a percentage (%) sign. See `man strftime`. .I %T or %H:%M:%S. .IP .I Note: If a timestamp is given in microseconds, .I %f must be used as .I time-format or .I %* if the timestamp is given in milliseconds. .IP "date-format" The .I date-format variable followed by a space, specifies the log format date containing any combination of regular characters and special format specifiers. They all begin with a percentage (%) sign. See `man strftime`. e.g., .I %Y-%m-%d. .IP .I Note: If a timestamp is given in microseconds, .I %f must be used as .I date-format or .I %* if the timestamp is given in milliseconds. .IP "log-format" The .I log-format variable followed by a space or .I \\\\t , specifies the log format string. .IP %x A date and time field matching the .I time-format and .I date-format variables. This is used when given a timestamp or the date & time are concatenated as a single string (e.g., 1501647332 or 20170801235000) instead of the date and time being in two separated variables. .IP %t time field matching the .I time-format variable. .IP %d date field matching the .I date-format variable. .IP %v The canonical Server Name of the server serving the request (Virtual Host). .IP %e This is the userid of the person requesting the document as determined by HTTP authentication. .IP %C The cache status of the object the server served. .IP %h host (the client IP address, either IPv4 or IPv6) .IP %r The request line from the client. This requires specific delimiters around the request (as single quotes, double quotes, or anything else) to be parsable. If not, we have to use a combination of special format specifiers as %m %U %H. .IP %q The query string. .IP %m The request method. .IP %U The URL path requested. .I Note: If the query string is in %U, there is no need to use .I %q. However, if the URL path, does not include any query string, you may use .I %q and the query string will be appended to the request. .IP %H The request protocol. .IP %s The status code that the server sends back to the client. .IP %b The size of the object returned to the client. .IP %R The "Referrer" HTTP request header. .IP %u The user-agent HTTP request header. .IP %K The TLS encryption settings chosen for the connection. (In Apache LogFormat: %{SSL_PROTOCOL}x) .IP %k The TLS encryption settings chosen for the connection. (In Apache LogFormat: %{SSL_CIPHER}x) .IP %M The MIME-type of the requested resource. (In Apache LogFormat: %{Content-Type}o) .IP %D The time taken to serve the request, in microseconds as a decimal number. .IP %T The time taken to serve the request, in seconds with milliseconds resolution. .IP %L The time taken to serve the request, in milliseconds as a decimal number. .IP %n The time taken to serve the request, in nanoseconds. .IP %^ Ignore this field. .IP %~ Move forward through the log string until a non-space (!isspace) char is found. .IP ~h The host (the client IP address, either IPv4 or IPv6) in a X-Forwarded-For (XFF) field. It uses a special specifier which consists of a tilde before the host specifier, followed by the character(s) that delimit the XFF field, which are enclosed by curly braces. i.e., "~h{, } For example, "~h{, }" is used in order to parse "11.25.11.53, 17.68.33.17" field which is delimited by a comma and a space (enclosed by double quotes). .TS allbox; lb lb l l. XFF field specifier T{ .BR \[dq]192.1.2.3, \~192.68.33.17,\~192.1.1.2\[dq] T} \[dq]~h{, }\[dq] T{ .BR \[dq]192.1.2.12\[dq],\~\[dq]192.68.33.17\[dq] T} ~h{\[dq], } T{ .BR 192.1.2.12,\~192.68.33.17 T} ~h{, } T{ .BR 192.1.2.14\~192.68.33.17\~192.1.1.2 T} ~h{ } .TE .P .I Note: In order to get the average, cumulative and maximum time served in GoAccess, you will need to start logging response times in your web server. In Nginx you can add .I $request_time to your log format, or .I %D in Apache. .P .I Important: If multiple time served specifiers are used at the same time, the first option specified in the format string will take priority over the other specifiers. .P GoAccess .I requires the following fields: .IP .I %h a valid IPv4/6 .IP .I %d a valid date .IP .I %r the request .SH INTERACTIVE MENU .IP "F1 or h" Main help. .IP "F5" Redraw main window. .IP "q" Quit the program, current window or collapse active module .IP "o or ENTER" Expand selected module or open window .IP "0-9 and Shift + 0" Set selected module to active .IP "j" Scroll down within expanded module .IP "k" Scroll up within expanded module .IP "c" Set or change scheme color. .IP "TAB" Forward iteration of modules. Starts from current active module. .IP "SHIFT + TAB" Backward iteration of modules. Starts from current active module. .IP "^f" Scroll forward one screen within an active module. .IP "^b" Scroll backward one screen within an active module. .IP "s" Sort options for active module .IP "/" Search across all modules (regex allowed) .IP "n" Find the position of the next occurrence across all modules. .IP "g" Move to the first item or top of screen. .IP "G" Move to the last item or bottom of screen. .SH EXAMPLES .I Note: Piping data into GoAccess won't prompt a log/date/time configuration dialog, you will need to previously define it in your configuration file or in the command line. .SS DIFFERENT OUTPUTS .P To output to a terminal and generate an interactive report: .IP # goaccess access.log .P To generate an HTML report: .IP # goaccess access.log -a -o report.html .P To generate a JSON report: .IP # goaccess access.log -a -d -o report.json .P To generate a CSV file: .IP # goaccess access.log --no-csv-summary -o report.csv .P GoAccess also allows great flexibility for real-time filtering and parsing. For instance, to quickly diagnose issues by monitoring logs since goaccess was started: .IP # tail -f access.log | goaccess - .P And even better, to filter while maintaining opened a pipe to preserve real-time analysis, we can make use of .I tail -f and a matching pattern tool such as .I grep, awk, sed, etc: .IP # tail -f access.log | grep -i --line-buffered 'firefox' | goaccess --log-format=COMBINED - .P or to parse from the beginning of the file while maintaining the pipe opened and applying a filter .IP # tail -f -n +0 access.log | grep -i --line-buffered 'firefox' | goaccess --log-format=COMBINED -o report.html --real-time-html - .P or to convert the log date timezone to a different timezone, e.g., Europe/Berlin .IP # goaccess access.log --log-format='%h %^[%x] "%r" %s %b "%R" "%u"' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --tz=Europe/Berlin --date-spec=min .SS MULTIPLE LOG FILES .P There are several ways to parse multiple logs with GoAccess. The simplest is to pass multiple log files to the command line: .IP # goaccess access.log access.log.1 .P It's even possible to parse files from a pipe while reading regular files: .IP # cat access.log.2 | goaccess access.log access.log.1 - .P .I Note that the single dash is appended to the command line to let GoAccess know that it should read from the pipe. .P Now if we want to add more flexibility to GoAccess, we can do a series of pipes. For instance, if we would like to process all compressed log files .I access.log.*.gz in addition to the current log file, we can do: .IP # zcat access.log.*.gz | goaccess access.log - .P .I Note: On Mac OS X, use gunzip -c instead of zcat. .SS REAL TIME HTML OUTPUT .P GoAccess has the ability to output real-time data in the HTML report. You can even email the HTML file since it is composed of a single file with no external file dependencies, how neat is that! .P The process of generating a real-time HTML report is very similar to the process of creating a static report. Only --real-time-html is needed to make it real-time. .IP # goaccess access.log -o /usr/share/nginx/html/site/report.html --real-time-html .P By default, GoAccess will use the host name of the generated report. Optionally, you can specify the URL to which the client's browser will connect to. See https://goaccess.io/faq for a more detailed example. .IP # goaccess access.log -o report.html --real-time-html --ws-url=goaccess.io .P By default, GoAccess listens on port 7890, to use a different port other than 7890, you can specify it as (make sure the port is opened): .IP # goaccess access.log -o report.html --real-time-html --port=9870 .P And to bind the WebSocket server to a different address other than 0.0.0.0, you can specify it as: .IP # goaccess access.log -o report.html --real-time-html --addr=127.0.0.1 .P .I Note: To output real time data over a TLS/SSL connection, you need to use .I --ssl-cert=<cert.crt> and .I --ssl-key=<priv.key>. .SS WORKING WITH DATES .P Another useful pipe would be filtering dates out of the web log .P The following will get all HTTP requests starting on 05/Dec/2010 until the end of the file. .IP # sed -n '/05\/Dec\/2010/,$ p' access.log | goaccess -a - .P or using relative dates such as yesterdays or tomorrows day: .IP # sed -n '/'$(date '+%d\/%b\/%Y' -d '1 week ago')'/,$ p' access.log | goaccess -a - .P If we want to parse only a certain time-frame from DATE a to DATE b, we can do: .IP # sed -n '/5\/Nov\/2010/,/5\/Dec\/2010/ p' access.log | goaccess -a - .P If we want to preserve only certain amount of data and recycle storage, we can keep only a certain number of days. For instance to keep & show the last 5 days: .IP # goaccess access.log --keep-last=5 .SS VIRTUAL HOSTS .P Assuming your log contains the virtual host (server blocks) field. For instance: .IP vhost.com:80 10.131.40.139 - - [02/Mar/2016:08:14:04 -0600] "GET /shop/bag-p-20 HTTP/1.1" 200 6715 "-" "Apache (internal dummy connection)" .P And you would like to append the virtual host to the request in order to see which virtual host the top urls belong to .IP awk '$8=$1$8' access.log | goaccess -a - .P To exclude a list of virtual hosts you can do the following: .IP # grep -v "`cat exclude_vhost_list_file`" vhost_access.log | goaccess - .SS FILES & STATUS CODES .P To parse specific pages, e.g., page views, html, htm, php, etc. within a request: .IP # awk '$7~/\.html|\.htm|\.php/' access.log | goaccess - .P Note, .I $7 is the request field for the common and combined log format, (without Virtual Host), if your log includes Virtual Host, then you probably want to use .I $8 instead. It's best to check which field you are shooting for, e.g.: .IP # tail -10 access.log | awk '{print $8}' .P Or to parse a specific status code, e.g., 500 (Internal Server Error): .IP # awk '$9~/500/' access.log | goaccess - .SS SERVER .P Also, it is worth pointing out that if we want to run GoAccess at lower priority, we can run it as: .IP # nice -n 19 goaccess -f access.log -a .P and if you don't want to install it on your server, you can still run it from your local machine: .IP # ssh -n root@server 'tail -f /var/log/apache2/access.log' | goaccess - .P Note: SSH requires .I -n so GoAccess can read from stdin. Also, make sure to use SSH keys for authentication as it won't work if a passphrase is required. .SS INCREMENTAL LOG PROCESSING .P GoAccess has the ability to process logs incrementally through its internal storage and dump its data to disk. It works in the following way: .nr step 1 1 .IP \n[step] 3 A dataset must be persisted first with .I --persist, then the same dataset can be loaded with .IP \n+[step] .I --restore. If new data is passed (piped or through a log file), it will append it to the original dataset. .P NOTES GoAccess keeps track of inodes of all the files processed (assuming files will stay on the same partition), in addition, it extracts a snippet of data from the log along with the last line parsed of each file and the timestamp of the last line parsed. e.g., inode:29627417|line:20012|ts:20171231235059 First it compares if the snippet matches the log being parsed, if it does, it assumes the log hasn't changed dramatically, e.g., hasn't been truncated. If the inode does not match the current file, it parses all lines. If the current file matches the inode, it then reads the remaining lines and updates the count of lines parsed and the timestamp. As an extra precaution, it won't parse log lines with a timestamp ≤ than the one stored. Piped data works based off the timestamp of the last line read. For instance, it will parse and discard all incoming entries until it finds a timestamp >= than the one stored. .P For instance: .IP // last month access log .br # goaccess access.log.1 --persist .P then, load it with .IP // append this month access log, and preserve new data .br # goaccess access.log --restore --persist .P To read persisted data only (without parsing new data) .IP # goaccess --restore .P .SH NOTES Each active panel has a total of 366 items or 50 in the real-time HTML report. The number of items is customizable using .I max-items Note that HTML, CSV and JSON output allow a maximum number greater than the default value of 366 items per panel. .P A hit is a request (line in the access log), e.g., 10 requests = 10 hits. HTTP requests with the same IP, date, and user agent are considered a unique visit. .P If you want to enable dual-stack support, please use .I --addr=:: instead of the default .I --addr=0.0.0.0. .P The generated report will attempt to reconnect to the WebSocket server after 1 second with exponential backoff. It will attempt to connect 20 times. .SH BUGS If you think you have found a bug, please send me an email to .I goaccess@prosoftcorp.com or use the issue tracker in https://github.com/allinurl/goaccess/issues .SH AUTHOR Gerardo Orellana <hello@goaccess.io> For more details about it, or new releases, please visit https://goaccess.io ���������������������������������������������������������������goaccess-1.9.3/src/���������������������������������������������������������������������������������0000755�0001750�0001730�00000000000�14626467007�007655� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/config.h.in����������������������������������������������������������������������0000644�0001750�0001730�00000021750�14626466520�011624� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* src/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if you have the 'alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have the <arpa/inet.h> header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* HAVE_CIPHER_STD_NAME */ #undef HAVE_CIPHER_STD_NAME /* Define to 1 if you have the <curses.h> header file. */ #undef HAVE_CURSES_H /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the 'floor' function. */ #undef HAVE_FLOOR /* Define to 1 if fseeko (and ftello) are declared in stdio.h. */ #undef HAVE_FSEEKO /* Build using GeoIP. */ #undef HAVE_GEOLOCATION /* Define to 1 if you have the 'gethostbyaddr' function. */ #undef HAVE_GETHOSTBYADDR /* Define to 1 if you have the 'gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the 'gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the 'crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO /* Define to 1 if you have the 'curses' library (-lcurses). */ #undef HAVE_LIBCURSES /* Define to 1 if you have the 'GeoIP' library (-lGeoIP). */ #undef HAVE_LIBGEOIP /* Define to 1 if you have the 'intl' library (-lintl). */ #undef HAVE_LIBINTL /* Define to 1 if you have the 'maxminddb' library (-lmaxminddb). */ #undef HAVE_LIBMAXMINDDB /* Define to 1 if you have the 'ncurses' library (-lncurses). */ #undef HAVE_LIBNCURSES /* "ncursesw is present." */ #undef HAVE_LIBNCURSESW /* Define to 1 if you have the 'nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the 'pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the 'socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the 'ssl' library (-lssl). */ #undef HAVE_LIBSSL /* Define to 1 if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the <locale.h> header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the 'malloc' function. */ #undef HAVE_MALLOC /* Define to 1 if you have the 'memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the 'memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the 'mkfifo' function. */ #undef HAVE_MKFIFO /* Define to 1 if you have the <ncursesw/ncurses.h> header file. */ #undef HAVE_NCURSESW_NCURSES_H /* Define to 1 if you have the <ncurses.h> header file. */ #undef HAVE_NCURSES_H /* Define to 1 if you have the <ncurses/ncurses.h> header file. */ #undef HAVE_NCURSES_NCURSES_H /* Define to 1 if you have the <netdb.h> header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the <netinet/in.h> header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the 'poll' function. */ #undef HAVE_POLL /* Define to 1 if the system has the type 'ptrdiff_t'. */ #undef HAVE_PTRDIFF_T /* Define to 1 if you have the 'realloc' function. */ #undef HAVE_REALLOC /* Define to 1 if you have the 'realpath' function. */ #undef HAVE_REALPATH /* Define to 1 if you have the 'regcomp' function. */ #undef HAVE_REGCOMP /* Define to 1 if you have the 'setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the 'SHA1Init' function. */ #undef HAVE_SHA1INIT /* Define to 1 if you have the <sha1.h> header file. */ #undef HAVE_SHA1_H /* Define to 1 if you have the <sha.h> header file. */ #undef HAVE_SHA_H /* Define to 1 if you have the 'socket' function. */ #undef HAVE_SOCKET /* Define to 1 if 'stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the <stddef.h> header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdio.h> header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the 'strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the 'strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the 'strcspn' function. */ #undef HAVE_STRCSPN /* Define to 1 if you have the 'strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the 'strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the 'strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the 'strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the 'strpbrk' function. */ #undef HAVE_STRPBRK /* Define to 1 if you have the 'strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the 'strspn' function. */ #undef HAVE_STRSPN /* Define to 1 if you have the 'strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the 'strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the 'strtoull' function. */ #undef HAVE_STRTOULL /* Define to 1 if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the 'timegm' function. */ #undef HAVE_TIMEGM /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define to 1 if your <sys/time.h> declares 'struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Build using GNU getline. */ #undef WITH_GETLINE /* Debug option */ #undef _DEBUG /* Define to 1 if necessary to make fseeko visible. */ #undef _LARGEFILE_SOURCE /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT64_T /* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT8_T /* Define to empty if 'const' does not conform to ANSI C. */ #undef const /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to the type of a signed integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef int8_t /* Define to 'long int' if <sys/types.h> does not define. */ #undef off_t /* Define as 'unsigned int' if <stddef.h> doesn't define. */ #undef size_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef uint64_t /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t ������������������������goaccess-1.9.3/src/tpl.h����������������������������������������������������������������������������0000644�0001750�0001730�00000011210�14624731651�010535� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (c) 2005-2013, Troy D. Hanson http://troydhanson.github.com/tpl/ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TPL_H #define TPL_H #include <stddef.h> /* size_t */ #include <stdarg.h> /* va_list */ #ifdef __INTEL_COMPILER #include <tbb/tbbmalloc_proxy.h> #endif /* Intel Compiler efficient memcpy etc */ #ifdef _MSC_VER typedef unsigned int uint32_t; #else #include <inttypes.h> /* uint32_t */ #endif #if defined __cplusplus extern "C" { #endif #ifdef _WIN32 #ifdef TPL_EXPORTS #define TPL_API __declspec(dllexport) #else /* */ #ifdef TPL_NOLIB #define TPL_API #else #define TPL_API __declspec(dllimport) #endif /* TPL_NOLIB */ #endif /* TPL_EXPORTS */ #else #define TPL_API #endif /* bit flags (external) */ #define TPL_FILE (1 << 0) #define TPL_MEM (1 << 1) #define TPL_PREALLOCD (1 << 2) #define TPL_EXCESS_OK (1 << 3) #define TPL_FD (1 << 4) #define TPL_UFREE (1 << 5) #define TPL_DATAPEEK (1 << 6) #define TPL_FXLENS (1 << 7) #define TPL_GETSIZE (1 << 8) /* do not add flags here without renumbering the internal flags! */ /* flags for tpl_gather mode */ #define TPL_GATHER_BLOCKING 1 #define TPL_GATHER_NONBLOCKING 2 #define TPL_GATHER_MEM 3 /* Hooks for error logging, memory allocation functions and fatal */ typedef int (tpl_print_fcn) (const char *fmt, ...); typedef void *(tpl_malloc_fcn) (size_t sz); typedef void *(tpl_realloc_fcn) (void *ptr, size_t sz); typedef void (tpl_free_fcn) (void *ptr); typedef void (tpl_fatal_fcn) (const char *fmt, ...); typedef struct tpl_hook_t { tpl_print_fcn *oops __attribute__((__format__ (printf, 1, 2))); tpl_malloc_fcn *malloc; tpl_realloc_fcn *realloc; tpl_free_fcn *free; tpl_fatal_fcn *fatal __attribute__((__format__ (printf, 1, 2))) __attribute__((__noreturn__)); size_t gather_max; } tpl_hook_t; typedef struct tpl_node { int type; void *addr; void *data; /* r:tpl_root_data*. A:tpl_atyp*. ow:szof type */ int num; /* length of type if it's a C array */ size_t ser_osz; /* serialization output size for subtree */ struct tpl_node *children; /* my children; linked-list */ struct tpl_node *next, *prev; /* my siblings (next child of my parent) */ struct tpl_node *parent; /* my parent */ } tpl_node; /* used when un/packing 'B' type (binary buffers) */ typedef struct tpl_bin { void *addr; uint32_t sz; } tpl_bin; /* for async/piecemeal reading of tpl images */ typedef struct tpl_gather_t { char *img; int len; } tpl_gather_t; /* Callback used when tpl_gather has read a full tpl image */ typedef int (tpl_gather_cb) (void *img, size_t sz, void *data); /* Prototypes */ TPL_API tpl_node *tpl_map (char *fmt, ...); /* define tpl using format */ TPL_API void tpl_free (tpl_node * r); /* free a tpl map */ TPL_API int tpl_pack (tpl_node * r, int i); /* pack the n'th packable */ TPL_API int tpl_unpack (tpl_node * r, int i); /* unpack the n'th packable */ TPL_API int tpl_dump (tpl_node * r, int mode, ...); /* serialize to mem/file */ TPL_API int tpl_load (tpl_node * r, int mode, ...); /* set mem/file to unpack */ TPL_API int tpl_Alen (tpl_node * r, int i); /* array len of packable i */ TPL_API char *tpl_peek (int mode, ...); /* sneak peek at format string */ TPL_API int tpl_gather (int mode, ...); /* non-blocking image gather */ TPL_API int tpl_jot (int mode, ...); /* quick write a simple tpl */ TPL_API tpl_node *tpl_map_va (char *fmt, va_list ap); #if defined __cplusplus } #endif #endif /* TPL_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/sort.c���������������������������������������������������������������������������0000644�0001750�0001730�00000041614�14624731651�010733� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * sort.c -- functions related to sort functionality * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include "settings.h" #include "util.h" #include "sort.h" /* *INDENT-OFF* */ const int sort_choices[][SORT_MAX_OPTS] = { /* VISITORS */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* REQUESTS */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, SORT_BY_PROT, SORT_BY_MTHD, -1}, /* REQUESTS_STATIC */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, SORT_BY_PROT, SORT_BY_MTHD, -1}, /* NOT_FOUND */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, SORT_BY_PROT, SORT_BY_MTHD, -1}, /* HOSTS */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* OS */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* BROWSERS */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* VISIT_TIMES */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* VIRTUAL_HOSTS */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* REFERRERS */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* REFERRING_SITES */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* KEYPHRASES */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* STATUS_CODES */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* REMOTE_USER */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* CACHE_STATUS */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, #ifdef HAVE_GEOLOCATION /* GEO_LOCATION */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* ASN */ {SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, #endif /* MIME_TYPE */ {SORT_BY_HITS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, -1}, /* TLS_TYPE */ {SORT_BY_HITS, SORT_BY_DATA, SORT_BY_VISITORS, SORT_BY_BW, -1}, }; static const GEnum FIELD[] = { {"BY_HITS" , SORT_BY_HITS } , {"BY_VISITORS" , SORT_BY_VISITORS } , {"BY_DATA" , SORT_BY_DATA } , {"BY_BW" , SORT_BY_BW } , {"BY_AVGTS" , SORT_BY_AVGTS } , {"BY_CUMTS" , SORT_BY_CUMTS } , {"BY_MAXTS" , SORT_BY_MAXTS } , {"BY_PROT" , SORT_BY_PROT } , {"BY_MTHD" , SORT_BY_MTHD } , }; static const GEnum ORDER[] = { {"ASC" , SORT_ASC } , {"DESC" , SORT_DESC } , }; GSort module_sort[TOTAL_MODULES] = { {VISITORS , SORT_BY_DATA , SORT_DESC } , {REQUESTS , SORT_BY_HITS , SORT_DESC } , {REQUESTS_STATIC , SORT_BY_HITS , SORT_DESC } , {NOT_FOUND , SORT_BY_HITS , SORT_DESC } , {HOSTS , SORT_BY_HITS , SORT_DESC } , {OS , SORT_BY_HITS , SORT_DESC } , {BROWSERS , SORT_BY_HITS , SORT_DESC } , {VISIT_TIMES , SORT_BY_DATA , SORT_ASC } , {VIRTUAL_HOSTS , SORT_BY_HITS , SORT_DESC } , {REFERRERS , SORT_BY_HITS , SORT_DESC } , {REFERRING_SITES , SORT_BY_HITS , SORT_DESC } , {KEYPHRASES , SORT_BY_HITS , SORT_DESC } , {STATUS_CODES , SORT_BY_HITS , SORT_DESC } , {REMOTE_USER , SORT_BY_HITS , SORT_DESC } , {CACHE_STATUS , SORT_BY_HITS , SORT_DESC } , #ifdef HAVE_GEOLOCATION {GEO_LOCATION , SORT_BY_HITS , SORT_DESC } , {ASN , SORT_BY_HITS , SORT_DESC } , #endif {MIME_TYPE , SORT_BY_HITS , SORT_DESC } , {TLS_TYPE , SORT_BY_VISITORS , SORT_DESC } , }; /* *INDENT-ON* */ /* Sort an array of strings ascending */ int strcmp_asc (const void *a, const void *b) { return strcmp (*((char *const *) a), *((char *const *) b)); } /* Sort 'data' metric ascending */ static int cmp_data_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; return strcmp (ia->metrics->data, ib->metrics->data); } /* Sort 'data' metric descending */ static int cmp_data_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; return strcmp (ib->metrics->data, ia->metrics->data); } /* Sort 'hits' metric descending */ static int cmp_num_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->hits; uint64_t vb = ib->metrics->hits; return (va < vb) - (va > vb); } /* Sort 'hits' metric ascending */ static int cmp_num_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->hits; uint64_t vb = ib->metrics->hits; return (va > vb) - (va < vb); } /* Sort 'visitors' metric descending */ static int cmp_vis_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->visitors; uint64_t vb = ib->metrics->visitors; return (va < vb) - (va > vb); } /* Sort 'visitors' metric ascending */ static int cmp_vis_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->visitors; uint64_t vb = ib->metrics->visitors; return (va > vb) - (va < vb); } /* Sort GRawDataItem value descending */ static int cmp_raw_num_desc (const void *a, const void *b) { const GRawDataItem *ia = a; const GRawDataItem *ib = b; uint64_t va = ia->hits; uint64_t vb = ib->hits; return (va < vb) - (va > vb); } /* Sort GRawDataItem value descending */ static int cmp_raw_str_desc (const void *a, const void *b) { const GRawDataItem *ia = a; const GRawDataItem *ib = b; return strcmp (ib->data, ia->data); } /* Sort 'bandwidth' metric descending */ static int cmp_bw_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->bw.nbw; uint64_t vb = ib->metrics->bw.nbw; return (va < vb) - (va > vb); } /* Sort 'bandwidth' metric ascending */ static int cmp_bw_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->bw.nbw; uint64_t vb = ib->metrics->bw.nbw; return (va > vb) - (va < vb); } /* Sort 'avgts' metric descending */ static int cmp_avgts_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->avgts.nts; uint64_t vb = ib->metrics->avgts.nts; return (va < vb) - (va > vb); } /* Sort 'avgts' metric ascending */ static int cmp_avgts_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->avgts.nts; uint64_t vb = ib->metrics->avgts.nts; return (va > vb) - (va < vb); } /* Sort 'cumts' metric descending */ static int cmp_cumts_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->cumts.nts; uint64_t vb = ib->metrics->cumts.nts; return (va < vb) - (va > vb); } /* Sort 'cumts' metric ascending */ static int cmp_cumts_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->cumts.nts; uint64_t vb = ib->metrics->cumts.nts; return (va > vb) - (va < vb); } /* Sort 'maxts' metric descending */ static int cmp_maxts_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->maxts.nts; uint64_t vb = ib->metrics->maxts.nts; return (va < vb) - (va > vb); } /* Sort 'maxts' metric ascending */ static int cmp_maxts_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; uint64_t va = ia->metrics->maxts.nts; uint64_t vb = ib->metrics->maxts.nts; return (va > vb) - (va < vb); } /* Sort 'protocol' metric ascending */ static int cmp_proto_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; return strcmp (ia->metrics->protocol, ib->metrics->protocol); } /* Sort 'protocol' metric descending */ static int cmp_proto_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; return strcmp (ib->metrics->protocol, ia->metrics->protocol); } /* Sort 'method' metric ascending */ static int cmp_mthd_asc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; return strcmp (ia->metrics->method, ib->metrics->method); } /* Sort 'method' metric descending */ static int cmp_mthd_desc (const void *a, const void *b) { const GHolderItem *ia = a; const GHolderItem *ib = b; return strcmp (ib->metrics->method, ia->metrics->method); } /* Sort ascending */ #if defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 4) __attribute__((no_sanitize ("implicit-conversion", "unsigned-integer-overflow"))) #endif int cmp_ui32_asc (const void *a, const void *b) { const uint32_t *ia = (const uint32_t *) a; // casting pointer types const uint32_t *ib = (const uint32_t *) b; return *ia - *ib; } int cmp_ui32_desc (const void *a, const void *b) { const uint32_t *ia = (const uint32_t *) a; // casting pointer types const uint32_t *ib = (const uint32_t *) b; return *ib - *ia; } /* Given a string sort field, get the enum field value. * * On error, -1 is returned. * On success, the enumerated field value is returned. */ int get_sort_field_enum (const char *str) { return str2enum (FIELD, ARRAY_SIZE (FIELD), str); } /* Given a string sort order, get the enum order value. * * On error, -1 is returned. * On success, the enumerated order value is returned. */ int get_sort_order_enum (const char *str) { return str2enum (ORDER, ARRAY_SIZE (ORDER), str); } /* Given a GSortOrder enum value, return the corresponding string. * * The string corresponding to the enumerated order value is returned. */ const char * get_sort_order_str (GSortOrder order) { return ORDER[order].str; } /* Given a GSortField enum value, return the corresponding string. * * The string corresponding to the enumerated field value is returned. */ const char * get_sort_field_str (GSortField field) { return FIELD[field].str; } /* Given a GSortField enum value, return the corresponding key. * * The key corresponding to the enumerated field value is returned. */ const char * get_sort_field_key (GSortField field) { static const char *const field2key[][2] = { {"BY_HITS", "hits"}, {"BY_VISITORS", "visitors"}, {"BY_DATA", "data"}, {"BY_BW", "bytes"}, {"BY_AVGTS", "avgts"}, {"BY_CUMTS", "cumts"}, {"BY_MAXTS", "maxts"}, {"BY_PROT", "protocol"}, {"BY_MTHD", "method"}, }; return field2key[field][1]; } /* Set the initial metric sort per module/panel. * * On error, function returns. * On success, panel metrics are sorted. */ void set_initial_sort (const char *smod, const char *sfield, const char *ssort) { int module, field, order; if ((module = get_module_enum (smod)) == -1) return; if ((field = get_sort_field_enum (sfield)) == -1) return; if ((order = get_sort_order_enum (ssort)) == -1) return; if (!can_sort_module (module, field)) return; module_sort[module].field = field; module_sort[module].sort = order; } /* Determine if module/panel metric can be sorted. * * On error or if metric can't be sorted, 0 is returned. * On success, 1 is returned. */ int can_sort_module (GModule module, int field) { int i, can_sort = 0; for (i = 0; -1 != sort_choices[module][i]; i++) { if (sort_choices[module][i] != field) continue; if (SORT_BY_AVGTS == field && !conf.serve_usecs) continue; if (SORT_BY_CUMTS == field && !conf.serve_usecs) continue; if (SORT_BY_MAXTS == field && !conf.serve_usecs) continue; else if (SORT_BY_BW == field && !conf.bandwidth) continue; else if (SORT_BY_PROT == field && !conf.append_protocol) continue; else if (SORT_BY_MTHD == field && !conf.append_method) continue; can_sort = 1; break; } return can_sort; } /* Parse all initial sort options from the config file. * * On error, function returns. * On success, panel metrics are sorted. */ void parse_initial_sort (void) { int i; char module[SORT_MODULE_LEN], field[SORT_FIELD_LEN], order[SORT_ORDER_LEN]; for (i = 0; i < conf.sort_panel_idx; ++i) { if (sscanf (conf.sort_panels[i], "%15[^','],%11[^','],%4s", module, field, order) != 3) continue; set_initial_sort (module, field, order); } } /* Apply user defined sort */ void sort_holder_items (GHolderItem *items, int size, GSort sort) { switch (sort.field) { case SORT_BY_HITS: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_num_desc); else qsort (items, size, sizeof (GHolderItem), cmp_num_asc); break; case SORT_BY_VISITORS: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_vis_desc); else qsort (items, size, sizeof (GHolderItem), cmp_vis_asc); break; case SORT_BY_DATA: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_data_desc); else qsort (items, size, sizeof (GHolderItem), cmp_data_asc); break; case SORT_BY_BW: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_bw_desc); else qsort (items, size, sizeof (GHolderItem), cmp_bw_asc); break; case SORT_BY_AVGTS: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_avgts_desc); else qsort (items, size, sizeof (GHolderItem), cmp_avgts_asc); break; case SORT_BY_CUMTS: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_cumts_desc); else qsort (items, size, sizeof (GHolderItem), cmp_cumts_asc); break; case SORT_BY_MAXTS: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_maxts_desc); else qsort (items, size, sizeof (GHolderItem), cmp_maxts_asc); break; case SORT_BY_PROT: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_proto_desc); else qsort (items, size, sizeof (GHolderItem), cmp_proto_asc); break; case SORT_BY_MTHD: if (sort.sort == SORT_DESC) qsort (items, size, sizeof (GHolderItem), cmp_mthd_desc); else qsort (items, size, sizeof (GHolderItem), cmp_mthd_asc); break; } } /* Sort raw numeric data in a descending order for the first run * (default sort) * * On success, raw data sorted in a descending order. */ GRawData * sort_raw_num_data (GRawData *raw_data, int ht_size) { qsort (raw_data->items, ht_size, sizeof *(raw_data->items), cmp_raw_num_desc); return raw_data; } /* Sort raw string data in a descending order for the first run. * * On success, raw data sorted in a descending order. */ GRawData * sort_raw_str_data (GRawData *raw_data, int ht_size) { qsort (raw_data->items, ht_size, sizeof *(raw_data->items), cmp_raw_str_desc); return raw_data; } ��������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/opesys.h�������������������������������������������������������������������������0000644�0001750�0001730�00000003206�14624731651�011266� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef OPESYS_H_INCLUDED #define OPESYS_H_INCLUDED #define OPESYS_TYPE_LEN 10 /* Each OS contains the number of hits and the OS's type */ typedef struct GOpeSys_ { char os_type[OPESYS_TYPE_LEN]; int hits; } GOpeSys; char *verify_os (char *str, char *os_type); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gstorage.c�����������������������������������������������������������������������0000644�0001750�0001730�00000121655�14624731651�011563� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * gstorage.c -- common storage handling * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if !defined __SUNPRO_C #include <stdint.h> #endif #include <stdlib.h> #include <string.h> #include "gstorage.h" #ifdef HAVE_GEOLOCATION #include "geoip1.h" #endif #include "browsers.h" #include "commons.h" #include "error.h" #include "gkhash.h" #include "opesys.h" #include "ui.h" #include "util.h" #include "xmalloc.h" /* private prototypes */ /* key/data generators for each module */ static int gen_visitor_key (GKeyData * kdata, GLogItem * logitem); static int gen_404_key (GKeyData * kdata, GLogItem * logitem); static int gen_browser_key (GKeyData * kdata, GLogItem * logitem); static int gen_host_key (GKeyData * kdata, GLogItem * logitem); static int gen_keyphrase_key (GKeyData * kdata, GLogItem * logitem); static int gen_os_key (GKeyData * kdata, GLogItem * logitem); static int gen_vhost_key (GKeyData * kdata, GLogItem * logitem); static int gen_remote_user_key (GKeyData * kdata, GLogItem * logitem); static int gen_cache_status_key (GKeyData * kdata, GLogItem * logitem); static int gen_referer_key (GKeyData * kdata, GLogItem * logitem); static int gen_ref_site_key (GKeyData * kdata, GLogItem * logitem); static int gen_request_key (GKeyData * kdata, GLogItem * logitem); static int gen_static_request_key (GKeyData * kdata, GLogItem * logitem); static int gen_status_code_key (GKeyData * kdata, GLogItem * logitem); static int gen_visit_time_key (GKeyData * kdata, GLogItem * logitem); #ifdef HAVE_GEOLOCATION static int gen_geolocation_key (GKeyData * kdata, GLogItem * logitem); static int gen_asn_key (GKeyData * kdata, GLogItem * logitem); #endif /* UMS */ static int gen_mime_type_key (GKeyData * kdata, GLogItem * logitem); static int gen_tls_type_key (GKeyData * kdata, GLogItem * logitem); /* insertion metric routines */ static void insert_data (GModule module, GKeyData * kdata); static void insert_rootmap (GModule module, GKeyData * kdata); static void insert_root (GModule module, GKeyData * kdata); static void insert_hit (GModule module, GKeyData * kdata); static void insert_visitor (GModule module, GKeyData * kdata); static void insert_bw (GModule module, GKeyData * kdata, uint64_t size); static void insert_cumts (GModule module, GKeyData * kdata, uint64_t ts); static void insert_maxts (GModule module, GKeyData * kdata, uint64_t ts); static void insert_method (GModule module, GKeyData * kdata, const char *data); static void insert_protocol (GModule module, GKeyData * kdata, const char *data); static void insert_agent (GModule module, GKeyData * kdata, uint32_t agent_nkey); /* *INDENT-OFF* */ const httpmethods http_methods[] = { { "OPTIONS" , 7 } , { "GET" , 3 } , { "HEAD" , 4 } , { "POST" , 4 } , { "PUT" , 3 } , { "DELETE" , 6 } , { "TRACE" , 5 } , { "CONNECT" , 7 } , { "PATCH" , 5 } , { "SEARCH" , 6 } , /* WebDav */ { "PROPFIND" , 8 } , { "PROPPATCH" , 9 } , { "MKCOL" , 5 } , { "COPY" , 4 } , { "MOVE" , 4 } , { "LOCK" , 4 } , { "UNLOCK" , 6 } , { "VERSION-CONTROL" , 15 } , { "REPORT" , 6 } , { "CHECKOUT" , 8 } , { "CHECKIN" , 7 } , { "UNCHECKOUT" , 10 } , { "MKWORKSPACE" , 11 } , { "UPDATE" , 6 } , { "LABEL" , 5 } , { "MERGE" , 5 } , { "BASELINE-CONTROL" , 16 } , { "MKACTIVITY" , 10 } , { "ORDERPATCH" , 10 } , }; const size_t http_methods_len = ARRAY_SIZE (http_methods); const httpprotocols http_protocols[] = { { "HTTP/1.0" , 8 } , { "HTTP/1.1" , 8 } , { "HTTP/2" , 6 } , { "HTTP/3" , 6 } , }; const size_t http_protocols_len = ARRAY_SIZE (http_protocols); static const GParse paneling[] = { { VISITORS, gen_visitor_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { REQUESTS, gen_request_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, insert_method, insert_protocol, NULL, }, { REQUESTS_STATIC, gen_static_request_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, insert_method, insert_protocol, NULL, }, { NOT_FOUND, gen_404_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, insert_method, insert_protocol, NULL, }, { HOSTS, gen_host_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, insert_agent, }, { OS, gen_os_key, insert_data, insert_rootmap, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, insert_method, insert_protocol, NULL, }, { BROWSERS, gen_browser_key, insert_data, insert_rootmap, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { REFERRERS, gen_referer_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { REFERRING_SITES, gen_ref_site_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { KEYPHRASES, gen_keyphrase_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, #ifdef HAVE_GEOLOCATION { GEO_LOCATION, gen_geolocation_key, insert_data, insert_rootmap, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { ASN, gen_asn_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, #endif { STATUS_CODES, gen_status_code_key, insert_data, insert_rootmap, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { VISIT_TIMES, gen_visit_time_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { VIRTUAL_HOSTS, gen_vhost_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { REMOTE_USER, gen_remote_user_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { CACHE_STATUS, gen_cache_status_key, insert_data, NULL, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, { MIME_TYPE, gen_mime_type_key, insert_data, insert_rootmap, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, /*method*/ NULL, /*protocol*/ NULL, /*agent*/ }, { TLS_TYPE, gen_tls_type_key, insert_data, insert_rootmap, insert_hit, insert_visitor, insert_bw, insert_cumts, insert_maxts, NULL, NULL, NULL, }, }; /* *INDENT-ON* */ /* Initialize a new GKeyData instance */ static void new_modulekey (GKeyData *kdata) { GKeyData key = { .data = NULL, .data_nkey = 0, .root = NULL, .dhash = 0, .rhash = 0, .root_nkey = 0, .uniq_key = NULL, .uniq_nkey = 0, }; *kdata = key; } /* Get a panel from the GParse structure given a module. * * On error, or if not found, NULL is returned. * On success, the panel value is returned. */ static const GParse * panel_lookup (GModule module) { int i, num_panels = ARRAY_SIZE (paneling); for (i = 0; i < num_panels; i++) { if (paneling[i].module == module) return &paneling[i]; } return NULL; } /* Allocate memory for a new GMetrics instance. * * On success, the newly allocated GMetrics is returned . */ GMetrics * new_gmetrics (void) { GMetrics *metrics = xcalloc (1, sizeof (GMetrics)); return metrics; } /* Free memory of a GMetrics object */ void free_gmetrics (GMetrics *metric) { if (metric == NULL) return; free (metric->data); free (metric->method); free (metric->protocol); free (metric); } /* Get the module string value given a metric enum value. * * On error, NULL is returned. * On success, the string module value is returned. */ const char * get_mtr_str (GSMetric metric) { /* String modules to enumerated modules */ static const GEnum enum_metrics[] = { {"MTRC_KEYMAP", MTRC_KEYMAP}, {"MTRC_ROOTMAP", MTRC_ROOTMAP}, {"MTRC_DATAMAP", MTRC_DATAMAP}, {"MTRC_UNIQMAP", MTRC_UNIQMAP}, {"MTRC_ROOT", MTRC_ROOT}, {"MTRC_HITS", MTRC_HITS}, {"MTRC_VISITORS", MTRC_VISITORS}, {"MTRC_BW", MTRC_BW}, {"MTRC_CUMTS", MTRC_CUMTS}, {"MTRC_MAXTS", MTRC_MAXTS}, {"MTRC_METHODS", MTRC_METHODS}, {"MTRC_PROTOCOLS", MTRC_PROTOCOLS}, {"MTRC_AGENTS", MTRC_AGENTS}, {"MTRC_METADATA", MTRC_METADATA}, {"MTRC_UNIQUE_KEYS", MTRC_UNIQUE_KEYS}, {"MTRC_AGENT_KEYS", MTRC_AGENT_KEYS}, {"MTRC_AGENT_VALS", MTRC_AGENT_VALS}, {"MTRC_CNT_VALID", MTRC_CNT_VALID}, {"MTRC_CNT_BW", MTRC_CNT_BW}, }; return enum2str (enum_metrics, ARRAY_SIZE (enum_metrics), metric); } /* Allocate space off the heap to store a uint32_t. * * On success, the newly allocated pointer is returned . */ uint32_t * i322ptr (uint32_t val) { uint32_t *ptr = xmalloc (sizeof (uint32_t)); *ptr = val; return ptr; } /* Allocate space off the heap to store a uint64_t. * * On success, the newly allocated pointer is returned . */ uint64_t * uint642ptr (uint64_t val) { uint64_t *ptr = xmalloc (sizeof (uint64_t)); *ptr = val; return ptr; } /* Set the module totals to calculate percentages. */ void set_module_totals (GPercTotals *totals) { totals->bw = ht_sum_bw (); totals->hits = ht_sum_valid (); totals->visitors = ht_get_size_uniqmap (VISITORS); } /* Set numeric metrics for each request given raw data. * * On success, numeric metrics are set into the given structure. */ void set_data_metrics (GMetrics *ometrics, GMetrics **nmetrics, GPercTotals totals) { GMetrics *metrics; /* determine percentages for certain fields */ float hits_perc = get_percentage (totals.hits, ometrics->hits); float visitors_perc = get_percentage (totals.visitors, ometrics->visitors); float bw_perc = get_percentage (totals.bw, ometrics->bw.nbw); metrics = new_gmetrics (); /* basic fields */ metrics->id = ometrics->id; metrics->hits = ometrics->hits; metrics->visitors = ometrics->visitors; /* percentage fields */ metrics->hits_perc = hits_perc < 0 ? 0 : hits_perc; metrics->bw_perc = bw_perc < 0 ? 0 : bw_perc; metrics->visitors_perc = visitors_perc < 0 ? 0 : visitors_perc; /* bandwidth field */ metrics->bw.nbw = ometrics->bw.nbw; /* time served fields */ if (conf.serve_usecs && ometrics->hits > 0) { metrics->avgts.nts = ometrics->avgts.nts; metrics->cumts.nts = ometrics->cumts.nts; metrics->maxts.nts = ometrics->maxts.nts; } /* method field */ if (conf.append_method && ometrics->method) metrics->method = ometrics->method; /* protocol field */ if (conf.append_protocol && ometrics->protocol) metrics->protocol = ometrics->protocol; /* data field */ metrics->data = ometrics->data; *nmetrics = metrics; } /* Increment the overall bandwidth. */ static void count_bw (int numdate, uint64_t resp_size) { ht_inc_cnt_bw (numdate, resp_size); } /* Keep track of all invalid log strings. */ static void count_invalid (GLog *glog, GLogItem *logitem, const char *line) { glog->invalid++; ht_inc_cnt_overall ("failed_requests", 1); if (conf.invalid_requests_log) { LOG_INVALID (("%s", line)); } if (logitem->errstr && glog->log_erridx < MAX_LOG_ERRORS) { glog->errors[glog->log_erridx++] = xstrdup (logitem->errstr); } } /* Count down the number of invalids hits. * Note: Upon performing a log test, invalid hits are counted, since * no valid records were found, then we count down by the number of * tests ran. */ void uncount_invalid (GLog *glog) { if (glog->invalid > conf.num_tests) glog->invalid -= conf.num_tests; else glog->invalid = 0; } /* Count down the number of processed hits. * Note: Upon performing a log test, processed hits are counted, since * no valid records were found, then we count down by the number of * tests ran. */ void uncount_processed (GLog *glog) { lock_spinner (); if (glog->processed > conf.num_tests) glog->processed -= conf.num_tests; else glog->processed = 0; unlock_spinner (); } /* Keep track of all valid log strings. */ static void count_valid (int numdate) { lock_spinner (); ht_inc_cnt_valid (numdate, 1); unlock_spinner (); } /* Keep track of all valid and processed log strings. */ void count_process (GLog *glog) { __sync_add_and_fetch (&glog->processed, 1); lock_spinner (); ht_inc_cnt_overall ("total_requests", 1); unlock_spinner (); } void count_process_and_invalid (GLog *glog, GLogItem *logitem, const char *line) { count_process (glog); count_invalid (glog, logitem, line); } /* Keep track of all excluded log strings (IPs). * * If IP not range, 1 is returned. * If IP is excluded, 0 is returned. */ int excluded_ip (GLogItem *logitem) { if (conf.ignore_ip_idx && ip_in_range (logitem->host)) { ht_inc_cnt_overall ("excluded_ip", 1); return 0; } return 1; } /* A wrapper function to insert a data keymap string key. * * If the given key exists, its value is returned. * On error, 0 is returned. * On success the value of the key inserted is returned */ static int insert_dkeymap (GModule module, GKeyData *kdata) { return ht_insert_keymap (module, kdata->numdate, kdata->dhash, &kdata->cdnkey); } /* A wrapper function to insert a root keymap string key. * * If the given key exists, its value is returned. * On error, 0 is returned. * On success the value of the key inserted is returned */ static int insert_rkeymap (GModule module, GKeyData *kdata) { return ht_insert_keymap (module, kdata->numdate, kdata->rhash, &kdata->crnkey); } /* A wrapper function to insert a datamap uint32_t key and string value. */ static void insert_data (GModule module, GKeyData *kdata) { ht_insert_datamap (module, kdata->numdate, kdata->data_nkey, kdata->data, kdata->cdnkey); } /* A wrapper function to insert a uniqmap string key. * * If the given key exists, 0 is returned. * On error, 0 is returned. * On success the value of the key inserted is returned */ static int insert_uniqmap (GModule module, GKeyData *kdata, uint32_t uniq_nkey) { return ht_insert_uniqmap (module, kdata->numdate, kdata->data_nkey, uniq_nkey); } /* A wrapper function to insert a rootmap uint32_t key from the keymap * store mapped to its string value. */ static void insert_rootmap (GModule module, GKeyData *kdata) { ht_insert_rootmap (module, kdata->numdate, kdata->root_nkey, kdata->root, kdata->crnkey); } /* A wrapper function to insert a data uint32_t key mapped to the * corresponding uint32_t root key. */ static void insert_root (GModule module, GKeyData *kdata) { ht_insert_root (module, kdata->numdate, kdata->data_nkey, kdata->root_nkey, kdata->cdnkey, kdata->crnkey); } /* A wrapper function to increase hits counter from an uint32_t key. */ static void insert_hit (GModule module, GKeyData *kdata) { ht_insert_hits (module, kdata->numdate, kdata->data_nkey, 1, kdata->cdnkey); ht_insert_meta_data (module, kdata->numdate, "hits", 1); } /* A wrapper function to increase visitors counter from an uint32_t * key. */ static void insert_visitor (GModule module, GKeyData *kdata) { ht_insert_visitor (module, kdata->numdate, kdata->data_nkey, 1, kdata->cdnkey); ht_insert_meta_data (module, kdata->numdate, "visitors", 1); } /* A wrapper function to increases bandwidth counter from an uint32_t * key. */ static void insert_bw (GModule module, GKeyData *kdata, uint64_t size) { ht_insert_bw (module, kdata->numdate, kdata->data_nkey, size, kdata->cdnkey); ht_insert_meta_data (module, kdata->numdate, "bytes", size); } /* A wrapper call to increases cumulative time served counter * from an uint32_t key. */ static void insert_cumts (GModule module, GKeyData *kdata, uint64_t ts) { ht_insert_cumts (module, kdata->numdate, kdata->data_nkey, ts, kdata->cdnkey); ht_insert_meta_data (module, kdata->numdate, "cumts", ts); } /* A wrapper call to insert the maximum time served counter from * an uint32_t key. */ static void insert_maxts (GModule module, GKeyData *kdata, uint64_t ts) { ht_insert_maxts (module, kdata->numdate, kdata->data_nkey, ts, kdata->cdnkey); ht_insert_meta_data (module, kdata->numdate, "maxts", ts); } static void insert_method (GModule module, GKeyData *kdata, const char *data) { ht_insert_method (module, kdata->numdate, kdata->data_nkey, data ? data : "---", kdata->cdnkey); } /* A wrapper call to insert a method given an uint32_t key and string * value. */ static void insert_protocol (GModule module, GKeyData *kdata, const char *data) { ht_insert_protocol (module, kdata->numdate, kdata->data_nkey, data ? data : "---", kdata->cdnkey); } /* A wrapper call to insert an agent for a hostname given an uint32_t * key and uint32_t value. */ static void insert_agent (GModule module, GKeyData *kdata, uint32_t agent_nkey) { ht_insert_agent (module, kdata->numdate, kdata->data_nkey, agent_nkey); } /* The following generates a unique key to identity unique requests. * The key is made out of the actual request, and if available, the * method and the protocol. Note that for readability, doing a simple * snprintf/sprintf should suffice, however, memcpy is the fastest * solution * * On success the new unique request key is returned */ static char * gen_unique_req_key (GLogItem *logitem) { char *key = NULL; size_t s1 = 0, s2 = 0, s3 = 0, nul = 1, sep = 0; /* nothing to do */ if (!conf.append_method && !conf.append_protocol) return xstrdup (logitem->req); /* still nothing to do */ if (!logitem->method && !logitem->protocol) return xstrdup (logitem->req); s1 = strlen (logitem->req); if (logitem->method && conf.append_method) { s2 = strlen (logitem->method); nul++; } if (logitem->protocol && conf.append_protocol) { s3 = strlen (logitem->protocol); nul++; } /* includes terminating null */ key = xcalloc (s1 + s2 + s3 + nul, sizeof (char)); /* append request */ memcpy (key, logitem->req, s1); if (logitem->method && conf.append_method) { key[s1] = '|'; sep++; memcpy (key + s1 + sep, logitem->method, s2 + 1); } if (logitem->protocol && conf.append_protocol) { key[s1 + s2 + sep] = '|'; sep++; memcpy (key + s1 + s2 + sep, logitem->protocol, s3 + 1); } return key; } /* Append the query string to the request, and therefore, it modifies * the original logitem->req */ static void append_query_string (char **req, const char *qstr) { char *r; size_t s1, s2, qm = 0; s1 = strlen (*req); s2 = strlen (qstr); /* add '?' between the URL and the query string */ if (*qstr != '?') qm = 1; r = xmalloc (s1 + s2 + qm + 1); memcpy (r, *req, s1); if (qm) r[s1] = '?'; memcpy (r + s1 + qm, qstr, s2 + 1); free (*req); *req = r; } /* A wrapper to assign the given data key and the data item to the key * data structure */ static void get_kdata (GKeyData *kdata, const char *data_key, const char *data) { /* inserted in datamap */ kdata->data = data; /* inserted in keymap */ kdata->dhash = djb2 ((const unsigned char *) data_key); } /* A wrapper to assign the given data key and the data item to the key * data structure */ static void get_kroot (GKeyData *kdata, const char *root_key, const char *root) { /* inserted in datamap */ kdata->root = root; /* inserted in keymap */ kdata->rhash = djb2 ((const unsigned char *) root_key); } /* Generate a visitor's key given the date specificity. For instance, * if the specificity is set to hours, then a generated key would * look like: 03/Jan/2016:09 */ static void set_spec_visitor_key (char **fdate, const char *ftime) { size_t dlen = 0, tlen = 0, idx = 0; char *key = NULL, *tkey = NULL, *pch = NULL; tkey = xstrdup (ftime); if (conf.date_spec_hr == 1 && (pch = strchr (tkey, ':')) && (pch - tkey) > 0) *pch = '\0'; else if (conf.date_spec_hr == 2 && (pch = strrchr (tkey, ':')) && (pch - tkey) > 0) { *pch = '\0'; if ((pch = strchr (tkey, ':')) && (idx = pch - tkey)) memmove (&tkey[idx], &tkey[idx + 1], strlen (tkey) - idx); } dlen = strlen (*fdate); tlen = strlen (tkey); key = xmalloc (dlen + tlen + 1); memcpy (key, *fdate, dlen); memcpy (key + dlen, tkey, tlen + 1); free (*fdate); free (tkey); *fdate = key; } /* Generate a unique key for the visitors panel from the given logitem * structure and assign it to the output key data structure. * * On error, or if no date is found, 1 is returned. * On success, the date key is assigned to our key data structure. */ static int gen_visitor_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->date || !logitem->time) return 1; /* Append time specificity to date */ if (conf.date_spec_hr) set_spec_visitor_key (&logitem->date, logitem->time); get_kdata (kdata, logitem->date, logitem->date); kdata->numdate = logitem->numdate; return 0; } /* Generate a unique key for the requests panel from the given logitem * structure and assign it to out key data structure. * * On success, the generated request key is assigned to our key data * structure. */ static int gen_req_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->req) return 1; if (logitem->qstr) append_query_string (&logitem->req, logitem->qstr); logitem->req_key = gen_unique_req_key (logitem); get_kdata (kdata, logitem->req_key, logitem->req); kdata->numdate = logitem->numdate; return 0; } /* A wrapper to generate a unique key for the request panel. * * On error, or if the request is static or a 404, 1 is returned. * On success, the generated request key is assigned to our key data * structure. */ static int gen_request_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->req || logitem->is_404 || logitem->is_static) return 1; return gen_req_key (kdata, logitem); } /* A wrapper to generate a unique key for the request panel. * * On error, or if the request is not a 404, 1 is returned. * On success, the generated request key is assigned to our key data * structure. */ static int gen_404_key (GKeyData *kdata, GLogItem *logitem) { if (logitem->req && logitem->is_404) return gen_req_key (kdata, logitem); return 1; } /* A wrapper to generate a unique key for the request panel. * * On error, or if the request is not a static request, 1 is returned. * On success, the generated request key is assigned to our key data * structure. */ static int gen_static_request_key (GKeyData *kdata, GLogItem *logitem) { if (logitem->req && logitem->is_static) return gen_req_key (kdata, logitem); return 1; } /* A wrapper to generate a unique key for the virtual host panel. * * On error, 1 is returned. * On success, the generated vhost key is assigned to our key data * structure. */ static int gen_vhost_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->vhost) return 1; get_kdata (kdata, logitem->vhost, logitem->vhost); kdata->numdate = logitem->numdate; return 0; } /* A wrapper to generate a unique key for the virtual host panel. * * On error, 1 is returned. * On success, the generated userid key is assigned to our key data * structure. */ static int gen_remote_user_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->userid) return 1; get_kdata (kdata, logitem->userid, logitem->userid); kdata->numdate = logitem->numdate; return 0; } /* A wrapper to generate a unique key for the cache status panel. * * On error, 1 is returned. * On success, the generated cache status key is assigned to our key data * structure. */ static int gen_cache_status_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->cache_status) return 1; get_kdata (kdata, logitem->cache_status, logitem->cache_status); kdata->numdate = logitem->numdate; return 0; } /* A wrapper to generate a unique key for the hosts panel. * * On error, 1 is returned. * On success, the generated host key is assigned to our key data * structure. */ static int gen_host_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->host) return 1; get_kdata (kdata, logitem->host, logitem->host); kdata->numdate = logitem->numdate; return 0; } /* Add browsers/OSs our logitem structure and reuse crawlers if applicable. */ void set_browser_os (GLogItem *logitem) { char *a1 = xstrdup (logitem->agent), *a2 = xstrdup (logitem->agent); char browser_type[BROWSER_TYPE_LEN] = ""; char os_type[OPESYS_TYPE_LEN] = ""; logitem->browser = verify_browser (a1, browser_type); logitem->browser_type = xstrdup (browser_type); if (!strncmp (logitem->browser_type, "Crawlers", 9)) { logitem->os = xstrdup (logitem->browser); logitem->os_type = xstrdup (browser_type); } else { logitem->os = verify_os (a2, os_type); logitem->os_type = xstrdup (os_type); } free (a1); free (a2); } /* Generate a browser unique key for the browser's panel given a user * agent and assign the browser type/category as a root element. * * On error, 1 is returned. * On success, the generated browser key is assigned to our key data * structure. */ static int gen_browser_key (GKeyData *kdata, GLogItem *logitem) { if (logitem->agent == NULL || *logitem->agent == '\0') return 1; if (logitem->browser == NULL || *logitem->browser == '\0') return 1; /* e.g., Firefox 11.12 */ get_kdata (kdata, logitem->browser, logitem->browser); /* Firefox */ get_kroot (kdata, logitem->browser_type, logitem->browser_type); kdata->numdate = logitem->numdate; return 0; } /* Generate an operating system unique key for the OS' panel given a * user agent and assign the OS type/category as a root element. * * On error, 1 is returned. * On success, the generated OS key is assigned to our key data * structure. */ static int gen_os_key (GKeyData *kdata, GLogItem *logitem) { if (logitem->agent == NULL || *logitem->agent == '\0') return 1; if (logitem->os == NULL || *logitem->os == '\0') return 1; /* e.g., GNU+Linux,Ubuntu 10.12 */ get_kdata (kdata, logitem->os, logitem->os); /* GNU+Linux */ get_kroot (kdata, logitem->os_type, logitem->os_type); kdata->numdate = logitem->numdate; return 0; } /* Determine if the given token starts with a valid MIME major type. * * If not valid, NULL is returned. * If valid, the appropriate constant string is returned. */ static const char * extract_mimemajor (const char *token) { const char *lookfor; /* official IANA registries as per https://www.iana.org/assignments/media-types/ */ if ((lookfor = "application", !strncmp (token, lookfor, 11)) || (lookfor = "audio", !strncmp (token, lookfor, 5)) || (lookfor = "font", !strncmp (token, lookfor, 4)) || /* unlikely */ (lookfor = "example", !strncmp (token, lookfor, 7)) || (lookfor = "image", !strncmp (token, lookfor, 5)) || /* unlikely */ (lookfor = "message", !strncmp (token, lookfor, 7)) || (lookfor = "model", !strncmp (token, lookfor, 5)) || (lookfor = "multipart", !strncmp (token, lookfor, 9)) || (lookfor = "text", !strncmp (token, lookfor, 4)) || (lookfor = "video", !strncmp (token, lookfor, 5)) ) return lookfor; return NULL; } /* UMS: generate an Mime-Type unique key * * On error, 1 is returned. * On success, the generated key is assigned to our key data structure. */ static int gen_mime_type_key (GKeyData *kdata, GLogItem *logitem) { const char *major = NULL; if (!logitem->mime_type) return 1; /* redirects and the like only register as "-", ignore those */ major = extract_mimemajor (logitem->mime_type); if (!major) return 1; get_kdata (kdata, logitem->mime_type, logitem->mime_type); kdata->numdate = logitem->numdate; get_kroot (kdata, major, major); return 0; } /* Determine if the given token starts with the usual TLS/SSL result string. * * If not valid, NULL is returned. * If valid, the appropriate constant string is returned. */ static const char * extract_tlsmajor (const char *token) { const char *lookfor; if ((lookfor = "SSLv3", !strncmp (token, lookfor, 5)) || (lookfor = "TLSv1.1", !strncmp (token, lookfor, 7)) || (lookfor = "TLSv1.2", !strncmp (token, lookfor, 7)) || (lookfor = "TLSv1.3", !strncmp (token, lookfor, 7)) || (lookfor = "TLS1.1", !strncmp (token, lookfor, 6)) || (lookfor = "TLS1.2", !strncmp (token, lookfor, 6)) || (lookfor = "TLS1.3", !strncmp (token, lookfor, 6)) || /* Nope, it's not 1.0 */ (lookfor = "TLSv1", !strncmp (token, lookfor, 5)) || (lookfor = "TLS1", !strncmp (token, lookfor, 4))) return lookfor; return NULL; } /* UMS: generate a TLS settings unique key * * On error, 1 is returned. * On success, the generated key is assigned to our key data structure. */ static int gen_tls_type_key (GKeyData *kdata, GLogItem *logitem) { const char *tls; size_t tlen = 0, clen = 0; if (!logitem->tls_type) return 1; /* '-' means no TLS at all, just ignore for the panel? */ tls = extract_tlsmajor (logitem->tls_type); if (!tls) return 1; kdata->numdate = logitem->numdate; if (!logitem->tls_cypher) { get_kroot (kdata, tls, tls); get_kdata (kdata, tls, tls); return 0; } clen = strlen (logitem->tls_cypher); tlen = strlen (tls); logitem->tls_type_cypher = xmalloc (tlen + clen + 2); memcpy (logitem->tls_type_cypher, tls, tlen); logitem->tls_type_cypher[tlen] = '/'; /* includes terminating null */ memcpy (logitem->tls_type_cypher + tlen + 1, logitem->tls_cypher, clen + 1); get_kdata (kdata, logitem->tls_type_cypher, logitem->tls_type_cypher); get_kroot (kdata, tls, tls); return 0; } /* A wrapper to generate a unique key for the referrers panel. * * On error, 1 is returned. * On success, the generated referrer key is assigned to our key data * structure. */ static int gen_referer_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->ref) return 1; get_kdata (kdata, logitem->ref, logitem->ref); kdata->numdate = logitem->numdate; return 0; } /* A wrapper to generate a unique key for the referring sites panel. * * On error, 1 is returned. * On success, the generated referring site key is assigned to our key data * structure. */ static int gen_ref_site_key (GKeyData *kdata, GLogItem *logitem) { if (logitem->site[0] == '\0') return 1; get_kdata (kdata, logitem->site, logitem->site); kdata->numdate = logitem->numdate; return 0; } /* A wrapper to generate a unique key for the keyphrases panel. * * On error, 1 is returned. * On success, the generated keyphrase key is assigned to our key data * structure. */ static int gen_keyphrase_key (GKeyData *kdata, GLogItem *logitem) { if (!logitem->keyphrase) return 1; get_kdata (kdata, logitem->keyphrase, logitem->keyphrase); kdata->numdate = logitem->numdate; return 0; } #ifdef HAVE_GEOLOCATION /* Extract geolocation for the given host. * * On error, 1 is returned. * On success, the extracted continent and country are set and 0 is * returned. */ static int extract_geolocation (GLogItem *logitem, char *continent, char *country) { if (!is_geoip_resource ()) return 1; geoip_get_country (logitem->host, country, logitem->type_ip); geoip_get_continent (logitem->host, continent, logitem->type_ip); return 0; } #endif /* A wrapper to generate a unique key for the geolocation panel. * * On error, 1 is returned. * On success, the generated geolocation key is assigned to our key * data structure. */ #ifdef HAVE_GEOLOCATION static int gen_geolocation_key (GKeyData *kdata, GLogItem *logitem) { char continent[CONTINENT_LEN] = ""; char country[COUNTRY_LEN] = ""; if (extract_geolocation (logitem, continent, country) == 1) return 1; if (country[0] != '\0') logitem->country = xstrdup (country); if (continent[0] != '\0') logitem->continent = xstrdup (continent); get_kdata (kdata, logitem->country, logitem->country); get_kroot (kdata, logitem->continent, logitem->continent); kdata->numdate = logitem->numdate; return 0; } /* A wrapper to generate a unique key for the ASN panel. * * On error, 1 is returned. * On success, the generated keyphrase key is assigned to our key data * structure. */ static int gen_asn_key (GKeyData *kdata, GLogItem *logitem) { char asn[ASN_LEN] = ""; if (!is_geoip_resource ()) return 1; geoip_asn (logitem->host, asn); if (asn[0] != '\0') logitem->asn = xstrdup (asn); get_kdata (kdata, logitem->asn, logitem->asn); kdata->numdate = logitem->numdate; return 0; } #endif /* A wrapper to generate a unique key for the status code panel. * * On error, 1 is returned. * On success, the generated status code key is assigned to our key * data structure. */ static int gen_status_code_key (GKeyData *kdata, GLogItem *logitem) { const char *status = NULL, *type = NULL; if (logitem->status == -1) return 1; status = verify_status_code (logitem->status); type = verify_status_code_type (logitem->status); get_kdata (kdata, status, status); get_kroot (kdata, type, type); kdata->numdate = logitem->numdate; return 0; } /* Given a time string containing at least %H:%M, extract either the * tenth of a minute or an hour. * * On error, the given string is not modified. * On success, the conf specificity is extracted. */ static void parse_time_specificity_string (char *hmark, char *ftime) { /* tenth of a minute specificity - e.g., 18:2 */ if (conf.hour_spec_min && hmark[1] != '\0') { hmark[2] = '\0'; return; } /* hour specificity (default) */ if ((hmark - ftime) > 0) *hmark = '\0'; } /* A wrapper to generate a unique key for the time distribution panel. * * On error, 1 is returned. * On success, the generated time key is assigned to our key data * structure. */ static int gen_visit_time_key (GKeyData *kdata, GLogItem *logitem) { char *hmark = NULL; if (!logitem->time) return 1; /* it must be a string containing the hour. */ if ((hmark = strchr (logitem->time, ':'))) parse_time_specificity_string (hmark, logitem->time); kdata->numdate = logitem->numdate; get_kdata (kdata, logitem->time, logitem->time); return 0; } void insert_methods_protocols (void) { size_t i; for (i = 0; i < http_methods_len; ++i) ht_insert_meth_proto (http_methods[i].method); for (i = 0; i < http_protocols_len; ++i) ht_insert_meth_proto (http_protocols[i].protocol); ht_insert_meth_proto ("---"); } /* Determine if 404s need to be added to the unique visitors count. * * If it needs to be added, 0 is returned else 1 is returned. */ static int include_uniq (GLogItem *logitem) { int u = conf.client_err_to_unique_count; if (!logitem->status || (logitem->status / 100) != 4 || (u && (logitem->status / 100) == '4')) return 1; return 0; } /* Determine which data metrics need to be set and set them. */ static void set_datamap (GLogItem *logitem, GKeyData *kdata, const GParse *parse) { GModule module; module = parse->module; /* insert data */ parse->datamap (module, kdata); /* insert rootmap and root-data map */ if (parse->rootmap && kdata->root) { parse->rootmap (module, kdata); insert_root (module, kdata); } /* insert hits */ if (parse->hits) parse->hits (module, kdata); /* insert visitors */ if (parse->visitor && kdata->uniq_nkey == 1) parse->visitor (module, kdata); /* insert bandwidth */ if (parse->bw) parse->bw (module, kdata, logitem->resp_size); /* insert averages time served */ if (parse->cumts) parse->cumts (module, kdata, logitem->serve_time); /* insert averages time served */ if (parse->maxts) parse->maxts (module, kdata, logitem->serve_time); /* insert method */ if (parse->method && conf.append_method) parse->method (module, kdata, logitem->method); /* insert protocol */ if (parse->protocol && conf.append_protocol) parse->protocol (module, kdata, logitem->protocol); /* insert agent */ if (parse->agent && conf.list_agents) parse->agent (module, kdata, logitem->agent_nkey); } /* Set data mapping and metrics. */ static void map_log (GLogItem *logitem, const GParse *parse, GModule module) { GKeyData kdata; new_modulekey (&kdata); /* set key data into out structure */ if (parse->key_data (&kdata, logitem) == 1) return; /* each module requires a data key/value */ if (parse->datamap && kdata.data) kdata.data_nkey = insert_dkeymap (module, &kdata); /* each module contains a uniq visitor key/value */ if (parse->visitor && logitem->uniq_key && include_uniq (logitem)) kdata.uniq_nkey = insert_uniqmap (module, &kdata, logitem->uniq_nkey); /* root keys are optional */ if (parse->rootmap && kdata.root) kdata.root_nkey = insert_rkeymap (module, &kdata); /* each module requires a root key/value */ if (parse->datamap && kdata.data) set_datamap (logitem, &kdata, parse); } static void ins_agent_key_val (GLogItem *logitem, uint32_t numdate) { logitem->agent_nkey = ht_insert_agent_key (numdate, logitem->agent_hash); /* insert UA key and get a numeric value */ if (logitem->agent_nkey != 0) { /* insert a numeric key and map it to a UA string */ ht_insert_agent_value (numdate, logitem->agent_nkey, logitem->agent); } } static int clean_old_data_by_date (uint32_t numdate) { uint32_t *dates = NULL; uint32_t idx, len = 0; if (ht_get_size_dates () < conf.keep_last) return 1; dates = get_sorted_dates (&len); /* If currently parsed date is in the set of dates, keep inserting it. * We count down since more likely the currently parsed date is at the last pos */ for (idx = len; idx-- > 0;) { if (dates[idx] == numdate) { free (dates); return 1; } } /* ignore older dates */ if (dates[0] > numdate) { free (dates); return -1; } /* invalidate the first date we inserted then */ invalidate_date (dates[0]); /* rebuild all existing dates and let new data * be added upon existing cache */ rebuild_rawdata_cache (); free (dates); return 0; } /* Process a log line and set the data into the corresponding data * structure. */ void process_log (GLogItem *logitem) { GModule module; const GParse *parse = NULL; size_t idx = 0; uint32_t numdate = logitem->numdate; if (conf.keep_last > 0 && clean_old_data_by_date (numdate) == -1) return; /* insert date and start partitioning tables */ if (ht_insert_date (numdate) == -1) return; /* Insert one unique visitor key per request to avoid the * overhead of storing one key per module */ if ((logitem->uniq_nkey = ht_insert_unique_key (numdate, logitem->uniq_key)) == 0) return; /* If we need to store user agents per IP, then we store them and retrieve * its numeric key. * It maintains two maps, one for key -> value, and another * map for value -> key*/ if (conf.list_agents) ins_agent_key_val (logitem, numdate); FOREACH_MODULE (idx, module_list) { module = module_list[idx]; if (!(parse = panel_lookup (module))) continue; map_log (logitem, parse, module); } count_bw (numdate, logitem->resp_size); /* don't ignore line but neither count as valid */ if (logitem->ignorelevel != IGNORE_LEVEL_REQ) count_valid (numdate); } �����������������������������������������������������������������������������������goaccess-1.9.3/src/gslist.h�������������������������������������������������������������������������0000644�0001750�0001730�00000004563�14624731651�011260� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * _______ _______ __ __ * / ____/ | / / ___/____ _____/ /_____ / /_ * / / __ | | /| / /\__ \/ __ \/ ___/ //_/ _ \/ __/ * / /_/ / | |/ |/ /___/ / /_/ / /__/ ,< / __/ /_ * \____/ |__/|__//____/\____/\___/_/|_|\___/\__/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef GSLIST_H_INCLUDED #define GSLIST_H_INCLUDED /* Generic Single linked-list */ typedef struct GSLList_ { void *data; struct GSLList_ *next; } GSLList; #define GSLIST_FOREACH(node, data, code) { \ GSLList *__tmp = node; \ while (__tmp) { \ (data) = __tmp->data; \ code; \ __tmp = __tmp->next; \ }} /* single linked-list */ GSLList *list_create (void *data); GSLList *list_find (GSLList * node, int (*func) (void *, void *), void *data); GSLList *list_insert_append (GSLList * node, void *data); GSLList *list_insert_prepend (GSLList * list, void *data); GSLList *list_copy (GSLList * node); int list_count (GSLList * list); int list_foreach (GSLList * node, int (*func) (void *, void *), void *user_data); int list_remove_node (GSLList ** list, GSLList * node); int list_remove_nodes (GSLList * list); #endif // for #ifndef GSLIST_H ���������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/output.h�������������������������������������������������������������������������0000644�0001750�0001730�00000006074�14624731651�011312� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #ifndef OUTPUT_H_INCLUDED #define OUTPUT_H_INCLUDED #define MAX_PLOTS 5 /* number of metrics we can plot */ #define FILENAME_JS "goaccess.js" #define FILENAME_CSS "goaccess.css" #include "commons.h" #include "parser.h" /* Enumerated chart types */ typedef enum GChartType_ { CHART_NONE, CHART_VBAR, CHART_AREASPLINE, CHART_WMAP, } GChartType; /* Chart axis structure */ typedef struct GChartDef_ { const char *key; const char *value; } GChartDef; /* Chart axis structure */ typedef struct GChart_ { const char *key; GChartDef *def; } GChart; /* Chart behavior */ typedef struct GHTMLPlot_ { GChartType chart_type; void (*plot) (FILE * fp, struct GHTMLPlot_ plot, int sp); int8_t chart_reverse; int8_t redraw_expand; char *chart_key; char *chart_lbl; } GHTMLPlot; /* Controls HTML panel output. */ typedef struct GHTML_ { GModule module; int8_t table; int8_t has_map; void (*metrics) (FILE * fp, const struct GHTML_ * def, int sp); GHTMLPlot chart[MAX_PLOTS]; } GHTML; /* Metric definition . */ typedef struct GDefMetric_ { const char *cname; /* metric class name */ const char *cwidth; /* metric column width */ const char *datakey; /* metric JSON data key */ const char *datatype; /* metric data value type */ const char *lbl; /* metric label (column name) */ const char *metakey; /* metric JSON meta key */ const char *metatype; /* metric meta value type */ const char *metalbl; /* metric meta value label */ const char *hlregex; /* highlight regex value */ } GDefMetric; void output_html (GHolder * holder, const char *filename); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gkhash.c�������������������������������������������������������������������������0000644�0001750�0001730�00000110107�14626464423�011205� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * gkhash.c -- default hash table functions * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include "gkhash.h" #include "error.h" #include "persistence.h" #include "sort.h" #include "util.h" #include "xmalloc.h" /* *INDENT-OFF* */ /* Hash table that holds DB instances */ static khash_t (igdb) * ht_db = NULL; /* *INDENT-ON* */ /* Allocate memory for a new global GKHashDB instance. * * On success, the newly allocated GKHashDB is returned . */ static GKHashDB * new_gkhdb (void) { GKHashDB *storage = xcalloc (1, sizeof (GKHashDB)); return storage; } /* Allocate memory for a new GKDB instance. * * On success, the newly allocated GKHashDB is returned . */ static GKDB * new_gkdb (void) { GKDB *db = xcalloc (1, sizeof (GKDB)); return db; } /* Get the module string value given a metric enum value. * * On error, NULL is returned. * On success, the string module value is returned. */ const char * get_mtr_type_str (GSMetricType type) { static const GEnum enum_metric_types[] = { {"II32", MTRC_TYPE_II32}, {"IS32", MTRC_TYPE_IS32}, {"IU64", MTRC_TYPE_IU64}, {"SI32", MTRC_TYPE_SI32}, {"SI08", MTRC_TYPE_SI08}, {"II08", MTRC_TYPE_II08}, {"SS32", MTRC_TYPE_SS32}, {"IGSL", MTRC_TYPE_IGSL}, {"SU64", MTRC_TYPE_SU64}, {"IGKH", MTRC_TYPE_IGKH}, {"U648", MTRC_TYPE_U648}, {"IGLP", MTRC_TYPE_IGLP}, }; return enum2str (enum_metric_types, ARRAY_SIZE (enum_metric_types), type); } /* Initialize a new uint32_t key - GSLList value hash table */ void * new_igsl_ht (void) { khash_t (igsl) * h = kh_init (igsl); return h; } /* Initialize a new string key - uint32_t value hash table */ void * new_ii08_ht (void) { khash_t (ii08) * h = kh_init (ii08); return h; } /* Initialize a new uint32_t key - uint32_t value hash table */ void * new_ii32_ht (void) { khash_t (ii32) * h = kh_init (ii32); return h; } /* Initialize a new uint32_t key - string value hash table */ void * new_is32_ht (void) { khash_t (is32) * h = kh_init (is32); return h; } /* Initialize a new uint32_t key - uint64_t value hash table */ void * new_iu64_ht (void) { khash_t (iu64) * h = kh_init (iu64); return h; } /* Initialize a new string key - uint32_t value hash table */ void * new_si32_ht (void) { khash_t (si32) * h = kh_init (si32); return h; } /* Initialize a new string key - uint64_t value hash table */ void * new_su64_ht (void) { khash_t (su64) * h = kh_init (su64); return h; } /* Initialize a new uint64_t key - uint8_t value hash table */ void * new_u648_ht (void) { khash_t (u648) * h = kh_init (u648); return h; } /* Initialize a new uint64_t key - GLastParse value hash table */ static void * new_iglp_ht (void) { khash_t (iglp) * h = kh_init (iglp); return h; } /* Initialize a new uint32_t key - GKHashStorage value hash table */ static void * new_igdb_ht (void) { khash_t (igdb) * h = kh_init (igdb); return h; } /* Initialize a new uint32_t key - GKHashStorage value hash table */ static void * new_igkh_ht (void) { khash_t (igkh) * h = kh_init (igkh); return h; } /* Initialize a new string key - uint32_t value hash table */ static void * new_si08_ht (void) { khash_t (si08) * h = kh_init (si08); return h; } /* Initialize a new string key - string value hash table */ static void * new_ss32_ht (void) { khash_t (ss32) * h = kh_init (ss32); return h; } /* Deletes all entries from the hash table and optionally frees its GSLList */ void del_igsl_free (void *h, uint8_t free_data) { khint_t k; khash_t (igsl) * hash = h; void *list = NULL; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (!kh_exist (hash, k)) continue; if (free_data) { list = kh_value (hash, k); list_remove_nodes (list); } kh_del (igsl, hash, k); } } /* Deletes all entries from the hash table */ void del_ii08 (void *h, GO_UNUSED uint8_t free_data) { khint_t k; khash_t (ii08) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { kh_del (ii08, hash, k); } } } /* Deletes all entries from the hash table */ void del_ii32 (void *h, GO_UNUSED uint8_t free_data) { khint_t k; khash_t (ii32) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { kh_del (ii32, hash, k); } } } /* Deletes both the hash entry and its string values */ void del_is32_free (void *h, uint8_t free_data) { khint_t k; khash_t (is32) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { if (free_data) free ((char *) kh_value (hash, k)); kh_del (is32, hash, k); } } } /* Deletes all entries from the hash table */ void del_iu64 (void *h, GO_UNUSED uint8_t free_data) { khint_t k; khash_t (iu64) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { kh_del (iu64, hash, k); } } } /* Deletes an entry from the hash table and optionally the keys for a string * key - uint32_t value hash */ void del_si32_free (void *h, uint8_t free_data) { khint_t k; khash_t (si32) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { if (free_data) free ((char *) kh_key (hash, k)); kh_del (si32, hash, k); } } } /* Deletes all entries from the hash table and optionally frees its string key */ void del_su64_free (void *h, uint8_t free_data) { khint_t k; khash_t (su64) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { if (free_data) free ((char *) kh_key (hash, k)); kh_del (su64, hash, k); } } } /* Deletes all entries from the hash table */ void del_u648 (void *h, GO_UNUSED uint8_t free_data) { khint_t k; khash_t (u648) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { kh_del (u648, hash, k); } } } /* Destroys both the hash structure and its GSLList * values */ void des_igsl_free (void *h, uint8_t free_data) { khash_t (igsl) * hash = h; khint_t k; void *list = NULL; if (!hash) return; if (!free_data) goto des; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k) && (list = kh_value (hash, k))) { list_remove_nodes (list); } } des: kh_destroy (igsl, hash); } /* Destroys the hash structure */ void des_ii08 (void *h, GO_UNUSED uint8_t free_data) { khash_t (ii08) * hash = h; if (!hash) return; kh_destroy (ii08, hash); } /* Destroys the hash structure */ void des_ii32 (void *h, GO_UNUSED uint8_t free_data) { khash_t (ii32) * hash = h; if (!hash) return; kh_destroy (ii32, hash); } /* Destroys both the hash structure and its string values */ void des_is32_free (void *h, uint8_t free_data) { khint_t k; khash_t (is32) * hash = h; if (!hash) return; if (!free_data) goto des; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { free ((char *) kh_value (hash, k)); } } des: kh_destroy (is32, hash); } /* Destroys the hash structure */ void des_iu64 (void *h, GO_UNUSED uint8_t free_data) { khash_t (iu64) * hash = h; if (!hash) return; kh_destroy (iu64, hash); } /* Destroys both the hash structure and the keys for a * string key - uint32_t value hash */ void des_si32_free (void *h, uint8_t free_data) { khint_t k; khash_t (si32) * hash = h; if (!hash) return; if (!free_data) goto des; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { free ((char *) kh_key (hash, k)); } } des: kh_destroy (si32, hash); } /* Destroys both the hash structure and the keys for a * string key - uint64_t value hash */ void des_su64_free (void *h, uint8_t free_data) { khash_t (su64) * hash = h; khint_t k; if (!hash) return; if (!free_data) goto des; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { free ((char *) kh_key (hash, k)); } } des: kh_destroy (su64, hash); } /* Destroys the hash structure */ void des_u648 (void *h, GO_UNUSED uint8_t free_data) { khash_t (u648) * hash = h; if (!hash) return; kh_destroy (u648, hash); } /* Destroys both the hash structure and the keys for a * string key - uint32_t value hash */ static void des_si08_free (void *h, uint8_t free_data) { khint_t k; khash_t (si08) * hash = h; if (!hash) return; if (!free_data) goto des; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { free ((char *) kh_key (hash, k)); } } des: kh_destroy (si08, hash); } /* Deletes an entry from the hash table and optionally the keys for a string * key - uint32_t value hash */ static void del_si08_free (void *h, uint8_t free_data) { khint_t k; khash_t (si08) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { if (free_data) free ((char *) kh_key (hash, k)); kh_del (si08, hash, k); } } } /* Deletes an entry from the hash table and optionally the keys for a string * keys and string values */ static void del_ss32_free (void *h, uint8_t free_data) { khint_t k; khash_t (ss32) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { if (free_data) { free ((char *) kh_key (hash, k)); free ((char *) kh_value (hash, k)); } kh_del (ss32, hash, k); } } } /* Destroys both the hash structure and its string * keys and string values */ static void des_ss32_free (void *h, uint8_t free_data) { khint_t k; khash_t (ss32) * hash = h; if (!hash) return; if (!free_data) goto des; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) { free ((char *) kh_key (hash, k)); free ((char *) kh_value (hash, k)); } } des: kh_destroy (ss32, hash); } /* Destroys the hash structure */ static void des_iglp (void *h, GO_UNUSED uint8_t free_data) { khash_t (iglp) * hash = h; if (!hash) return; kh_destroy (iglp, hash); } /* *INDENT-OFF* */ /* Whole application */ const GKHashMetric app_metrics[] = { { .metric.dbm=MTRC_DATES , MTRC_TYPE_IGKH , new_igkh_ht , NULL , NULL , 1 , NULL , NULL } , { .metric.dbm=MTRC_SEQS , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , 1 , NULL , "SI32_SEQS.db" } , { .metric.dbm=MTRC_CNT_OVERALL , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , 1 , NULL , "SI32_CNT_OVERALL.db" } , { .metric.dbm=MTRC_HOSTNAMES , MTRC_TYPE_SS32 , new_ss32_ht , des_ss32_free , del_ss32_free , 1 , NULL , NULL } , { .metric.dbm=MTRC_LAST_PARSE , MTRC_TYPE_IGLP , new_iglp_ht , des_iglp , NULL , 1 , NULL , "IGLP_LAST_PARSE.db" } , { .metric.dbm=MTRC_JSON_LOGFMT , MTRC_TYPE_SS32 , new_ss32_ht , des_ss32_free , del_ss32_free , 1 , NULL , NULL } , { .metric.dbm=MTRC_METH_PROTO , MTRC_TYPE_SI08 , new_si08_ht , des_si08_free , del_si08_free , 1 , NULL , "SI08_METH_PROTO.db" } , { .metric.dbm=MTRC_DB_PROPS , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , 1 , NULL , "SI32_DB_PROPS.db" } , }; const size_t app_metrics_len = ARRAY_SIZE (app_metrics); /* *INDENT-ON* */ /* Destroys malloc'd module metrics */ static void free_app_metrics (GKHashDB *storage) { int i, n = 0; GKHashMetric mtrc; if (!storage) return; n = app_metrics_len; for (i = 0; i < n; i++) { mtrc = storage->metrics[i]; if (mtrc.des) { mtrc.des (mtrc.hash, mtrc.free_data); } } free (storage); } /* Given a key (date), get the relevant store * * On error or not found, NULL is returned. * On success, a pointer to that store is returned. */ void * get_db_instance (uint32_t key) { GKDB *db = NULL; khint_t k; khash_t (igdb) * hash = ht_db; k = kh_get (igdb, hash, key); /* key not found, return NULL */ if (k == kh_end (hash)) return NULL; db = kh_val (hash, k); return db; } /* Get an app hash table given a DB instance and a GAMetric * * On success, a pointer to that store is returned. */ void * get_hdb (GKDB *db, GAMetric mtrc) { return db->hdb->metrics[mtrc].hash; } Logs * get_db_logs (uint32_t instance) { GKDB *db = get_db_instance (instance); return db->logs; } /* Initialize a global hash structure. * * On success, a pointer to that hash structure is returned. */ static GKHashDB * init_gkhashdb (void) { GKHashDB *storage = NULL; int n = 0, i; storage = new_gkhdb (); n = app_metrics_len; for (i = 0; i < n; i++) { storage->metrics[i] = app_metrics[i]; storage->metrics[i].hash = app_metrics[i].alloc (); } return storage; } /* Insert an uint32_t key and an GLastParse value * Note: If the key exists, its value is replaced by the given value. * * On error, -1 is returned. * On success 0 is returned */ int ins_iglp (khash_t (iglp) *hash, uint64_t key, const GLastParse *lp) { khint_t k; int ret; if (!hash) return -1; k = kh_put (iglp, hash, key, &ret); if (ret == -1) return -1; kh_val (hash, k) = *lp; return 0; } /* Create a new GKDB instance given a uint32_t key * * On error, -1 is returned. * On key found, 1 is returned. * On success 0 is returned */ static GKDB * new_db (khash_t (igdb) *hash, uint32_t key) { GKDB *db = NULL; khint_t k; int ret; if (!hash) return NULL; k = kh_put (igdb, hash, key, &ret); /* operation failed */ if (ret == -1) return NULL; /* the key is present in the hash table */ if (ret == 0) return kh_val (hash, k); db = new_gkdb (); db->hdb = init_gkhashdb (); db->cache = NULL; db->store = NULL; db->logs = NULL; kh_val (hash, k) = db; return db; } uint32_t * get_sorted_dates (uint32_t *len) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * hash = get_hdb (db, MTRC_DATES); khiter_t key; uint32_t *dates = NULL; int i = 0; uint32_t size = 0; if (!hash) return NULL; size = kh_size (hash); dates = xcalloc (size, sizeof (uint32_t)); for (key = kh_begin (hash); key != kh_end (hash); ++key) if (kh_exist (hash, key)) dates[i++] = kh_key (hash, key); qsort (dates, i, sizeof (uint32_t), cmp_ui32_asc); *len = i; return dates; } /* Insert a string key and the corresponding uint8_t value. * Note: If the key exists, the value is not replaced. * * On error, or if key exists, -1 is returned. * On success 0 is returned */ int ins_si08 (khash_t (si08) *hash, const char *key, uint8_t value) { khint_t k; int ret; char *dupkey = NULL; if (!hash) return -1; dupkey = xstrdup (key); k = kh_put (si08, hash, dupkey, &ret); /* operation failed, or key exists */ if (ret == -1 || ret == 0) { free (dupkey); return -1; } kh_val (hash, k) = value; return 0; } /* Increment a string key and with the corresponding incremental uint32_t value. * Note: If the key exists, the value is not replaced. * * On error, 0 is returned. * On success or if the key exists, the value is returned */ static uint8_t ins_si08_ai (khash_t (si08) *hash, const char *key) { uint8_t size = 0, value = 0; if (!hash) return 0; size = kh_size (hash); /* the auto increment value starts at SIZE (hash table) + 1 */ value = size > 0 ? size + 1 : 1; return ins_si08 (hash, key, value) == 0 ? value : 0; } /* Insert a string key and the corresponding uint32_t value. * Note: If the key exists, the value is not replaced. * * On error, or if key exists, -1 is returned. * On success 0 is returned */ int ins_si32 (khash_t (si32) *hash, const char *key, uint32_t value) { khint_t k; int ret; char *dupkey = NULL; if (!hash) return -1; dupkey = xstrdup (key); k = kh_put (si32, hash, dupkey, &ret); /* operation failed, or key exists */ if (ret == -1 || ret == 0) { free (dupkey); return -1; } kh_val (hash, k) = value; return 0; } /* Increment a string key and with the corresponding incremental uint32_t value. * Note: If the key exists, the value is not replaced. * * On error, 0 is returned. * On success or if the key exists, the value is returned */ uint32_t ins_si32_inc (khash_t (si32) *hash, const char *key, uint32_t (*cb) (khash_t (si32) *, const char *), khash_t (si32) *seqs, const char *seqk) { khint_t k; int ret; uint32_t value = 0; if (!hash) return 0; k = kh_put (si32, hash, key, &ret); /* operation failed, or key exists */ if (ret == -1 || ret == 0) return 0; if ((value = cb (seqs, seqk)) == 0) return 0; kh_val (hash, k) = value; return value; } /* Increment a uint32_t key and with the corresponding incremental uint32_t value. * Note: If the key exists, the value is not replaced. * * On error, 0 is returned. * On success or if the key exists, the value is returned */ uint32_t ins_ii32_inc (khash_t (ii32) *hash, uint32_t key, uint32_t (*cb) (khash_t (si32) *, const char *), khash_t (si32) *seqs, const char *seqk) { khint_t k; int ret; uint32_t value = 0; if (!hash) return 0; k = kh_put (ii32, hash, key, &ret); /* operation failed, or key exists */ if (ret == -1 || ret == 0) return 0; if ((value = cb (seqs, seqk)) == 0) return 0; kh_val (hash, k) = value; return value; } /* Insert an uint32_t key and the corresponding string value. * Note: If the key exists, the value is not replaced. * * On error, or if key exists, -1 is returned. * On success 0 is returned */ int ins_is32 (khash_t (is32) *hash, uint32_t key, char *value) { khint_t k; int ret; if (!hash) return -1; k = kh_put (is32, hash, key, &ret); if (ret == -1 || ret == 0) return -1; kh_val (hash, k) = value; return 0; } /* Insert a string key and the corresponding string value. * Note: If the key exists, the value is not replaced. * * On error, -1 is returned. * If key exists, 1 is returned. * On success 0 is returned */ static int ins_ss32 (khash_t (ss32) *hash, const char *key, const char *value) { khint_t k; int ret; char *dupkey = NULL; if (!hash) return -1; dupkey = xstrdup (key); k = kh_put (ss32, hash, dupkey, &ret); /* operation failed */ if (ret == -1) { free (dupkey); return -1; } /* key exists */ if (ret == 0) { free (dupkey); return 1; } kh_val (hash, k) = xstrdup (value); return 0; } /* Insert an uint32_t key and an uint32_t value * Note: If the key exists, its value is replaced by the given value. * * On error, -1 is returned. * On success 0 is returned */ int ins_ii32 (khash_t (ii32) *hash, uint32_t key, uint32_t value) { khint_t k; int ret; if (!hash) return -1; k = kh_put (ii32, hash, key, &ret); if (ret == -1) return -1; kh_val (hash, k) = value; return 0; } /* Insert an uint32_t key and an uint8_t value * Note: If the key exists, its value is replaced by the given value. * * On error, -1 is returned. * On success 0 is returned */ int ins_ii08 (khash_t (ii08) *hash, uint32_t key, uint8_t value) { khint_t k; int ret; if (!hash) return -1; k = kh_put (ii08, hash, key, &ret); if (ret == -1) return -1; kh_val (hash, k) = value; return 0; } /* Insert a uint32_t key and a uint64_t value * Note: If the key exists, its value is replaced by the given value. * * On error, -1 is returned. * On success 0 is returned */ int ins_iu64 (khash_t (iu64) *hash, uint32_t key, uint64_t value) { khint_t k; int ret; if (!hash) return -1; k = kh_put (iu64, hash, key, &ret); if (ret == -1) return -1; kh_val (hash, k) = value; return 0; } /* Insert a string key and a uint64_t value * Note: If the key exists, the value is not replaced. * * On error or key exists, -1 is returned. * On success 0 is returned */ int ins_su64 (khash_t (su64) *hash, const char *key, uint64_t value) { khint_t k; int ret; char *dupkey = NULL; if (!hash) return -1; dupkey = xstrdup (key); k = kh_put (su64, hash, dupkey, &ret); /* operation failed, or key exists */ if (ret == -1 || ret == 0) { free (dupkey); return -1; } kh_val (hash, k) = value; return 0; } /* Insert a uint64_t key and a uint8_t value * * On error or key exists, -1 is returned. * On key exists, 1 is returned. * On success 0 is returned */ int ins_u648 (khash_t (u648) *hash, uint64_t key, uint8_t value) { khint_t k; int ret; if (!hash) return -1; k = kh_put (u648, hash, key, &ret); if (ret == -1) return -1; if (ret == 0) return 1; kh_val (hash, k) = value; return 0; } /* Increase an uint32_t value given an uint32_t key. * * On error, 0 is returned. * On success the increased value is returned */ uint32_t inc_ii32 (khash_t (ii32) *hash, uint32_t key, uint32_t inc) { khint_t k; int ret; if (!hash) return 0; k = kh_get (ii32, hash, key); /* key not found, put a new hash with val=0 */ if (k == kh_end (hash)) { k = kh_put (ii32, hash, key, &ret); /* operation failed */ if (ret == -1) return 0; kh_val (hash, k) = 0; } return __sync_add_and_fetch (&kh_val (hash, k), inc); } /* Increase a uint64_t value given a string key. * * On error, -1 is returned. * On success 0 is returned */ int inc_su64 (khash_t (su64) *hash, const char *key, uint64_t inc) { khint_t k; int ret; uint64_t value = inc; char *dupkey = NULL; if (!hash) return -1; k = kh_get (su64, hash, key); /* key not found, set new value to the given `inc` */ if (k == kh_end (hash)) { dupkey = xstrdup (key); k = kh_put (su64, hash, dupkey, &ret); /* operation failed */ if (ret == -1) { free (dupkey); return -1; } } else { value = kh_val (hash, k) + inc; } kh_val (hash, k) = value; return 0; } /* Increase a uint64_t value given a uint32_t key. * Note: If the key exists, its value is increased by the given inc. * * On error, -1 is returned. * On success 0 is returned */ int inc_iu64 (khash_t (iu64) *hash, uint32_t key, uint64_t inc) { khint_t k; int ret; uint64_t value = inc; if (!hash) return -1; k = kh_get (iu64, hash, key); /* key found, increment current value by the given `inc` */ if (k != kh_end (hash)) value = (uint64_t) kh_val (hash, k) + inc; k = kh_put (iu64, hash, key, &ret); if (ret == -1) return -1; kh_val (hash, k) = value; return 0; } /* Increase an uint32_t value given a string key. * * On error, 0 is returned. * On success the increased value is returned */ static uint32_t inc_si32 (khash_t (si32) *hash, const char *key, uint32_t inc) { khint_t k; int ret; char *dupkey = NULL; if (!hash) return 0; k = kh_get (si32, hash, key); /* key not found, put a new hash with val=0 */ if (k == kh_end (hash)) { dupkey = xstrdup (key); k = kh_put (si32, hash, dupkey, &ret); /* operation failed */ if (ret == -1) { free (dupkey); return 0; } /* concurrently added */ if (ret == 0) free (dupkey); kh_val (hash, k) = 0; } return __sync_add_and_fetch (&kh_val (hash, k), inc); } /* Insert a string key and auto increment int value. * * On error, 0 is returned. * On key found, the stored value is returned * On success the value of the key inserted is returned */ uint32_t ins_ii32_ai (khash_t (ii32) *hash, uint32_t key) { int size = 0, value = 0; int ret; khint_t k; if (!hash) return 0; size = kh_size (hash); /* the auto increment value starts at SIZE (hash table) + 1 */ value = size > 0 ? size + 1 : 1; k = kh_put (ii32, hash, key, &ret); /* operation failed */ if (ret == -1) return 0; /* key exists */ if (ret == 0) return kh_val (hash, k); kh_val (hash, k) = value; return value; } /* Compare if the given needle is in the haystack * * if equal, 1 is returned, else 0 */ static int find_int_key_in_list (void *data, void *needle) { return (*(uint32_t *) data) == (*(uint32_t *) needle) ? 1 : 0; } /* Insert an int key and the corresponding GSLList (Single linked-list) value. * Note: If the key exists within the list, the value is not appended. * * On error, -1 is returned. * On success or if key is found, 0 is returned */ int ins_igsl (khash_t (igsl) *hash, uint32_t key, uint32_t value) { khint_t k; GSLList *list; int ret; if (!hash) return -1; k = kh_get (igsl, hash, key); /* key found, check if key exists within the list */ if (k != kh_end (hash) && (list = kh_val (hash, k))) { if (list_find (list, find_int_key_in_list, &value)) return 0; list = list_insert_prepend (list, i322ptr (value)); } else { list = list_create (i322ptr (value)); } k = kh_put (igsl, hash, key, &ret); if (ret == -1) { list_remove_nodes (list); return -1; } kh_val (hash, k) = list; return 0; } /* Get the uint32_t value of a given string key. * * On error, 0 is returned. * On success the uint32_t value for the given key is returned */ uint32_t get_si32 (khash_t (si32) *hash, const char *key) { khint_t k; if (!hash) return 0; k = kh_get (si32, hash, key); /* key found, return current value */ if (k != kh_end (hash)) return __sync_add_and_fetch (&kh_val (hash, k), 0); return 0; } /* Get the uint8_t value of a given string key. * * On error, 0 is returned. * On success the uint8_t value for the given key is returned */ uint8_t get_si08 (khash_t (si08) *hash, const char *key) { khint_t k; if (!hash) return 0; k = kh_get (si08, hash, key); /* key found, return current value */ if (k != kh_end (hash)) return kh_val (hash, k); return 0; } /* Get the uint8_t value of a given string key. * * On error, 0 is returned. * On success the uint8_t value for the given key is returned */ uint8_t get_ii08 (khash_t (ii08) *hash, uint32_t key) { khint_t k; if (!hash) return 0; k = kh_get (ii08, hash, key); /* key found, return current value */ if (k != kh_end (hash)) return kh_val (hash, k); return 0; } /* Get the string value of a given uint32_t key. * * On error, NULL is returned. * On success the string value for the given key is returned */ char * get_is32 (khash_t (is32) *hash, uint32_t key) { khint_t k; char *value = NULL; if (!hash) return NULL; k = kh_get (is32, hash, key); /* key found, return current value */ if (k != kh_end (hash) && (value = kh_val (hash, k))) return xstrdup (value); return NULL; } /* Get the string value of a given string key. * * On error, NULL is returned. * On success the string value for the given key is returned */ static char * get_ss32 (khash_t (ss32) *hash, const char *key) { khint_t k; char *value = NULL; if (!hash) return NULL; k = kh_get (ss32, hash, key); /* key found, return current value */ if (k != kh_end (hash) && (value = kh_val (hash, k))) return xstrdup (value); return NULL; } /* Get the uint32_t value of a given uint32_t key. * * If key is not found, 0 is returned. * On error, -1 is returned. * On success the uint32_t value for the given key is returned */ uint32_t get_ii32 (khash_t (ii32) *hash, uint32_t key) { khint_t k; if (!hash) return 0; k = kh_get (ii32, hash, key); /* key found, return current value */ if (k != kh_end (hash)) return __sync_add_and_fetch (&kh_val (hash, k), 0); return 0; } /* Get the uint64_t value of a given uint32_t key. * * On error, or if key is not found, 0 is returned. * On success the uint64_t value for the given key is returned */ uint64_t get_iu64 (khash_t (iu64) *hash, uint32_t key) { khint_t k; uint64_t value = 0; if (!hash) return 0; k = kh_get (iu64, hash, key); /* key found, return current value */ if (k != kh_end (hash) && (value = kh_val (hash, k))) return value; return 0; } /* Get the uint64_t value of a given string key. * * On error, or if key is not found, 0 is returned. * On success the uint64_t value for the given key is returned */ uint64_t get_su64 (khash_t (su64) *hash, const char *key) { khint_t k; uint64_t val = 0; if (!hash) return 0; k = kh_get (su64, hash, key); /* key found, return current value */ if (k != kh_end (hash) && (val = kh_val (hash, k))) return val; return 0; } /* Get the GLastParse value of a given uint32_t key. * * If key is not found, {0} is returned. * On error, -1 is returned. * On success the GLastParse value for the given key is returned */ static GLastParse get_iglp (khash_t (iglp) *hash, uint64_t key) { khint_t k; GLastParse lp = { 0 }; if (!hash) return lp; k = kh_get (iglp, hash, key); /* key found, return current value */ if (k != kh_end (hash)) { lp = kh_val (hash, k); return lp; } return lp; } /* Iterate over all the key/value pairs for the given hash structure * and set the maximum and minimum values found on an integer key and * integer value. * * Note: These are expensive calls since it has to iterate over all * key-value pairs * * If the hash structure is empty, no values are set. * On success the minimum and maximum values are set. */ void get_ii32_min_max (khash_t (ii32) *hash, uint32_t *min, uint32_t *max) { khint_t k; uint32_t curvalue = 0; int i; for (i = 0, k = kh_begin (hash); k != kh_end (hash); ++k) { if (!kh_exist (hash, k)) continue; curvalue = kh_value (hash, k); if (i++ == 0) *min = curvalue; if (curvalue > *max) *max = curvalue; if (curvalue < *min) *min = curvalue; } } /* Iterate over all the key/value pairs for the given hash structure * and set the maximum and minimum values found on an integer key and * a uint64_t value. * * Note: These are expensive calls since it has to iterate over all * key-value pairs * * If the hash structure is empty, no values are set. * On success the minimum and maximum values are set. */ void get_iu64_min_max (khash_t (iu64) *hash, uint64_t *min, uint64_t *max) { khint_t k; uint64_t curvalue = 0; int i; for (i = 0, k = kh_begin (hash); k != kh_end (hash); ++k) { if (!kh_exist (hash, k)) continue; curvalue = kh_value (hash, k); if (i++ == 0) *min = curvalue; if (curvalue > *max) *max = curvalue; if (curvalue < *min) *min = curvalue; } } uint32_t ht_get_excluded_ips (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * hash = get_hdb (db, MTRC_CNT_OVERALL); if (!hash) return 0; return get_si32 (hash, "excluded_ip"); } uint32_t ht_get_invalid (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * hash = get_hdb (db, MTRC_CNT_OVERALL); if (!hash) return 0; return get_si32 (hash, "failed_requests"); } uint32_t ht_get_processed (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * hash = get_hdb (db, MTRC_CNT_OVERALL); if (!hash) return 0; return get_si32 (hash, "total_requests"); } uint32_t ht_get_processing_time (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * hash = get_hdb (db, MTRC_CNT_OVERALL); if (!hash) return 0; return get_si32 (hash, "processing_time"); } uint8_t ht_insert_meth_proto (const char *key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si08) * hash = get_hdb (db, MTRC_METH_PROTO); uint8_t val = 0; if (!hash) return 0; if ((val = get_si08 (hash, key)) != 0) return val; return ins_si08_ai (hash, key); } uint32_t ht_inc_cnt_overall (const char *key, uint32_t val) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * hash = get_hdb (db, MTRC_CNT_OVERALL); if (!hash) return 0; return inc_si32 (hash, key, val); } int ht_insert_last_parse (uint64_t key, const GLastParse *lp) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (iglp) * hash = get_hdb (db, MTRC_LAST_PARSE); if (!hash) return 0; return ins_iglp (hash, key, lp); } /* Increases the unique key counter from a uint32_t key. * * On error, 0 is returned. * On success the inserted key is returned */ uint32_t ht_ins_seq (khash_t (si32) *hash, const char *key) { if (!hash) return 0; return inc_si32 (hash, key, 1); } /* Insert an IP hostname mapped to the corresponding hostname. * * On error, or if key exists, -1 is returned. * On success 0 is returned */ int ht_insert_hostname (const char *ip, const char *host) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (ss32) * hash = get_hdb (db, MTRC_HOSTNAMES); if (!hash) return -1; return ins_ss32 (hash, ip, host); } /* Insert a JSON log format specification such as request.method => %m. * * On error -1 is returned. * On success or if key exists, 0 is returned */ int ht_insert_json_logfmt (GO_UNUSED void *userdata, char *key, char *spec) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (ss32) * hash = get_hdb (db, MTRC_JSON_LOGFMT); khint_t k; int ret; char *dupkey = NULL; if (!hash) return -1; k = kh_get (ss32, hash, key); /* key found, free it then to insert */ if (k != kh_end (hash)) free (kh_val (hash, k)); else { dupkey = xstrdup (key); k = kh_put (ss32, hash, dupkey, &ret); /* operation failed */ if (ret == -1) { free (dupkey); return -1; } } kh_val (hash, k) = xstrdup (spec); return 0; } GLastParse ht_get_last_parse (uint64_t key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (iglp) * hash = get_hdb (db, MTRC_LAST_PARSE); return get_iglp (hash, key); } /* Get the string value from ht_hostnames given a string key (IP). * * On error, NULL is returned. * On success the string value for the given key is returned */ char * ht_get_hostname (const char *host) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (ss32) * hash = get_hdb (db, MTRC_HOSTNAMES); if (!hash) return NULL; return get_ss32 (hash, host); } /* Get the string value from ht_json_logfmt given a JSON specifier key. * * On error, NULL is returned. * On success the string value for the given key is returned */ char * ht_get_json_logfmt (const char *key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (ss32) * hash = get_hdb (db, MTRC_JSON_LOGFMT); if (!hash) return NULL; return get_ss32 (hash, key); } void init_pre_storage (Logs *logs) { GKDB *db = NULL; ht_db = (khash_t (igdb) *) new_igdb_ht (); db = new_db (ht_db, DB_INSTANCE); db->logs = logs; } static void free_igdb (khash_t (igdb) *hash, khint_t k) { GKDB *db = NULL; db = kh_val (hash, k); des_igkh (get_hdb (db, MTRC_DATES)); free_logs (db->logs); free_cache (db->cache); free_app_metrics (db->hdb); kh_del (igdb, hash, k); free (kh_val (hash, k)); } /* Destroys the hash structure */ static void des_igdb (void *h) { khint_t k; khash_t (igdb) * hash = h; if (!hash) return; for (k = 0; k < kh_end (hash); ++k) { if (kh_exist (hash, k)) free_igdb (hash, k); } kh_destroy (igdb, hash); } /* Destroys the hash structure and its content */ void free_storage (void) { if (conf.persist) persist_data (); des_igdb (ht_db); free_persisted_data (); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/pdjson.c�������������������������������������������������������������������������0000644�0001750�0001730�00000055561�14624731651�011247� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * Public Domain JSON Parser for C * By Christopher Wellons * https://github.com/skeeto/pdjson */ #ifndef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200112L #elif _POSIX_C_SOURCE < 200112L # error incompatible _POSIX_C_SOURCE level #endif #include <stdlib.h> #include <string.h> #include <ctype.h> #ifndef PDJSON_H # include "pdjson.h" #endif #define JSON_FLAG_ERROR (1u << 0) #define JSON_FLAG_STREAMING (1u << 1) #if defined(_MSC_VER) && (_MSC_VER < 1900) #define json_error(json, format, ...) \ if (!(json->flags & JSON_FLAG_ERROR)) { \ json->flags |= JSON_FLAG_ERROR; \ _snprintf_s(json->errmsg, sizeof(json->errmsg), \ _TRUNCATE, \ format, \ __VA_ARGS__); \ } \ #else #define json_error(json, format, ...) \ if (!(json->flags & JSON_FLAG_ERROR)) { \ json->flags |= JSON_FLAG_ERROR; \ snprintf(json->errmsg, sizeof(json->errmsg), \ format, \ __VA_ARGS__); \ } \ #endif /* _MSC_VER */ /* See also PDJSON_STACK_MAX below. */ #ifndef PDJSON_STACK_INC # define PDJSON_STACK_INC 4 #endif struct json_stack { enum json_type type; long count; }; static enum json_type push (json_stream *json, enum json_type type) { json->stack_top++; #ifdef PDJSON_STACK_MAX if (json->stack_top > PDJSON_STACK_MAX) { json_error (json, "%s", "maximum depth of nesting reached"); return JSON_ERROR; } #endif if (json->stack_top >= json->stack_size) { struct json_stack *stack; size_t size = (json->stack_size + PDJSON_STACK_INC) * sizeof (*json->stack); stack = (struct json_stack *) json->alloc.realloc (json->stack, size); if (stack == NULL) { json_error (json, "%s", "out of memory"); return JSON_ERROR; } json->stack_size += PDJSON_STACK_INC; json->stack = stack; } json->stack[json->stack_top].type = type; json->stack[json->stack_top].count = 0; return type; } static enum json_type pop (json_stream *json, int c, enum json_type expected) { if (json->stack == NULL || json->stack[json->stack_top].type != expected) { json_error (json, "unexpected byte '%c'", c); return JSON_ERROR; } json->stack_top--; return expected == JSON_ARRAY ? JSON_ARRAY_END : JSON_OBJECT_END; } static int buffer_peek (struct json_source *source) { if (source->position < source->source.buffer.length) return source->source.buffer.buffer[source->position]; else return EOF; } static int buffer_get (struct json_source *source) { int c = source->peek (source); source->position++; return c; } static int stream_get (struct json_source *source) { source->position++; return fgetc (source->source.stream.stream); } static int stream_peek (struct json_source *source) { int c = fgetc (source->source.stream.stream); ungetc (c, source->source.stream.stream); return c; } static void init (json_stream *json) { json->lineno = 1; json->flags = JSON_FLAG_STREAMING; json->errmsg[0] = '\0'; json->ntokens = 0; json->next = (enum json_type) 0; json->stack = NULL; json->stack_top = (size_t) -1; json->stack_size = 0; json->data.string = NULL; json->data.string_size = 0; json->data.string_fill = 0; json->source.position = 0; json->alloc.malloc = malloc; json->alloc.realloc = realloc; json->alloc.free = free; } static enum json_type is_match (json_stream *json, const char *pattern, enum json_type type) { int c; const char *p = NULL; for (p = pattern; *p; p++) { if (*p != (c = json->source.get (&json->source))) { json_error (json, "expected '%c' instead of byte '%c'", *p, c); return JSON_ERROR; } } return type; } static int pushchar (json_stream *json, int c) { if (json->data.string_fill == json->data.string_size) { size_t size = json->data.string_size * 2; char *buffer = (char *) json->alloc.realloc (json->data.string, size); if (buffer == NULL) { json_error (json, "%s", "out of memory"); return -1; } else { json->data.string_size = size; json->data.string = buffer; } } json->data.string[json->data.string_fill++] = c; return 0; } static int init_string (json_stream *json) { json->data.string_fill = 0; if (json->data.string == NULL) { json->data.string_size = 1024; json->data.string = (char *) json->alloc.malloc (json->data.string_size); if (json->data.string == NULL) { json_error (json, "%s", "out of memory"); return -1; } } json->data.string[0] = '\0'; return 0; } static int encode_utf8 (json_stream *json, unsigned long c) { if (c < 0x80UL) { return pushchar (json, c); } else if (c < 0x0800UL) { return !((pushchar (json, (c >> 6 & 0x1F) | 0xC0) == 0) && (pushchar (json, (c >> 0 & 0x3F) | 0x80) == 0)); } else if (c < 0x010000UL) { if (c >= 0xd800 && c <= 0xdfff) { json_error (json, "invalid codepoint %06lx", c); return -1; } return !((pushchar (json, (c >> 12 & 0x0F) | 0xE0) == 0) && (pushchar (json, (c >> 6 & 0x3F) | 0x80) == 0) && (pushchar (json, (c >> 0 & 0x3F) | 0x80) == 0)); } else if (c < 0x110000UL) { return !((pushchar (json, (c >> 18 & 0x07) | 0xF0) == 0) && (pushchar (json, (c >> 12 & 0x3F) | 0x80) == 0) && (pushchar (json, (c >> 6 & 0x3F) | 0x80) == 0) && (pushchar (json, (c >> 0 & 0x3F) | 0x80) == 0)); } else { json_error (json, "unable to encode %06lx as UTF-8", c); return -1; } } static int hexchar (int c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'a': case 'A': return 10; case 'b': case 'B': return 11; case 'c': case 'C': return 12; case 'd': case 'D': return 13; case 'e': case 'E': return 14; case 'f': case 'F': return 15; default: return -1; } } static long read_unicode_cp (json_stream *json) { long cp = 0; int shift = 12; size_t i = 0; for (i = 0; i < 4; i++) { int c = json->source.get (&json->source); int hc; if (c == EOF) { json_error (json, "%s", "unterminated string literal in Unicode"); return -1; } else if ((hc = hexchar (c)) == -1) { json_error (json, "invalid escape Unicode byte '%c'", c); return -1; } cp += hc * (1 << shift); shift -= 4; } return cp; } static int read_unicode (json_stream *json) { long cp, h, l; int c; if ((cp = read_unicode_cp (json)) == -1) { return -1; } if (cp >= 0xd800 && cp <= 0xdbff) { /* This is the high portion of a surrogate pair; we need to read the * lower portion to get the codepoint */ h = cp; c = json->source.get (&json->source); if (c == EOF) { json_error (json, "%s", "unterminated string literal in Unicode"); return -1; } else if (c != '\\') { json_error (json, "invalid continuation for surrogate pair '%c', " "expected '\\'", c); return -1; } c = json->source.get (&json->source); if (c == EOF) { json_error (json, "%s", "unterminated string literal in Unicode"); return -1; } else if (c != 'u') { json_error (json, "invalid continuation for surrogate pair '%c', " "expected 'u'", c); return -1; } if ((l = read_unicode_cp (json)) == -1) { return -1; } if (l < 0xdc00 || l > 0xdfff) { json_error (json, "surrogate pair continuation \\u%04lx out " "of range (dc00-dfff)", l); return -1; } cp = ((h - 0xd800) * 0x400) + ((l - 0xdc00) + 0x10000); } else if (cp >= 0xdc00 && cp <= 0xdfff) { json_error (json, "dangling surrogate \\u%04lx", cp); return -1; } return encode_utf8 (json, cp); } static int read_escaped (json_stream *json) { int c = json->source.get (&json->source); if (c == EOF) { json_error (json, "%s", "unterminated string literal in escape"); return -1; } else if (c == 'u') { if (read_unicode (json) != 0) return -1; } else { switch (c) { case '\\': case 'b': case 'f': case 'n': case 'r': case 't': case '/': case '"': { const char *codes = "\\bfnrt/\""; const char *p = strchr (codes, c); if (pushchar (json, "\\\b\f\n\r\t/\""[p - codes]) != 0) return -1; } break; default: json_error (json, "invalid escaped byte '%c'", c); return -1; } } return 0; } static int char_needs_escaping (int c) { if ((c >= 0) && (c < 0x20 || c == 0x22 || c == 0x5c)) { return 1; } return 0; } static int utf8_seq_length (char byte) { unsigned char u = (unsigned char) byte; if (u < 0x80) return 1; if (0x80 <= u && u <= 0xBF) { // second, third or fourth byte of a multi-byte // sequence, i.e. a "continuation byte" return 0; } else if (u == 0xC0 || u == 0xC1) { // overlong encoding of an ASCII byte return 0; } else if (0xC2 <= u && u <= 0xDF) { // 2-byte sequence return 2; } else if (0xE0 <= u && u <= 0xEF) { // 3-byte sequence return 3; } else if (0xF0 <= u && u <= 0xF4) { // 4-byte sequence return 4; } else { // u >= 0xF5 // Restricted (start of 4-, 5- or 6-byte sequence) or invalid UTF-8 return 0; } } static int is_legal_utf8 (const unsigned char *bytes, int length) { unsigned char a; const unsigned char *srcptr; if (0 == bytes || 0 == length) return 0; srcptr = bytes + length; switch (length) { default: return 0; // Everything else falls through when true. case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; /* FALLTHRU */ case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; /* FALLTHRU */ case 2: a = (*--srcptr); switch (*bytes) { case 0xE0: if (a < 0xA0 || a > 0xBF) return 0; break; case 0xED: if (a < 0x80 || a > 0x9F) return 0; break; case 0xF0: if (a < 0x90 || a > 0xBF) return 0; break; case 0xF4: if (a < 0x80 || a > 0x8F) return 0; break; default: if (a < 0x80 || a > 0xBF) return 0; break; } /* FALLTHRU */ case 1: if (*bytes >= 0x80 && *bytes < 0xC2) return 0; } return *bytes <= 0xF4; } static int read_utf8 (json_stream *json, int next_char) { int i; char buffer[4]; int count = utf8_seq_length (next_char); if (!count) { json_error (json, "%s", "invalid UTF-8 character"); return -1; } buffer[0] = next_char; for (i = 1; i < count; ++i) { buffer[i] = json->source.get (&json->source); } if (!is_legal_utf8 ((unsigned char *) buffer, count)) { json_error (json, "%s", "invalid UTF-8 text"); return -1; } for (i = 0; i < count; ++i) { if (pushchar (json, buffer[i]) != 0) return -1; } return 0; } static enum json_type read_string (json_stream *json) { if (init_string (json) != 0) return JSON_ERROR; while (1) { int c = json->source.get (&json->source); if (c == EOF) { json_error (json, "%s", "unterminated string literal"); return JSON_ERROR; } else if (c == '"') { if (pushchar (json, '\0') == 0) return JSON_STRING; else return JSON_ERROR; } else if (c == '\\') { if (read_escaped (json) != 0) return JSON_ERROR; } else if ((unsigned) c >= 0x80) { if (read_utf8 (json, c) != 0) return JSON_ERROR; } else { if (char_needs_escaping (c)) { json_error (json, "%s", "unescaped control character in string"); return JSON_ERROR; } if (pushchar (json, c) != 0) return JSON_ERROR; } } return JSON_ERROR; } static int is_digit (int c) { return c >= 48 /*0 */ && c <= 57 /*9 */ ; } static int read_digits (json_stream *json) { int c; unsigned nread = 0; while (is_digit (c = json->source.peek (&json->source))) { if (pushchar (json, json->source.get (&json->source)) != 0) return -1; nread++; } if (nread == 0) { json_error (json, "expected digit instead of byte '%c'", c); return -1; } return 0; } static enum json_type read_number (json_stream *json, int c) { if (pushchar (json, c) != 0) return JSON_ERROR; if (c == '-') { c = json->source.get (&json->source); if (is_digit (c)) { return read_number (json, c); } else { json_error (json, "unexpected byte '%c' in number", c); return JSON_ERROR; } } else if (strchr ("123456789", c) != NULL) { c = json->source.peek (&json->source); if (is_digit (c)) { if (read_digits (json) != 0) return JSON_ERROR; } } /* Up to decimal or exponent has been read. */ c = json->source.peek (&json->source); if (strchr (".eE", c) == NULL) { if (pushchar (json, '\0') != 0) return JSON_ERROR; else return JSON_NUMBER; } if (c == '.') { json->source.get (&json->source); // consume . if (pushchar (json, c) != 0) return JSON_ERROR; if (read_digits (json) != 0) return JSON_ERROR; } /* Check for exponent. */ c = json->source.peek (&json->source); if (c == 'e' || c == 'E') { json->source.get (&json->source); // consume e/E if (pushchar (json, c) != 0) return JSON_ERROR; c = json->source.peek (&json->source); if (c == '+' || c == '-') { json->source.get (&json->source); // consume if (pushchar (json, c) != 0) return JSON_ERROR; if (read_digits (json) != 0) return JSON_ERROR; } else if (is_digit (c)) { if (read_digits (json) != 0) return JSON_ERROR; } else { json_error (json, "unexpected byte '%c' in number", c); return JSON_ERROR; } } if (pushchar (json, '\0') != 0) return JSON_ERROR; else return JSON_NUMBER; } bool json_isspace (int c) { switch (c) { case 0x09: case 0x0a: case 0x0d: case 0x20: return true; } return false; } /* Returns the next non-whitespace character in the stream. */ static int next (json_stream *json) { int c; while (json_isspace (c = json->source.get (&json->source))) if (c == '\n') json->lineno++; return c; } static enum json_type read_value (json_stream *json, int c) { json->ntokens++; switch (c) { case EOF: json_error (json, "%s", "unexpected end of text"); return JSON_ERROR; case '{': return push (json, JSON_OBJECT); case '[': return push (json, JSON_ARRAY); case '"': return read_string (json); case 'n': return is_match (json, "ull", JSON_NULL); case 'f': return is_match (json, "alse", JSON_FALSE); case 't': return is_match (json, "rue", JSON_TRUE); case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '-': if (init_string (json) != 0) return JSON_ERROR; return read_number (json, c); default: json_error (json, "unexpected byte '%c' in value", c); return JSON_ERROR; } } enum json_type json_peek (json_stream *json) { enum json_type next; if (json->next) next = json->next; else next = json->next = json_next (json); return next; } enum json_type json_next (json_stream *json) { int c; enum json_type value; if (json->flags & JSON_FLAG_ERROR) return JSON_ERROR; if (json->next != 0) { enum json_type next = json->next; json->next = (enum json_type) 0; return next; } if (json->ntokens > 0 && json->stack_top == (size_t) -1) { /* In the streaming mode leave any trailing whitespaces in the stream. * This allows the user to validate any desired separation between * values (such as newlines) using json_source_get/peek() with any * remaining whitespaces ignored as leading when we parse the next * value. */ if (!(json->flags & JSON_FLAG_STREAMING)) { do { c = json->source.peek (&json->source); if (json_isspace (c)) { c = json->source.get (&json->source); } } while (json_isspace (c)); if (c != EOF) { json_error (json, "expected end of text instead of byte '%c'", c); return JSON_ERROR; } } return JSON_DONE; } c = next (json); if (json->stack_top == (size_t) -1) { if (c == EOF && (json->flags & JSON_FLAG_STREAMING)) return JSON_DONE; return read_value (json, c); } if (json->stack[json->stack_top].type == JSON_ARRAY) { if (json->stack[json->stack_top].count == 0) { if (c == ']') { return pop (json, c, JSON_ARRAY); } json->stack[json->stack_top].count++; return read_value (json, c); } else if (c == ',') { json->stack[json->stack_top].count++; return read_value (json, next (json)); } else if (c == ']') { return pop (json, c, JSON_ARRAY); } else { json_error (json, "unexpected byte '%c'", c); return JSON_ERROR; } } else if (json->stack[json->stack_top].type == JSON_OBJECT) { if (json->stack[json->stack_top].count == 0) { if (c == '}') { return pop (json, c, JSON_OBJECT); } /* No member name/value pairs yet. */ value = read_value (json, c); if (value != JSON_STRING) { if (value != JSON_ERROR) json_error (json, "%s", "expected member name or '}'"); return JSON_ERROR; } else { json->stack[json->stack_top].count++; return value; } } else if ((json->stack[json->stack_top].count % 2) == 0) { /* Expecting comma followed by member name. */ if (c != ',' && c != '}') { json_error (json, "%s", "expected ',' or '}' after member value"); return JSON_ERROR; } else if (c == '}') { return pop (json, c, JSON_OBJECT); } else { value = read_value (json, next (json)); if (value != JSON_STRING) { if (value != JSON_ERROR) json_error (json, "%s", "expected member name"); return JSON_ERROR; } else { json->stack[json->stack_top].count++; return value; } } } else if ((json->stack[json->stack_top].count % 2) == 1) { /* Expecting colon followed by value. */ if (c != ':') { json_error (json, "%s", "expected ':' after member name"); return JSON_ERROR; } else { json->stack[json->stack_top].count++; return read_value (json, next (json)); } } } json_error (json, "%s", "invalid parser state"); return JSON_ERROR; } void json_reset (json_stream *json) { json->stack_top = -1; json->ntokens = 0; json->flags &= ~JSON_FLAG_ERROR; json->errmsg[0] = '\0'; } enum json_type json_skip (json_stream *json) { enum json_type type = json_next (json); size_t cnt_arr = 0; size_t cnt_obj = 0; enum json_type skip; for (skip = type;; skip = json_next (json)) { if (skip == JSON_ERROR || skip == JSON_DONE) return skip; if (skip == JSON_ARRAY) { ++cnt_arr; } else if (skip == JSON_ARRAY_END && cnt_arr > 0) { --cnt_arr; } else if (skip == JSON_OBJECT) { ++cnt_obj; } else if (skip == JSON_OBJECT_END && cnt_obj > 0) { --cnt_obj; } if (!cnt_arr && !cnt_obj) break; } return type; } enum json_type json_skip_until (json_stream *json, enum json_type type) { while (1) { enum json_type skip = json_skip (json); if (skip == JSON_ERROR || skip == JSON_DONE) return skip; if (skip == type) break; } return type; } const char * json_get_string (json_stream *json, size_t *length) { if (length != NULL) *length = json->data.string_fill; if (json->data.string == NULL) return ""; else return json->data.string; } double json_get_number (json_stream *json) { char *p = json->data.string; return p == NULL ? 0 : strtod (p, NULL); } const char * json_get_error (json_stream *json) { return json->flags & JSON_FLAG_ERROR ? json->errmsg : NULL; } size_t json_get_lineno (json_stream *json) { return json->lineno; } size_t json_get_position (json_stream *json) { return json->source.position; } size_t json_get_depth (json_stream *json) { return json->stack_top + 1; } /* Return the current parsing context, that is, JSON_OBJECT if we are inside an object, JSON_ARRAY if we are inside an array, and JSON_DONE if we are not yet/anymore in either. Additionally, for the first two cases, also return the number of parsing events that have already been observed at this level with json_next/peek(). In particular, inside an object, an odd number would indicate that the just observed JSON_STRING event is a member name. */ enum json_type json_get_context (json_stream *json, size_t *count) { if (json->stack_top == (size_t) -1) return JSON_DONE; if (count != NULL) *count = json->stack[json->stack_top].count; return json->stack[json->stack_top].type; } int json_source_get (json_stream *json) { int c = json->source.get (&json->source); if (c == '\n') json->lineno++; return c; } int json_source_peek (json_stream *json) { return json->source.peek (&json->source); } void json_open_buffer (json_stream *json, const void *buffer, size_t size) { init (json); json->source.get = buffer_get; json->source.peek = buffer_peek; json->source.source.buffer.buffer = (const char *) buffer; json->source.source.buffer.length = size; } void json_open_string (json_stream *json, const char *string) { json_open_buffer (json, string, strlen (string)); } void json_open_stream (json_stream *json, FILE *stream) { init (json); json->source.get = stream_get; json->source.peek = stream_peek; json->source.source.stream.stream = stream; } static int user_get (struct json_source *json) { return json->source.user.get (json->source.user.ptr); } static int user_peek (struct json_source *json) { return json->source.user.peek (json->source.user.ptr); } void json_open_user (json_stream *json, json_user_io get, json_user_io peek, void *user) { init (json); json->source.get = user_get; json->source.peek = user_peek; json->source.source.user.ptr = user; json->source.source.user.get = get; json->source.source.user.peek = peek; } void json_set_allocator (json_stream *json, json_allocator *a) { json->alloc = *a; } void json_set_streaming (json_stream *json, bool streaming) { if (streaming) json->flags |= JSON_FLAG_STREAMING; else json->flags &= ~JSON_FLAG_STREAMING; } void json_close (json_stream *json) { json->alloc.free (json->stack); json->alloc.free (json->data.string); } �����������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/error.c��������������������������������������������������������������������������0000644�0001750�0001730�00000014665�14624731651�011103� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * error.c -- error handling * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <signal.h> #if defined(__GLIBC__) #include <execinfo.h> #endif #include <inttypes.h> #include <sys/types.h> #include <unistd.h> #include "error.h" #include "labels.h" #include "parser.h" static FILE *access_log; static FILE *log_file; static FILE *log_invalid; static FILE *log_unknowns; static Logs *log_data; static struct sigaction old_sigsegv_handler; /* Open a debug file whose name is specified in the given path. */ void dbg_log_open (const char *path) { if (path != NULL) { log_file = fopen (path, "w"); if (log_file == NULL) return; } } /* Close the debug file. */ void dbg_log_close (void) { if (log_file != NULL) fclose (log_file); } /* Open the invalid requests log file whose name is specified in the * given path. */ void invalid_log_open (const char *path) { if (path != NULL) { log_invalid = fopen (path, "w"); if (log_invalid == NULL) return; } } /* Close the invalid requests log file. */ void invalid_log_close (void) { if (log_invalid != NULL) fclose (log_invalid); } /* Open the unknowns log file whose name is specified in the * given path. */ void unknowns_log_open (const char *path) { if (path != NULL) { log_unknowns = fopen (path, "w"); if (log_unknowns == NULL) return; } } /* Close the unknowns log file. */ void unknowns_log_close (void) { if (log_unknowns != NULL) fclose (log_unknowns); } /* Set current overall parsed log data. */ void set_signal_data (void *p) { log_data = p; } /* Open the WebSocket access log file whose name is specified in the * given path. */ int access_log_open (const char *path) { if (path == NULL) return 0; access_log = fopen (path, "a"); if (access_log == NULL) return 1; return 0; } /* Close the WebSocket access log file. */ void access_log_close (void) { if (access_log != NULL) fclose (access_log); } /* Set up sigsegv handler. */ void setup_sigsegv_handler (void) { struct sigaction act; sigemptyset (&act.sa_mask); act.sa_flags = (int) SA_RESETHAND; act.sa_handler = sigsegv_handler; sigaction (SIGSEGV, &act, &old_sigsegv_handler); } static void dump_struct_data (FILE *fp, GLog *glog, int pid) { fprintf (fp, "==%d== FILE: %s\n", pid, glog->props.filename); fprintf (fp, "==%d== Line number: %" PRIu64 "\n", pid, glog->processed); fprintf (fp, "==%d== Invalid data: %" PRIu64 "\n", pid, glog->invalid); fprintf (fp, "==%d== Piping: %d\n", pid, glog->piping); fprintf (fp, "==%d==\n", pid); } /* Dump to the standard output the values of the overall parsed log * data. */ static void dump_struct (FILE *fp) { int pid = getpid (), i; if (!log_data) return; fprintf (fp, "==%d== VALUES AT CRASH POINT\n", pid); fprintf (fp, "==%d==\n", pid); for (i = 0; i < log_data->size; ++i) dump_struct_data (fp, &log_data->glog[i], pid); } /* Custom SIGSEGV handler. */ void sigsegv_handler (int sig) { FILE *fp = stderr; int pid = getpid (); #if defined(__GLIBC__) char **messages; size_t size, i; void *trace_stack[TRACE_SIZE]; #endif (void) endwin (); fprintf (fp, "\n"); fprintf (fp, "==%d== GoAccess %s crashed by Sig %d\n", pid, GO_VERSION, sig); fprintf (fp, "==%d==\n", pid); dump_struct (fp); #if defined(__GLIBC__) size = backtrace (trace_stack, TRACE_SIZE); messages = backtrace_symbols (trace_stack, size); fprintf (fp, "==%d== STACK TRACE:\n", pid); fprintf (fp, "==%d==\n", pid); for (i = 0; i < size; i++) fprintf (fp, "==%d== %zu %s\n", pid, i, messages[i]); #endif fprintf (fp, "==%d==\n", pid); fprintf (fp, "==%d== %s:\n", pid, ERR_PLEASE_REPORT); fprintf (fp, "==%d== https://github.com/allinurl/goaccess/issues\n\n", pid); fflush (fp); /* Call old sigsegv handler; may be default exit or third party one (e.g. ASAN) */ sigaction (SIGSEGV, &old_sigsegv_handler, NULL); } /* Write formatted debug log data to the logfile. */ void dbg_fprintf (const char *fmt, ...) { va_list args; if (!log_file) return; va_start (args, fmt); vfprintf (log_file, fmt, args); fflush (log_file); va_end (args); } /* Write formatted invalid requests log data to the logfile. */ void invalid_fprintf (const char *fmt, ...) { va_list args; if (!log_invalid) return; va_start (args, fmt); vfprintf (log_invalid, fmt, args); fflush (log_invalid); va_end (args); } /* Write formatted unknown browsers/OSs log data to the logfile. */ void unknowns_fprintf (const char *fmt, ...) { va_list args; if (!log_unknowns) return; va_start (args, fmt); vfprintf (log_unknowns, fmt, args); fflush (log_unknowns); va_end (args); } /* Debug output */ void dbg_printf (const char *fmt, ...) { va_list args; va_start (args, fmt); vfprintf (stderr, fmt, args); va_end (args); } /* Write formatted access log data to the logfile. */ void access_fprintf (const char *fmt, ...) { va_list args; if (!access_log) return; va_start (args, fmt); vfprintf (access_log, fmt, args); fflush (access_log); va_end (args); } ���������������������������������������������������������������������������goaccess-1.9.3/src/ui.c�����������������������������������������������������������������������������0000644�0001750�0001730�00000147215�14624731651�010365� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ui.c -- various curses interfaces * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #define STDIN_FILENO 0 #ifndef _BSD_SOURCE #define _BSD_SOURCE /* include stuff from 4.3 BSD */ #endif #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE #endif #if HAVE_CONFIG_H #include <config.h> #endif #include <pthread.h> #include <ctype.h> #include <errno.h> #include <inttypes.h> #include <locale.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <time.h> #include <unistd.h> #include "ui.h" #include "color.h" #include "error.h" #include "gkhash.h" #include "gmenu.h" #include "goaccess.h" #include "util.h" #include "xmalloc.h" /* *INDENT-OFF* */ /* Determine which metrics should be displayed per module/panel */ static const GOutput outputting[] = { {VISITORS , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1} , {REQUESTS , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0} , {REQUESTS_STATIC , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0} , {NOT_FOUND , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0} , {HOSTS , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 0} , {OS , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1} , {BROWSERS , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1} , {VISIT_TIMES , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1} , {VIRTUAL_HOSTS , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , {REFERRERS , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , {REFERRING_SITES , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , {KEYPHRASES , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , {STATUS_CODES , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , {REMOTE_USER , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , {CACHE_STATUS , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , #ifdef HAVE_GEOLOCATION {GEO_LOCATION , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , {ASN , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , #endif {MIME_TYPE , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , {TLS_TYPE , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 0} , }; /* *INDENT-ON* */ /* Structure to display overall statistics */ typedef struct Field_ { const char *field; /* char due to log, bw, log_file */ char *value; GColors *(*colorlbl) (void); GColors *(*colorval) (void); short oneliner; } Field; /* Determine which metrics to output given a module * * On error, or if not found, NULL is returned. * On success, the panel value is returned. */ const GOutput * output_lookup (GModule module) { int i, num_panels = ARRAY_SIZE (outputting); for (i = 0; i < num_panels; i++) { if (outputting[i].module == module) return &outputting[i]; } return NULL; } /* Initialize curses colors */ void init_colors (int force) { /* use default foreground/background colors */ use_default_colors (); /* first set a default normal color */ set_normal_color (); /* then parse custom colors and initialize them */ set_colors (force); } /* Ncurses' window handling */ void set_input_opts (void) { initscr (); clear (); noecho (); halfdelay (10); nonl (); intrflush (stdscr, FALSE); keypad (stdscr, TRUE); if (curs_set (0) == ERR) LOG_DEBUG (("Unable to change cursor: %s\n", strerror (errno))); if (conf.mouse_support) mousemask (BUTTON1_CLICKED, NULL); } /* Deletes the given window, freeing all memory associated with it. */ void close_win (WINDOW *w) { if (w == NULL) return; wclear (w); wrefresh (w); delwin (w); } /* Get the current calendar time as a value of type time_t and convert * time_t to tm as local time */ void generate_time (void) { if (conf.tz_name) set_tz (); timestamp = time (NULL); localtime_r (×tamp, &now_tm); } /* Set the loading spinner as ended and manage the mutex locking. */ void end_spinner (void) { if (conf.no_parsing_spinner) return; pthread_mutex_lock (&parsing_spinner->mutex); parsing_spinner->state = SPN_END; pthread_mutex_unlock (&parsing_spinner->mutex); if (!parsing_spinner->curses) { /* wait for the ui_spinner thread to finish */ struct timespec ts = {.tv_sec = 0,.tv_nsec = SPIN_UPDATE_INTERVAL }; if (nanosleep (&ts, NULL) == -1 && errno != EINTR) FATAL ("nanosleep: %s", strerror (errno)); } } /* Set background colors to all windows. */ void set_wbkgd (WINDOW *main_win, WINDOW *header_win) { GColors *color = get_color (COLOR_BG); /* background colors */ wbkgd (main_win, COLOR_PAIR (color->pair->idx)); wbkgd (header_win, COLOR_PAIR (color->pair->idx)); wbkgd (stdscr, COLOR_PAIR (color->pair->idx)); wrefresh (main_win); } /* Creates and the new terminal windows and set basic properties to * each of them. e.g., background color, enable the reading of * function keys. */ void init_windows (WINDOW **header_win, WINDOW **main_win) { int row = 0, col = 0; /* init standard screen */ getmaxyx (stdscr, row, col); if (row < MIN_HEIGHT || col < MIN_WIDTH) FATAL ("Minimum screen size - 0 columns by 7 lines"); /* init header screen */ *header_win = newwin (6, col, 0, 0); if (*header_win == NULL) FATAL ("Unable to allocate memory for header_win."); keypad (*header_win, TRUE); /* init main screen */ *main_win = newwin (row - 8, col, 7, 0); if (*main_win == NULL) FATAL ("Unable to allocate memory for main_win."); keypad (*main_win, TRUE); set_wbkgd (*main_win, *header_win); } #pragma GCC diagnostic ignored "-Wformat-nonliteral" /* Draw a generic header with the ability to set a custom text to it. */ void draw_header (WINDOW *win, const char *s, const char *fmt, int y, int x, int w, GColors *(*func) (void)) { GColors *color = (*func) (); char *buf; buf = xmalloc (snprintf (NULL, 0, fmt, s) + 1); sprintf (buf, fmt, s); wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwhline (win, y, x, ' ', w); mvwaddnstr (win, y, x, buf, w); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); free (buf); } #pragma GCC diagnostic warning "-Wformat-nonliteral" /* Determine the actual size of the main window. */ void term_size (WINDOW *main_win, int *main_win_height) { int term_h = 0, term_w = 0; getmaxyx (stdscr, term_h, term_w); *main_win_height = term_h - (MAX_HEIGHT_HEADER + MAX_HEIGHT_FOOTER); wresize (main_win, *main_win_height, term_w); wmove (main_win, *main_win_height, 0); } /* Get the module/panel label name for the given module enum value. * * On success, a string containing the label name is returned. */ const char * module_to_label (GModule module) { static const char *const modules[] = { VISITORS_LABEL, REQUESTS_LABEL, REQUESTS_STATIC_LABEL, NOT_FOUND_LABEL, HOSTS_LABEL, OS_LABEL, BROWSERS_LABEL, VISIT_TIMES_LABEL, VIRTUAL_HOSTS_LABEL, REFERRERS_LABEL, REFERRING_SITES_LABEL, KEYPHRASES_LABEL, STATUS_CODES_LABEL, REMOTE_USER_LABEL, CACHE_STATUS_LABEL, #ifdef HAVE_GEOLOCATION GEO_LOCATION_LABEL, ASN_LABEL, #endif MIME_TYPE_LABEL, TLS_TYPE_LABEL, }; return _(modules[module]); } /* Get the module/panel label id for the given module enum value. * * On success, a string containing the label id is returned. */ const char * module_to_id (GModule module) { static const char *const modules[] = { VISITORS_ID, REQUESTS_ID, REQUESTS_STATIC_ID, NOT_FOUND_ID, HOSTS_ID, OS_ID, BROWSERS_ID, VISIT_TIMES_ID, VIRTUAL_HOSTS_ID, REFERRERS_ID, REFERRING_SITES_ID, KEYPHRASES_ID, STATUS_CODES_ID, REMOTE_USER_ID, CACHE_STATUS_ID, #ifdef HAVE_GEOLOCATION GEO_LOCATION_ID, ASN_ID, #endif MIME_TYPE_ID, TLS_TYPE_ID, }; return _(modules[module]); } /* Get the module/panel label header for the given module enum value. * * On success, a string containing the label header is returned. */ const char * module_to_head (GModule module) { static const char *modules[] = { VISITORS_HEAD, REQUESTS_HEAD, REQUESTS_STATIC_HEAD, NOT_FOUND_HEAD, HOSTS_HEAD, OS_HEAD, BROWSERS_HEAD, VISIT_TIMES_HEAD, VIRTUAL_HOSTS_HEAD, REFERRERS_HEAD, REFERRING_SITES_HEAD, KEYPHRASES_HEAD, STATUS_CODES_HEAD, REMOTE_USER_HEAD, CACHE_STATUS_HEAD, #ifdef HAVE_GEOLOCATION GEO_LOCATION_HEAD, ASN_HEAD, #endif MIME_TYPE_HEAD, TLS_TYPE_HEAD, }; if (!conf.ignore_crawlers) modules[VISITORS] = VISITORS_HEAD_BOTS; return _(modules[module]); } /* Get the module/panel label description for the given module enum * value. * * On success, a string containing the label description is returned. */ const char * module_to_desc (GModule module) { static const char *const modules[] = { VISITORS_DESC, REQUESTS_DESC, REQUESTS_STATIC_DESC, NOT_FOUND_DESC, HOSTS_DESC, OS_DESC, BROWSERS_DESC, VISIT_TIMES_DESC, VIRTUAL_HOSTS_DESC, REFERRERS_DESC, REFERRING_SITES_DESC, KEYPHRASES_DESC, STATUS_CODES_DESC, REMOTE_USER_DESC, CACHE_STATUS_DESC, #ifdef HAVE_GEOLOCATION GEO_LOCATION_DESC, ASN_DESC, #endif MIME_TYPE_DESC, TLS_TYPE_DESC, }; return _(modules[module]); } /* Rerender the header window to reflect active module. */ void update_active_module (WINDOW *header_win, GModule current) { GColors *color = get_color (COLOR_ACTIVE_LABEL); const char *module = module_to_label (current); int col = getmaxx (stdscr); char *lbl = xmalloc (snprintf (NULL, 0, T_ACTIVE_PANEL, module) + 1); sprintf (lbl, T_ACTIVE_PANEL, module); wmove (header_win, 0, 30); wattron (header_win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (header_win, 0, col - strlen (lbl) - 1, "%s", lbl); wattroff (header_win, color->attr | COLOR_PAIR (color->pair->idx)); wrefresh (header_win); free (lbl); } /* Print out (terminal) an overall field label. e.g., 'Processed Time' */ static void render_overall_field (WINDOW *win, const char *s, int y, int x, GColors *color) { wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, x, "%s", s); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } /* Print out (terminal) an overall field value. e.g., '120 secs' */ static void render_overall_value (WINDOW *win, const char *s, int y, int x, GColors *color) { wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, x, "%s", s); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } /* Convert the number of excluded ips to a string. * * On success, the number of excluded ips as a string is returned. */ static char * get_str_excluded_ips (void) { return u642str (ht_get_excluded_ips (), 0); } /* Convert the number of failed requests to a string. * * On success, the number of failed requests as a string is returned. */ static char * get_str_failed_reqs (void) { return u642str (ht_get_invalid (), 0); } /* Convert the number of processed requests to a string. * * On success, the number of processed requests as a string is returned. */ static char * get_str_processed_reqs (void) { return u642str (ht_get_processed (), 0); } /* Convert the number of valid requests to a string. * * On success, the number of valid requests as a string is returned. */ static char * get_str_valid_reqs (void) { return u642str (ht_sum_valid (), 0); } /* Convert the number of not found requests to a string. * * On success, the number of not found requests as a string is * returned. */ static char * get_str_notfound_reqs (void) { return u642str (ht_get_size_datamap (NOT_FOUND), 0); } /* Convert the number of referrers to a string. * * On success, the number of referrers as a string is returned. */ static char * get_str_ref_reqs (void) { return u642str (ht_get_size_datamap (REFERRERS), 0); } /* Convert the number of requests to a string. * * On success, the number of requests as a string is returned. */ static char * get_str_reqs (void) { return u642str (ht_get_size_datamap (REQUESTS), 0); } /* Convert the number of static requests to a string. * * On success, the number of static requests as a string is returned. */ static char * get_str_static_reqs (void) { return u642str (ht_get_size_datamap (REQUESTS_STATIC), 0); } /* Convert the number of unique visitors to a string. * * On success, the number of unique visitors as a string is returned. */ static char * get_str_visitors (void) { return u642str (ht_get_size_uniqmap (VISITORS), 0); } /* Convert the time taken to process the log to a string. * * On success, the time taken to process the log as a string is * returned. */ static char * get_str_proctime (void) { char *s = NULL; uint32_t secs = ht_get_processing_time (); s = xmalloc (snprintf (NULL, 0, "%us", secs) + 1); sprintf (s, "%us", secs); return s; } /* Get the log file size in a human-readable format. * * On success, the log file size as a string is returned. */ static char * get_str_filesize (void) { return filesize_str (get_log_sizes ()); } /* Get the log file path. * * On success, the log file path as a string is returned. */ static char * get_str_logfile (void) { int col = getmaxx (stdscr), left_padding = 20; return get_log_source_str (col - left_padding); } /* Get the bandwidth in a human-readable format. * * On success, the bandwidth as a string is returned. */ static char * get_str_bandwidth (void) { return filesize_str (ht_sum_bw ()); } /* Get the overall statistics start and end dates. * * On failure, 1 is returned * On success, 0 is returned and an string containing the overall * header is returned. */ int get_start_end_parsing_dates (char **start, char **end, const char *f) { uint32_t *dates = NULL; uint32_t len = 0; const char *sndfmt = "%Y%m%d"; char s[DATE_LEN]; char e[DATE_LEN]; dates = get_sorted_dates (&len); sprintf (s, "%u", dates[0]); sprintf (e, "%u", dates[len - 1]); /* just display the actual dates - no specificity */ *start = get_visitors_date (s, sndfmt, f); *end = get_visitors_date (e, sndfmt, f); free (dates); return 0; } /* Get the overall statistics header (label). * * On success, an string containing the overall header is returned. */ char * get_overall_header (GHolder *h) { const char *head = T_DASH_HEAD; char *hd = NULL, *start = NULL, *end = NULL; if (h->idx == 0 || get_start_end_parsing_dates (&start, &end, "%d/%b/%Y")) return xstrdup (head); hd = xmalloc (snprintf (NULL, 0, "%s (%s - %s)", head, start, end) + 1); sprintf (hd, "%s (%s - %s)", head, start, end); free (end); free (start); return hd; } /* Print out (terminal dashboard) the overall statistics header. */ static void render_overall_header (WINDOW *win, GHolder *h) { char *hd = get_overall_header (h); int col = getmaxx (stdscr); draw_header (win, hd, " %s", 0, 0, col, color_panel_header); free (hd); } /* Render the overall statistics. This will attempt to determine the * right X and Y position given the current values. */ static void render_overall_statistics (WINDOW *win, Field fields[], size_t n) { GColors *color = NULL; int x_field = 2, x_value; size_t i, j, k, max_field = 0, max_value, mod_val, y; for (i = 0, k = 0, y = 2; i < n; i++) { /* new line every OVERALL_NUM_COLS */ mod_val = k % OVERALL_NUM_COLS; /* reset position & length and increment row */ if (k > 0 && mod_val == 0) { max_field = 0; x_field = 2; y++; } /* x pos = max length of field */ x_field += max_field; color = (*fields[i].colorlbl) (); render_overall_field (win, fields[i].field, y, x_field, color); /* get max length of field in the same column */ max_field = 0; for (j = 0; j < n; j++) { size_t len = strlen (fields[j].field); if (j % OVERALL_NUM_COLS == mod_val && len > max_field && !fields[j].oneliner) max_field = len; } /* get max length of value in the same column */ max_value = 0; for (j = 0; j < n; j++) { size_t len = strlen (fields[j].value); if (j % OVERALL_NUM_COLS == mod_val && len > max_value && !fields[j].oneliner) max_value = len; } /* spacers */ x_value = max_field + x_field + 1; max_field += max_value + 2; color = (*fields[i].colorval) (); render_overall_value (win, fields[i].value, y, x_value, color); k += fields[i].oneliner ? OVERALL_NUM_COLS : 1; } } /* The entry point to render the overall statistics and free its data. */ void display_general (WINDOW *win, GHolder *h) { GColors *(*colorlbl) (void) = color_overall_lbls; GColors *(*colorpth) (void) = color_overall_path; GColors *(*colorval) (void) = color_overall_vals; size_t n, i; /* *INDENT-OFF* */ Field fields[] = { {T_REQUESTS , get_str_processed_reqs () , colorlbl , colorval , 0} , {T_UNIQUE_VISITORS , get_str_visitors () , colorlbl , colorval , 0} , {T_UNIQUE_FILES , get_str_reqs () , colorlbl , colorval , 0} , {T_REFERRER , get_str_ref_reqs () , colorlbl , colorval , 0} , {T_VALID , get_str_valid_reqs () , colorlbl , colorval , 0} , {T_GEN_TIME , get_str_proctime () , colorlbl , colorval , 0} , {T_STATIC_FILES , get_str_static_reqs () , colorlbl , colorval , 0} , {T_LOG , get_str_filesize () , colorlbl , colorval , 0} , {T_FAILED , get_str_failed_reqs () , colorlbl , colorval , 0} , {T_EXCLUDE_IP , get_str_excluded_ips () , colorlbl , colorval , 0} , {T_UNIQUE404 , get_str_notfound_reqs () , colorlbl , colorval , 0} , {T_BW , get_str_bandwidth () , colorlbl , colorval , 0} , {T_LOG_PATH , get_str_logfile () , colorlbl , colorpth , 1} }; /* *INDENT-ON* */ werase (win); render_overall_header (win, h); n = ARRAY_SIZE (fields); render_overall_statistics (win, fields, n); for (i = 0; i < n; i++) { free (fields[i].value); } } static char * set_default_string (WINDOW *win, int pos_y, int pos_x, size_t max_width, const char *str) { char *s = xmalloc (max_width + 1), *tmp; size_t len = 0; size_t size_x = 0, size_y = 0; getmaxyx (win, size_y, size_x); (void) size_y; size_x -= 4; /* are we setting a default string */ if (!str) { s[0] = '\0'; return s; } len = MIN (max_width, strlen (str)); memcpy (s, str, len); s[len] = '\0'; /* is the default str length greater than input field? */ if (strlen (s) > size_x) { tmp = xstrdup (&s[0]); tmp[size_x] = '\0'; mvwprintw (win, pos_y, pos_x, "%s", tmp); free (tmp); } else { mvwprintw (win, pos_y, pos_x, "%s", s); } return s; } /* Implement a basic framework to build a field input. * * On success, the inputted string is returned. */ char * input_string (WINDOW *win, int pos_y, int pos_x, size_t max_width, const char *str, int enable_case, int *toggle_case) { char *s = NULL, *tmp; size_t i, c, pos = 0, x = 0, quit = 1, size_x = 0, size_y = 0; getmaxyx (win, size_y, size_x); size_x -= 4; s = set_default_string (win, pos_y, pos_x, max_width, str); if (str) x = pos = 0; if (enable_case) mvwprintw (win, size_y - 2, 1, " %s", CSENSITIVE); wmove (win, pos_y, pos_x + x); wrefresh (win); curs_set (1); while (quit) { c = wgetch (stdscr); switch (c) { case 1: /* ^a */ case 262: /* HOME */ pos = x = 0; break; case 5: case 360: /* END of line */ if (strlen (s) > size_x) { x = size_x; pos = strlen (s) - size_x; } else { pos = 0; x = strlen (s); } break; case 7: /* ^g */ case 27: /* ESC */ pos = x = 0; if (str && *str == '\0') s[0] = '\0'; quit = 0; break; case 9: /* TAB */ if (!enable_case) break; *toggle_case = *toggle_case == 0 ? 1 : 0; if (*toggle_case) mvwprintw (win, size_y - 2, 1, " %s", CISENSITIVE); else if (!*toggle_case) mvwprintw (win, size_y - 2, 1, " %s", CSENSITIVE); break; case 21: /* ^u */ s[0] = '\0'; pos = x = 0; break; case 8: /* xterm-256color */ case 127: case KEY_BACKSPACE: if (pos + x > 0) { memmove (&s[(pos + x) - 1], &s[pos + x], (max_width - (pos + x)) + 1); if (pos <= 0) x--; else pos--; } break; case KEY_LEFT: if (x > 0) x--; else if (pos > 0) pos--; break; case KEY_RIGHT: if ((x + pos) < strlen (s)) { if (x < size_x) x++; else pos++; } break; case 0x0a: case 0x0d: case KEY_ENTER: quit = 0; break; default: if (strlen (s) == max_width) break; if (!isprint ((unsigned char) c)) break; if (strlen (s) == pos) { s[pos + x] = c; s[pos + x + 1] = '\0'; waddch (win, c); } else { memmove (&s[pos + x + 1], &s[pos + x], strlen (&s[pos + x]) + 1); s[pos + x] = c; } if ((x + pos) < max_width) { if (x < size_x) x++; else pos++; } } tmp = xstrdup (&s[pos > 0 ? pos : 0]); tmp[MIN (strlen (tmp), size_x)] = '\0'; for (i = strlen (tmp); i < size_x; i++) mvwprintw (win, pos_y, pos_x + i, "%s", " "); mvwprintw (win, pos_y, pos_x, "%s", tmp); free (tmp); wmove (win, pos_y, pos_x + x); wrefresh (win); } curs_set (0); return s; } /* Add the given user agent value into our array of GAgents. * * On error, 1 is returned. * On success, the user agent is added to the array and 0 is returned. */ static int set_agents (void *val, void *user_data) { GAgents *agents = user_data; GAgentItem *tmp = NULL; char *agent = NULL; int newlen = 0, i; if (!(agent = ht_get_host_agent_val (*(uint32_t *) val))) return 1; if (agents->size - 1 == agents->idx) { newlen = agents->size + 4; if (!(tmp = realloc (agents->items, newlen * sizeof (GAgentItem)))) FATAL ("Unable to realloc agents"); agents->items = tmp; agents->size = newlen; } for (i = 0; i < agents->idx; ++i) { if (strcmp (agent, agents->items[i].agent) == 0) { free (agent); return 0; } } agents->items[agents->idx++].agent = agent; return 0; } /* Iterate over the list of agents */ GAgents * load_host_agents (const char *addr) { GAgents *agents = NULL; GSLList *keys = NULL, *list = NULL; void *data = NULL; uint32_t items = 4, key = djb2 ((const unsigned char *) addr); keys = ht_get_keymap_list_from_key (HOSTS, key); if (!keys) return NULL; agents = new_gagents (items); /* *INDENT-OFF* */ GSLIST_FOREACH (keys, data, { if ((list = ht_get_host_agent_list (HOSTS, (*(uint32_t *) data)))) { list_foreach (list, set_agents, agents); list_remove_nodes (list); } }); /* *INDENT-ON* */ list_remove_nodes (keys); return agents; } /* Fill the given terminal dashboard menu with user agent data. * * On error, the 1 is returned. * On success, 0 is returned. */ static int fill_host_agents_gmenu (GMenu *menu, GAgents *agents) { int i; if (agents == NULL) return 1; menu->items = xcalloc (agents->idx, sizeof (GItem)); for (i = 0; i < agents->idx; ++i) { menu->items[i].name = xstrdup (agents->items[i].agent); menu->items[i].checked = 0; menu->size++; } return 0; } /* Render a list of agents if available for the selected host/IP. */ void load_agent_list (WINDOW *main_win, char *addr) { GMenu *menu; GAgents *agents = NULL; WINDOW *win; char buf[256]; int c, quit = 1, i; int y, x, list_h, list_w, menu_w, menu_h; if (!conf.list_agents) return; getmaxyx (stdscr, y, x); list_h = y / 2; /* list window - height */ list_w = x - 4; /* list window - width */ menu_h = list_h - AGENTS_MENU_Y - 1; /* menu window - height */ menu_w = list_w - AGENTS_MENU_X - AGENTS_MENU_X; /* menu window - width */ win = newwin (list_h, list_w, (y - list_h) / 2, (x - list_w) / 2); keypad (win, TRUE); wborder (win, '|', '|', '-', '-', '+', '+', '+', '+'); /* create a new instance of GMenu and make it selectable */ menu = new_gmenu (win, menu_h, menu_w, AGENTS_MENU_Y, AGENTS_MENU_X); if (!(agents = load_host_agents (addr))) goto out; if (fill_host_agents_gmenu (menu, agents) != 0) goto out; post_gmenu (menu); snprintf (buf, sizeof buf, AGENTSDLG_HEAD, addr); draw_header (win, buf, " %s", 1, 1, list_w - 2, color_panel_header); mvwprintw (win, 2, 2, AGENTSDLG_DESC); wrefresh (win); while (quit) { c = wgetch (stdscr); switch (c) { case KEY_DOWN: gmenu_driver (menu, REQ_DOWN); break; case KEY_UP: gmenu_driver (menu, REQ_UP); break; case KEY_RESIZE: case 'q': quit = 0; break; } wrefresh (win); } touchwin (main_win); close_win (win); win = NULL; wrefresh (main_win); out: /* clean stuff up */ for (i = 0; i < menu->size; ++i) free (menu->items[i].name); if (menu->items) free (menu->items); free (menu); free_agents_array (agents); close_win (win); } /* Render the processing spinner. This runs within its own thread. */ static void ui_spinner (void *ptr_data) { GSpinner *sp = (GSpinner *) ptr_data; GColors *color = NULL; static char const spin_chars[] = "/-\\|"; char buf[SPIN_LBL]; const char *fn = NULL; int i = 0; long long tdiff = 0, psec = 0; time_t begin; struct timespec ts = {.tv_sec = 0,.tv_nsec = SPIN_UPDATE_INTERVAL }; if (sp->curses) color = (*sp->color) (); time (&begin); while (1) { pthread_mutex_lock (&sp->mutex); if (sp->state == SPN_END) { if (!sp->curses && !conf.no_progress) fprintf (stderr, "\n"); pthread_mutex_unlock (&sp->mutex); return; } setlocale (LC_NUMERIC, ""); if (conf.no_progress) { snprintf (buf, sizeof buf, SPIN_FMT, sp->label); } else { fn = *sp->filename ? *sp->filename : "restoring"; tdiff = (long long) (time (NULL) - begin); psec = tdiff >= 1 ? **(sp->processed) / tdiff : 0; snprintf (buf, sizeof buf, SPIN_FMTM, sp->label, fn, **(sp->processed), psec); } setlocale (LC_NUMERIC, "POSIX"); if (sp->curses) { /* CURSES */ draw_header (sp->win, buf, " %s", sp->y, sp->x, sp->w, sp->color); /* caret */ wattron (sp->win, COLOR_PAIR (color->pair->idx)); mvwaddch (sp->win, sp->y, sp->spin_x, spin_chars[i++ & 3]); wattroff (sp->win, COLOR_PAIR (color->pair->idx)); wrefresh (sp->win); } else if (!conf.no_progress) { /* STDOUT */ fprintf (stderr, " \033[K%s\r", buf); } pthread_mutex_unlock (&sp->mutex); if (nanosleep (&ts, NULL) == -1 && errno != EINTR) FATAL ("nanosleep: %s", strerror (errno)); } } /* Create the processing spinner's thread */ void ui_spinner_create (GSpinner *spinner) { if (conf.no_parsing_spinner) return; pthread_create (&(spinner->thread), NULL, (void *) &ui_spinner, spinner); pthread_detach (spinner->thread); } /* Initialize processing spinner data. */ void set_curses_spinner (GSpinner *spinner) { int y, x; if (spinner == NULL) return; getmaxyx (stdscr, y, x); spinner->color = color_progress; spinner->curses = 1; spinner->win = stdscr; spinner->x = 0; spinner->w = x; spinner->spin_x = x - 2; spinner->y = y - 1; } /* Determine if we need to lock the mutex. */ void lock_spinner (void) { if (parsing_spinner != NULL && parsing_spinner->state == SPN_RUN) pthread_mutex_lock (&parsing_spinner->mutex); } /* Determine if we need to unlock the mutex. */ void unlock_spinner (void) { if (parsing_spinner != NULL && parsing_spinner->state == SPN_RUN) pthread_mutex_unlock (&parsing_spinner->mutex); } /* Allocate memory for a spinner instance and initialize its data. * * On success, the newly allocated GSpinner is returned. */ GSpinner * new_gspinner (void) { GSpinner *spinner; spinner = xcalloc (1, sizeof (GSpinner)); spinner->label = "Parsing..."; spinner->state = SPN_RUN; spinner->curses = 0; //if (conf.load_from_disk) // conf.no_progress = 1; if (pthread_mutex_init (&(spinner->mutex), NULL)) FATAL ("Failed init thread mutex"); return spinner; } /* A wrapper call to clear the status bar on the config dialog * (terminal output). */ static void clear_confdlg_status_bar (WINDOW *win, int y, int x, int w) { draw_header (win, "", "%s", y, x, w + 1, color_default); } /* Escape a date format string. * * If no conf.date_format is given, NULL is returned. * On success, the newly escaped allocated string is returned. */ static char * get_input_date_format (void) { char *date_format = NULL; if (conf.date_format) date_format = escape_str (conf.date_format); return date_format; } /* Escape a time format string. * * If no conf.time_format is given, NULL is returned. * On success, the newly escaped allocated string is returned. */ static char * get_input_time_format (void) { char *time_format = NULL; if (conf.time_format) time_format = escape_str (conf.time_format); return time_format; } /* Escape a log format string. * * If no conf.log_format is given, NULL is returned. * On success, the newly escaped allocated string is returned. */ static char * get_input_log_format (void) { char *log_format = NULL; if (conf.log_format) log_format = escape_str (conf.log_format); return log_format; } static void draw_formats (WINDOW *win, int w2) { char *date_format = NULL, *log_format = NULL, *time_format = NULL; draw_header (win, CONFDLG_HEAD, " %s", 1, 1, w2, color_panel_header); mvwprintw (win, 2, 2, CONFDLG_KEY_HINTS); /* set log format from config file if available */ draw_header (win, CONFDLG_LOG_FORMAT, " %s", 11, 1, w2, color_panel_header); if ((log_format = get_input_log_format ())) { mvwprintw (win, 12, 2, "%.*s", CONF_MENU_W, log_format); free (log_format); } /* set log format from config file if available */ draw_header (win, CONFDLG_DATE_FORMAT, " %s", 14, 1, w2, color_panel_header); if ((date_format = get_input_date_format ())) { mvwprintw (win, 15, 2, "%.*s", CONF_MENU_W, date_format); free (date_format); } /* set log format from config file if available */ draw_header (win, CONFDLG_TIME_FORMAT, " %s", 17, 1, w2, color_panel_header); if ((time_format = get_input_time_format ())) { mvwprintw (win, 18, 2, "%.*s", CONF_MENU_W, time_format); free (time_format); } } static const char * set_formats (char *date_format, char *log_format, char *time_format) { /* display status bar error messages */ if (!time_format && !conf.time_format) return ERR_FORMAT_NO_TIME_FMT_DLG; if (!date_format && !conf.date_format) return ERR_FORMAT_NO_DATE_FMT_DLG; if (!log_format && !conf.log_format) return ERR_FORMAT_NO_LOG_FMT_DLG; if (time_format) { free (conf.time_format); conf.time_format = unescape_str (time_format); } if (date_format) { free (conf.date_format); conf.date_format = unescape_str (date_format); } if (log_format) { free (conf.log_format); conf.log_format = unescape_str (log_format); } if (is_json_log_format (conf.log_format)) conf.is_json_log_format = 1; set_spec_date_format (); return NULL; } /* Render the help dialog. */ static void load_confdlg_error (WINDOW *parent_win, char **errors, int nerrors) { int c, quit = 1, i = 0; int y, x, h = ERR_WIN_HEIGHT, w = ERR_WIN_WIDTH; WINDOW *win; GMenu *menu; getmaxyx (stdscr, y, x); win = newwin (h, w, (y - h) / 2, (x - w) / 2); keypad (win, TRUE); wborder (win, '|', '|', '-', '-', '+', '+', '+', '+'); /* create a new instance of GMenu and make it selectable */ menu = new_gmenu (win, ERR_MENU_HEIGHT, ERR_MENU_WIDTH, ERR_MENU_Y, ERR_MENU_X); menu->size = nerrors; /* add items to GMenu */ menu->items = (GItem *) xcalloc (nerrors, sizeof (GItem)); for (i = 0; i < nerrors; ++i) { menu->items[i].name = alloc_string (errors[i]); menu->items[i].checked = 0; free (errors[i]); } free (errors); post_gmenu (menu); draw_header (win, ERR_FORMAT_HEADER, " %s", 1, 1, w - 2, color_error); mvwprintw (win, 2, 2, CONFDLG_DESC); wrefresh (win); while (quit) { c = wgetch (stdscr); switch (c) { case KEY_DOWN: gmenu_driver (menu, REQ_DOWN); break; case KEY_UP: gmenu_driver (menu, REQ_UP); break; case KEY_RESIZE: case 'q': quit = 0; break; } wrefresh (win); } /* clean stuff up */ for (i = 0; i < nerrors; ++i) free (menu->items[i].name); free (menu->items); free (menu); touchwin (parent_win); close_win (win); wrefresh (parent_win); } /* Render the config log date/format dialog. * * On error, or if the selected format is invalid, 1 is returned. * On success, 0 is returned. */ int render_confdlg (Logs *logs, GSpinner *spinner) { GMenu *menu; WINDOW *win; const char *log_err = NULL; char *date_format = NULL, *log_format = NULL, *time_format = NULL; char *cstm_log, *cstm_date, *cstm_time; int c, quit = 1, invalid = 1, y, x, h = CONF_WIN_H, w = CONF_WIN_W; int w2 = w - 2; size_t i, n, sel; /* conf dialog menu options */ static const char *const choices[] = { "NCSA Combined Log Format", "NCSA Combined Log Format with Virtual Host", "Common Log Format (CLF)", "Common Log Format (CLF) with Virtual Host", "W3C", "CloudFront (Download Distribution)", "Google Cloud Storage", "AWS Elastic Load Balancing (HTTP/S)", "Squid Native Format", "AWS Simple Storage Service (S3)", "CADDY JSON Structured", "AWS Application Load Balancer", "Traefik CLF flavor" }; n = ARRAY_SIZE (choices); getmaxyx (stdscr, y, x); win = newwin (h, w, (y - h) / 2, (x - w) / 2); keypad (win, TRUE); wborder (win, '|', '|', '-', '-', '+', '+', '+', '+'); /* create a new instance of GMenu and make it selectable */ menu = new_gmenu (win, CONF_MENU_H, CONF_MENU_W, CONF_MENU_Y, CONF_MENU_X); menu->size = n; menu->selectable = 1; /* add items to GMenu */ menu->items = (GItem *) xcalloc (n, sizeof (GItem)); for (i = 0; i < n; ++i) { menu->items[i].name = alloc_string (choices[i]); sel = get_selected_format_idx (); menu->items[i].checked = sel == i ? 1 : 0; } post_gmenu (menu); draw_formats (win, w2); wrefresh (win); while (quit) { c = wgetch (stdscr); switch (c) { case KEY_DOWN: gmenu_driver (menu, REQ_DOWN); clear_confdlg_status_bar (win, 3, 2, CONF_MENU_W); break; case KEY_UP: gmenu_driver (menu, REQ_UP); clear_confdlg_status_bar (win, 3, 2, CONF_MENU_W); break; case 32: /* space */ gmenu_driver (menu, REQ_SEL); clear_confdlg_status_bar (win, 12, 1, CONF_MENU_W); clear_confdlg_status_bar (win, 15, 1, CONF_MENU_W); clear_confdlg_status_bar (win, 18, 1, CONF_MENU_W); if (time_format) free (time_format); if (date_format) free (date_format); if (log_format) free (log_format); for (i = 0; i < n; ++i) { if (menu->items[i].checked != 1) continue; date_format = get_selected_date_str (i); log_format = get_selected_format_str (i); time_format = get_selected_time_str (i); free (set_default_string (win, 12, 2, CONF_MENU_W, log_format)); free (set_default_string (win, 15, 2, CONF_MENU_W, date_format)); free (set_default_string (win, 18, 2, CONF_MENU_W, time_format)); break; } break; case 99: /* c */ /* clear top status bar */ clear_confdlg_status_bar (win, 3, 2, CONF_MENU_W); wmove (win, 12, 2); /* get input string */ if (!log_format) log_format = get_input_log_format (); cstm_log = input_string (win, 12, 2, CONF_MAX_LEN_DLG, log_format, 0, 0); if (cstm_log != NULL && *cstm_log != '\0') { if (log_format) free (log_format); log_format = alloc_string (cstm_log); free (cstm_log); } /* did not set an input string */ else { if (cstm_log) free (cstm_log); if (log_format) { free (log_format); log_format = NULL; } } break; case 100: /* d */ /* clear top status bar */ clear_confdlg_status_bar (win, 3, 2, CONF_MENU_W); wmove (win, 15, 0); /* get input string */ if (!date_format) date_format = get_input_date_format (); cstm_date = input_string (win, 15, 2, 14, date_format, 0, 0); if (cstm_date != NULL && *cstm_date != '\0') { if (date_format) free (date_format); date_format = alloc_string (cstm_date); free (cstm_date); } /* did not set an input string */ else { if (cstm_date) free (cstm_date); if (date_format) { free (date_format); date_format = NULL; } } break; case 116: /* t */ /* clear top status bar */ clear_confdlg_status_bar (win, 3, 2, CONF_MENU_W); wmove (win, 15, 0); /* get input string */ if (!time_format) time_format = get_input_time_format (); cstm_time = input_string (win, 18, 2, 14, time_format, 0, 0); if (cstm_time != NULL && *cstm_time != '\0') { if (time_format) free (time_format); time_format = alloc_string (cstm_time); free (cstm_time); } /* did not set an input string */ else { if (cstm_time) free (cstm_time); if (time_format) { free (time_format); time_format = NULL; } } break; case 274: /* F10 */ case 0x0a: case 0x0d: case KEY_ENTER: if ((log_err = set_formats (date_format, log_format, time_format))) draw_header (win, log_err, " %s", 3, 2, CONF_MENU_W, color_error); if (!log_err) { char **errors = NULL; int nerrors = 0; /* test log against selected settings */ if ((errors = test_format (logs, &nerrors))) { invalid = 1; load_confdlg_error (win, errors, nerrors); } /* valid data, reset glog & start parsing */ else { reset_struct (logs); /* start spinner thread */ spinner->win = win; spinner->y = 3; spinner->x = 2; spinner->spin_x = CONF_MENU_W; spinner->w = CONF_MENU_W; spinner->color = color_progress; ui_spinner_create (spinner); invalid = 0; quit = 0; } } break; case KEY_RESIZE: case 'q': quit = 0; break; } pthread_mutex_lock (&spinner->mutex); wrefresh (win); pthread_mutex_unlock (&spinner->mutex); } free (time_format); free (date_format); free (log_format); /* clean stuff up */ for (i = 0; i < n; ++i) free (menu->items[i].name); free (menu->items); free (menu); return invalid ? 1 : 0; } /* Given the name of the selected scheme, set it under our config * options. */ static void scheme_chosen (const char *name) { int force = 0; free_color_lists (); if (strcmp ("Green", name) == 0) { conf.color_scheme = STD_GREEN; force = 1; } else if (strcmp ("Monochrome", name) == 0) { conf.color_scheme = MONOCHROME; force = 1; } else if (strcmp ("Monokai", name) == 0) { conf.color_scheme = MONOKAI; force = 1; } else if (strcmp ("Custom Scheme", name) == 0) { force = 0; } init_colors (force); } static const char ** get_color_schemes (size_t *size) { const char *choices[] = { "Monokai", "Monochrome", "Green", "Custom Scheme" }; int i, j, n = ARRAY_SIZE (choices); const char **opts = xmalloc (sizeof (char *) * n); for (i = 0, j = 0; i < n; ++i) { if (!conf.color_idx && !strcmp ("Custom Scheme", choices[i])) continue; if (COLORS < 256 && !strcmp ("Monokai", choices[i])) continue; opts[j++] = choices[i]; } *size = j; return opts; } /* Render the schemes dialog. */ void load_schemes_win (WINDOW *main_win) { GMenu *menu; WINDOW *win; int c, quit = 1; size_t i, n = 0; int y, x, h = SCHEME_WIN_H, w = SCHEME_WIN_W; int w2 = w - 2; const char **choices = get_color_schemes (&n); getmaxyx (stdscr, y, x); win = newwin (h, w, (y - h) / 2, (x - w) / 2); keypad (win, TRUE); wborder (win, '|', '|', '-', '-', '+', '+', '+', '+'); /* create a new instance of GMenu and make it selectable */ menu = new_gmenu (win, SCHEME_MENU_H, SCHEME_MENU_W, SCHEME_MENU_Y, SCHEME_MENU_X); /* remove custom color option if no custom scheme used */ menu->size = n; /* add items to GMenu */ menu->items = (GItem *) xcalloc (n, sizeof (GItem)); for (i = 0; i < n; ++i) { menu->items[i].name = alloc_string (choices[i]); menu->items[i].checked = 0; } post_gmenu (menu); draw_header (win, SCHEMEDLG_HEAD, " %s", 1, 1, w2, color_panel_header); mvwprintw (win, 2, 2, SCHEMEDLG_DESC); wrefresh (win); while (quit) { c = wgetch (stdscr); switch (c) { case KEY_DOWN: gmenu_driver (menu, REQ_DOWN); break; case KEY_UP: gmenu_driver (menu, REQ_UP); break; case 32: case 0x0a: case 0x0d: case KEY_ENTER: gmenu_driver (menu, REQ_SEL); for (i = 0; i < n; ++i) { if (menu->items[i].checked != 1) continue; scheme_chosen (choices[i]); break; } quit = 0; break; case KEY_RESIZE: case 'q': quit = 0; break; } wrefresh (win); } /* clean stuff up */ for (i = 0; i < n; ++i) free (menu->items[i].name); free (menu->items); free (menu); free (choices); touchwin (main_win); close_win (win); wrefresh (main_win); } /* Render the sort dialog. */ void load_sort_win (WINDOW *main_win, GModule module, GSort *sort) { GMenu *menu; WINDOW *win; GSortField opts[SORT_MAX_OPTS]; int c, quit = 1; int i = 0, k, n = 0; int y, x, h = SORT_WIN_H, w = SORT_WIN_W; int w2 = w - 2; getmaxyx (stdscr, y, x); /* determine amount of sort choices */ for (i = 0, k = 0; -1 != sort_choices[module][i]; i++) { GSortField field = sort_choices[module][i]; if (SORT_BY_CUMTS == field && !conf.serve_usecs) continue; else if (SORT_BY_MAXTS == field && !conf.serve_usecs) continue; else if (SORT_BY_AVGTS == field && !conf.serve_usecs) continue; else if (SORT_BY_BW == field && !conf.bandwidth) continue; else if (SORT_BY_PROT == field && !conf.append_protocol) continue; else if (SORT_BY_MTHD == field && !conf.append_method) continue; opts[k++] = field; n++; } win = newwin (h, w, (y - h) / 2, (x - w) / 2); keypad (win, TRUE); wborder (win, '|', '|', '-', '-', '+', '+', '+', '+'); /* create a new instance of GMenu and make it selectable */ menu = new_gmenu (win, SORT_MENU_H, SORT_MENU_W, SORT_MENU_Y, SORT_MENU_X); menu->size = n; menu->selectable = 1; /* add items to GMenu */ menu->items = (GItem *) xcalloc (n, sizeof (GItem)); /* set choices, checked option and index */ for (i = 0; i < n; ++i) { GSortField field = sort_choices[module][opts[i]]; if (SORT_BY_HITS == field) { menu->items[i].name = alloc_string (MTRC_HITS_LBL); if (sort->field == SORT_BY_HITS) { menu->items[i].checked = 1; menu->idx = i; } } else if (SORT_BY_VISITORS == field) { menu->items[i].name = alloc_string (MTRC_VISITORS_LBL); if (sort->field == SORT_BY_VISITORS) { menu->items[i].checked = 1; menu->idx = i; } } else if (SORT_BY_DATA == field) { menu->items[i].name = alloc_string (MTRC_DATA_LBL); if (sort->field == SORT_BY_DATA) { menu->items[i].checked = 1; menu->idx = i; } } else if (SORT_BY_BW == field) { menu->items[i].name = alloc_string (MTRC_BW_LBL); if (sort->field == SORT_BY_BW) { menu->items[i].checked = 1; menu->idx = i; } } else if (SORT_BY_AVGTS == field) { menu->items[i].name = alloc_string (MTRC_AVGTS_LBL); if (sort->field == SORT_BY_AVGTS) { menu->items[i].checked = 1; menu->idx = i; } } else if (SORT_BY_CUMTS == field) { menu->items[i].name = alloc_string (MTRC_CUMTS_LBL); if (sort->field == SORT_BY_CUMTS) { menu->items[i].checked = 1; menu->idx = i; } } else if (SORT_BY_MAXTS == field) { menu->items[i].name = alloc_string (MTRC_MAXTS_LBL); if (sort->field == SORT_BY_MAXTS) { menu->items[i].checked = 1; menu->idx = i; } } else if (SORT_BY_PROT == field) { menu->items[i].name = alloc_string (MTRC_PROTOCOLS_LBL); if (sort->field == SORT_BY_PROT) { menu->items[i].checked = 1; menu->idx = i; } } else if (SORT_BY_MTHD == field) { menu->items[i].name = alloc_string (MTRC_METHODS_LBL); if (sort->field == SORT_BY_MTHD) { menu->items[i].checked = 1; menu->idx = i; } } } post_gmenu (menu); draw_header (win, SORTDLG_HEAD, " %s", 1, 1, w2, color_panel_header); mvwprintw (win, 2, 2, SORTDLG_DESC); if (sort->sort == SORT_ASC) mvwprintw (win, SORT_WIN_H - 2, 1, " %s", SORT_ASC_SEL); else mvwprintw (win, SORT_WIN_H - 2, 1, " %s", SORT_DESC_SEL); wrefresh (win); while (quit) { c = wgetch (stdscr); switch (c) { case KEY_DOWN: gmenu_driver (menu, REQ_DOWN); break; case KEY_UP: gmenu_driver (menu, REQ_UP); break; case 9: /* TAB */ if (sort->sort == SORT_ASC) { /* ascending */ sort->sort = SORT_DESC; mvwprintw (win, SORT_WIN_H - 2, 1, " %s", SORT_DESC_SEL); } else { /* descending */ sort->sort = SORT_ASC; mvwprintw (win, SORT_WIN_H - 2, 1, " %s", SORT_ASC_SEL); } break; case 32: case 0x0a: case 0x0d: case KEY_ENTER: gmenu_driver (menu, REQ_SEL); for (i = 0; i < n; ++i) { if (menu->items[i].checked != 1) continue; if (strcmp ("Hits", menu->items[i].name) == 0) sort->field = SORT_BY_HITS; else if (strcmp ("Visitors", menu->items[i].name) == 0) sort->field = SORT_BY_VISITORS; else if (strcmp ("Data", menu->items[i].name) == 0) sort->field = SORT_BY_DATA; else if (strcmp ("Tx. Amount", menu->items[i].name) == 0) sort->field = SORT_BY_BW; else if (strcmp ("Avg. T.S.", menu->items[i].name) == 0) sort->field = SORT_BY_AVGTS; else if (strcmp ("Cum. T.S.", menu->items[i].name) == 0) sort->field = SORT_BY_CUMTS; else if (strcmp ("Max. T.S.", menu->items[i].name) == 0) sort->field = SORT_BY_MAXTS; else if (strcmp ("Protocol", menu->items[i].name) == 0) sort->field = SORT_BY_PROT; else if (strcmp ("Method", menu->items[i].name) == 0) sort->field = SORT_BY_MTHD; quit = 0; break; } break; case KEY_RESIZE: case 'q': quit = 0; break; } wrefresh (win); } /* clean stuff up */ for (i = 0; i < n; ++i) free (menu->items[i].name); free (menu->items); free (menu); touchwin (main_win); close_win (win); wrefresh (main_win); } /* Help menu data (F1/h). */ static const char *const help_main[] = { "Copyright (C) 2009-2024 by Gerardo Orellana", "https://goaccess.io - <hello@goaccess.io>", "Released under the MIT License.", "", "See `man` page for more details", "", "GoAccess is an open source real-time web log analyzer and", "interactive viewer that runs in a terminal in *nix systems.", "It provides fast and valuable HTTP statistics for system", "administrators that require a visual server report on the", "fly.", "", "The data collected based on the parsing of the log is", "divided into different modules. Modules are automatically", "generated and presented to the user.", "", "The main dashboard displays general statistics, top", "visitors, requests, browsers, operating systems,", "hosts, etc.", "", "The user can make use of the following keys:", " ^F1^ or ^h^ Main help", " ^F5^ Redraw [main window]", " ^q^ Quit the program, current window or module", " ^o^ or ^ENTER^ Expand selected module", " ^[Shift]0-9^ Set selected module to active", " ^Up^ arrow Scroll up main dashboard", " ^Down^ arrow Scroll down main dashboard", " ^j^ Scroll down within expanded module", " ^k^ Scroll up within expanded module", " ^c^ Set or change scheme color", " ^CTRL^ + ^f^ Scroll forward one screen within", " active module", " ^CTRL^ + ^b^ Scroll backward one screen within", " active module", " ^TAB^ Iterate modules (forward)", " ^SHIFT^ + ^TAB^ Iterate modules (backward)", " ^s^ Sort options for current module", " ^/^ Search across all modules", " ^n^ Find position of the next occurrence", " ^g^ Move to the first item or top of screen", " ^G^ Move to the last item or bottom of screen", "", "Examples can be found by running `man goaccess`.", "", "If you believe you have found a bug, please drop me", "an email with details.", "", "Feedback? Just shoot me an email to:", "hello@goaccess.io", }; /* Render the help dialog. */ void load_help_popup (WINDOW *main_win) { int c, quit = 1; size_t i, n; int y, x, h = HELP_WIN_HEIGHT, w = HELP_WIN_WIDTH; int w2 = w - 2; WINDOW *win; GMenu *menu; n = ARRAY_SIZE (help_main); getmaxyx (stdscr, y, x); win = newwin (h, w, (y - h) / 2, (x - w) / 2); keypad (win, TRUE); wborder (win, '|', '|', '-', '-', '+', '+', '+', '+'); /* create a new instance of GMenu and make it selectable */ menu = new_gmenu (win, HELP_MENU_HEIGHT, HELP_MENU_WIDTH, HELP_MENU_Y, HELP_MENU_X); menu->size = n; /* add items to GMenu */ menu->items = (GItem *) xcalloc (n, sizeof (GItem)); for (i = 0; i < n; ++i) { menu->items[i].name = alloc_string (help_main[i]); menu->items[i].checked = 0; } post_gmenu (menu); draw_header (win, HELPDLG_HEAD, " %s", 1, 1, w2, color_panel_header); mvwprintw (win, 2, 2, HELPDLG_DESC); wrefresh (win); while (quit) { c = wgetch (stdscr); switch (c) { case KEY_DOWN: gmenu_driver (menu, REQ_DOWN); break; case KEY_UP: gmenu_driver (menu, REQ_UP); break; case KEY_RESIZE: case 'q': quit = 0; break; } wrefresh (win); } /* clean stuff up */ for (i = 0; i < n; ++i) free (menu->items[i].name); free (menu->items); free (menu); touchwin (main_win); close_win (win); wrefresh (main_win); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/util.c���������������������������������������������������������������������������0000644�0001750�0001730�00000072531�14624731651�010723� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * util.c -- a set of handy functions to help parsing * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #define _GNU_SOURCE #define _DEFAULT_SOURCE #include <arpa/inet.h> #include <ctype.h> #include <errno.h> #include <stdio.h> #include <stddef.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <time.h> #include <inttypes.h> #include <regex.h> #include <pthread.h> #include <netinet/in.h> #include <sys/socket.h> #include "util.h" #include "error.h" #include "labels.h" #include "xmalloc.h" pthread_mutex_t tz_mutex = PTHREAD_MUTEX_INITIALIZER; /* HTTP status codes categories */ static const char *const code_type[] = { STATUS_CODE_0XX, STATUS_CODE_1XX, STATUS_CODE_2XX, STATUS_CODE_3XX, STATUS_CODE_4XX, STATUS_CODE_5XX, }; /* HTTP status codes */ static const char *const codes[600] = { [0] = STATUS_CODE_0, [100] = STATUS_CODE_100, STATUS_CODE_101, [200] = STATUS_CODE_200, STATUS_CODE_201, STATUS_CODE_202, STATUS_CODE_203, STATUS_CODE_204, [205] = STATUS_CODE_205, STATUS_CODE_206, STATUS_CODE_207, STATUS_CODE_208, [218] = STATUS_CODE_218, [300] = STATUS_CODE_300, STATUS_CODE_301, STATUS_CODE_302, STATUS_CODE_303, STATUS_CODE_304, [305] = STATUS_CODE_305, NULL, STATUS_CODE_307, STATUS_CODE_308, [400] = STATUS_CODE_400, STATUS_CODE_401, STATUS_CODE_402, STATUS_CODE_403, STATUS_CODE_404, [405] = STATUS_CODE_405, STATUS_CODE_406, STATUS_CODE_407, STATUS_CODE_408, STATUS_CODE_409, [410] = STATUS_CODE_410, STATUS_CODE_411, STATUS_CODE_412, STATUS_CODE_413, STATUS_CODE_414, [415] = STATUS_CODE_415, STATUS_CODE_416, STATUS_CODE_417, STATUS_CODE_418, STATUS_CODE_419, [420] = STATUS_CODE_420, STATUS_CODE_421, STATUS_CODE_422, STATUS_CODE_423, STATUS_CODE_424, [425] = NULL, STATUS_CODE_426, NULL, STATUS_CODE_428, STATUS_CODE_429, STATUS_CODE_430, [431] = STATUS_CODE_431, [440] = STATUS_CODE_440, [444] = STATUS_CODE_444, [449] = STATUS_CODE_449, [450] = STATUS_CODE_450, [451] = STATUS_CODE_451, [460] = STATUS_CODE_460, STATUS_CODE_463, STATUS_CODE_464, [494] = STATUS_CODE_494, [495] = STATUS_CODE_495, STATUS_CODE_496, STATUS_CODE_497, STATUS_CODE_498, STATUS_CODE_499, [500] = STATUS_CODE_500, STATUS_CODE_501, STATUS_CODE_502, STATUS_CODE_503, STATUS_CODE_504, [505] = STATUS_CODE_505, [509] = STATUS_CODE_509, [520] = STATUS_CODE_520, STATUS_CODE_521, STATUS_CODE_522, STATUS_CODE_523, STATUS_CODE_524, STATUS_CODE_525, STATUS_CODE_526, STATUS_CODE_527, STATUS_CODE_529, [530] = STATUS_CODE_530, [540] = STATUS_CODE_540, [561] = STATUS_CODE_561, [598] = STATUS_CODE_598, STATUS_CODE_599, }; /* Return part of a string * * On error NULL is returned. * On success the extracted part of string is returned */ char * substring (const char *str, int begin, int len) { char *buffer; if (str == NULL) return NULL; if (begin < 0) begin = strlen (str) + begin; if (begin < 0) begin = 0; if (len < 0) len = 0; if (((size_t) begin) > strlen (str)) begin = strlen (str); if (((size_t) len) > strlen (&str[begin])) len = strlen (&str[begin]); if ((buffer = xmalloc (len + 1)) == NULL) return NULL; memcpy (buffer, &(str[begin]), len); buffer[len] = '\0'; return buffer; } /* A pointer to the allocated memory of the new string * * On success, a pointer to a new string is returned */ char * alloc_string (const char *str) { char *new = xmalloc (strlen (str) + 1); strcpy (new, str); return new; } /* A wrapper function to copy the first num characters of source to * destination. */ void xstrncpy (char *dest, const char *source, const size_t dest_size) { strncpy (dest, source, dest_size); if (dest_size > 0) { dest[dest_size - 1] = '\0'; } else { dest[0] = '\0'; } } /* A random string generator. */ void genstr (char *dest, size_t len) { char set[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (; len > 0; --len) *dest++ = set[rand () % (sizeof (set) - 1)]; *dest = '\0'; } /* Count the number of matches on the string `s1` given a character `c` * * If the character is not found, 0 is returned * On success, the number of characters found */ int count_matches (const char *s1, char c) { const char *ptr = s1; int n = 0; do { if (*ptr == c) n++; } while (*(ptr++)); return n; } /* Simple but efficient uint32_t hashing. */ #if defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 4) __attribute__((no_sanitize ("unsigned-integer-overflow"))) #if (__clang_major__ >= 12) __attribute__((no_sanitize ("unsigned-shift-base"))) #endif #endif uint32_t djb2 (const unsigned char *str) { uint32_t hash = 5381; int c; while ((c = *str++)) hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ return hash; } /* String matching where one string contains wildcard characters. * * If no match found, 1 is returned. * If match found, 0 is returned. */ static int wc_match (const char *wc, char *str) { while (*wc && *str) { if (*wc == '*') { while (*wc && *wc == '*') wc++; if (!*wc) return 1; while (*str && *str != *wc) str++; } else if (*wc == '?' || *wc == *str) { wc++; str++; } else { break; } } if (!*wc && !*str) return 1; return 0; } /** * Extracts the hostname part from a given URL. * * On error, NULL is returned. * On success, a dynamically allocated string containing the hostname is returned. */ static char * extract_hostname (const char *url) { const char *start, *end; char *hostname = NULL; start = strstr (url, "://"); if (start != NULL) { start += 3; } else { start = url; } end = strchr (start, '/'); if (end == NULL) { /* no path, use the entire string */ end = start + strlen (start); } hostname = xmalloc (end - start + 1); strncpy (hostname, start, end - start); hostname[end - start] = '\0'; return hostname; } /* Generic routine to extract all groups from a string given a POSIX regex. * * If no match found or error, NULL is returned. * If match found, a string is returned. */ char * regex_extract_string (const char *str, const char *regex, int max_groups, char const **err) { char *copy = NULL, *dest = NULL; int i, ret = 0; regex_t re; regmatch_t groups[max_groups]; if (str == NULL || *str == '\0') { *err = "Invalid string."; return NULL; } if (regcomp (&re, regex, REG_EXTENDED)) { *err = "Unable to compile regular expression upon extraction"; return NULL; } ret = regexec (&re, str, max_groups, groups, 0); if (ret == REG_NOMATCH) { *err = "Unable to match regular expression extraction."; goto out; } if (ret != 0) { *err = "Error while matching regular expression extraction."; goto out; } dest = xstrdup (""); for (i = 0; i < max_groups; ++i) { if (groups[i].rm_so == -1) break; copy = xstrdup (str); copy[groups[i].rm_eo] = 0; append_str (&dest, copy + groups[i].rm_so); free (copy); } out: regfree (&re); return ret == 0 ? dest : NULL; } static int handle_referer (const char *host, const char **referers, int referer_idx) { char *needle = NULL, *hostname = NULL; int i, ignore = 0; if (referer_idx == 0) return 0; if (host == NULL || *host == '\0') return 0; needle = xstrdup (host); for (i = 0; i < referer_idx; ++i) { if (referers[i] == NULL || *referers[i] == '\0') continue; if (strchr (referers[i], '*') != NULL || strchr (referers[i], '?') != NULL) { if (wc_match (referers[i], needle)) { ignore = 1; goto out; } } else { hostname = extract_hostname (host); if (strcmp (referers[i], hostname) == 0) { ignore = 1; free (hostname); goto out; } free (hostname); } } out: free (needle); return ignore; } /* Determine if the given host needs to be ignored given the list of * referrers to ignore. * * On error, or the referrer is not found, 0 is returned * On success, or if the host needs to be ignored, 1 is returned */ int ignore_referer (const char *host) { return handle_referer (host, conf.ignore_referers, conf.ignore_referer_idx); } /* Determine if the given host needs to be hidden given the list of * referrers to hide. * * On error, or the referrer is not found, 0 is returned * On success, or if the host needs to be ignored, 1 is returned */ int hide_referer (const char *host) { return handle_referer (host, conf.hide_referers, conf.hide_referer_idx); } /* Determine if the given ip is within a range of IPs. * * On error, or not within the range, 0 is returned * On success, or if within the range, 1 is returned */ static int within_range (const char *ip, const char *start, const char *end) { struct in6_addr addr6, start6, end6; struct in_addr addr4, start4, end4; if (start == NULL || *start == '\0') return 0; if (end == NULL || *end == '\0') return 0; if (ip == NULL || *ip == '\0') return 0; /* IPv4 */ if (1 == inet_pton (AF_INET, ip, &addr4)) { if (1 != inet_pton (AF_INET, start, &start4)) return 0; if (1 != inet_pton (AF_INET, end, &end4)) return 0; if (memcmp (&addr4, &start4, sizeof (addr4)) >= 0 && memcmp (&addr4, &end4, sizeof (addr4)) <= 0) return 1; } /* IPv6 */ else if (1 == inet_pton (AF_INET6, ip, &addr6)) { if (1 != inet_pton (AF_INET6, start, &start6)) return 0; if (1 != inet_pton (AF_INET6, end, &end6)) return 0; if (memcmp (&addr6, &start6, sizeof (addr6)) >= 0 && memcmp (&addr6, &end6, sizeof (addr6)) <= 0) return 1; } return 0; } /* Determine if the given IP needs to be ignored given the list of IPs * to ignore. * * On error, or not within the range, 0 is returned * On success, or if within the range, 1 is returned */ int ip_in_range (const char *ip) { char *start, *end, *dash; int i; for (i = 0; i < conf.ignore_ip_idx; ++i) { end = NULL; if (conf.ignore_ips[i] == NULL || *conf.ignore_ips[i] == '\0') continue; start = xstrdup (conf.ignore_ips[i]); /* split range */ if ((dash = strchr (start, '-')) != NULL) { *dash = '\0'; end = dash + 1; } /* matches single IP */ if (end == NULL) { if (strcmp (ip, start) == 0) { free (start); return 1; } } /* within range */ else { if (within_range (ip, start, end)) { free (start); return 1; } } free (start); } return 0; } /* Searches the array of output formats for the given extension value. * * If not found, 1 is returned. * On success, the given filename is malloc'd and assigned and 0 is * returned. */ int find_output_type (char **filename, const char *ext, int alloc) { int i; const char *dot = NULL; for (i = 0; i < conf.output_format_idx; ++i) { /* for backwards compatibility. i.e., -o json */ if (strcmp (conf.output_formats[i], ext) == 0) return 0; if ((dot = strrchr (conf.output_formats[i], '.')) != NULL && strcmp (dot + 1, ext) == 0) { if (alloc) *filename = xstrdup (conf.output_formats[i]); return 0; } } return 1; } /* Validates the '-o' filename extension for any of: * 1) .csv * 2) .json * 3) .html * * Return Value * 1: valid * 0: invalid * -1: non-existent extension */ int valid_output_type (const char *filename) { const char *ext = NULL; size_t sl; if ((ext = strrchr (filename, '.')) == NULL) return -1; ext++; /* Is extension 3<=len<=4? */ sl = strlen (ext); if (sl < 3 || sl > 4) return 0; if (strcmp ("html", ext) == 0) return 1; if (strcmp ("json", ext) == 0) return 1; if (strcmp ("csv", ext) == 0) return 1; return 0; } /* Get the path to the user config file (ie. HOME/.goaccessrc). * * On error, it returns NULL. * On success, the path of the user config file is returned. */ char * get_user_config (void) { char *user_home = NULL, *path = NULL; size_t len; user_home = getenv ("HOME"); if (user_home == NULL) return NULL; len = snprintf (NULL, 0, "%s/.goaccessrc", user_home) + 1; path = xmalloc (len); snprintf (path, len, "%s/.goaccessrc", user_home); return path; } /* Get the path to the global config file. * * On success, the path of the global config file is returned. */ char * get_global_config (void) { char *path = NULL; size_t len; len = snprintf (NULL, 0, "%s/goaccess/goaccess.conf", SYSCONFDIR) + 1; path = xmalloc (len); snprintf (path, len, "%s/goaccess/goaccess.conf", SYSCONFDIR); return path; } /* A self-checking wrapper to convert_date(). * * On error, a newly malloc'd '---' string is returned. * On success, a malloc'd 'Ymd' date is returned. */ char * get_visitors_date (const char *odate, const char *from, const char *to) { char date[DATE_TIME] = ""; /* Ymd */ memset (date, 0, sizeof *date); /* verify we have a valid date conversion */ if (convert_date (date, odate, from, to, DATE_TIME) == 0) return xstrdup (date); LOG_DEBUG (("invalid date: %s", odate)); return xstrdup ("---"); } static time_t tm2time (const struct tm *src) { struct tm tmp; tmp = *src; return timegm (&tmp) - src->tm_gmtoff; } void set_tz (void) { /* this will persist for the duration of the program but also assumes that all * threads have the same conf.tz_name values */ static char tz[TZ_NAME_LEN] = { 0 }; if (!conf.tz_name) return; if (pthread_mutex_lock (&tz_mutex) != 0) { LOG_DEBUG (("Failed to acquire tz_mutex")); return; } snprintf (tz, TZ_NAME_LEN, "TZ=%s", conf.tz_name); if ((putenv (tz)) != 0) { int old_errno = errno; LOG_DEBUG (("Can't set TZ env variable %s: %s: %d\n", tz, strerror (old_errno), old_errno)); goto release; } tzset (); release: if (pthread_mutex_unlock (&tz_mutex) != 0) { LOG_DEBUG (("Failed to release tz_mutex")); } return; } #if defined(__linux__) && !defined(__GLIBC__) static int parse_tz_specifier (const char *str, const char *fmt, struct tm *tm) { char *fmt_notz = NULL, *p = NULL, *end = NULL, *ptr = NULL; int tz_offset_hours = 0, tz_offset_minutes = 0, neg = 0; /* new format string that excludes %z */ fmt_notz = xstrdup (fmt); p = strstr (fmt_notz, "%z"); if (p != NULL) *p = '\0'; /* parse date/time without timezone offset */ end = strptime (str, fmt_notz, tm); free (fmt_notz); if (end == NULL) return 1; /* bail early if no timezone offset is expected */ if (*end == '\0') { tm->tm_gmtoff = 0; return 0; } /* try to parse timezone offset else bail early, +/-0500 */ if ((*end != '+' && *end != '-') || strlen (end) < 4) return 1; /* divide by 100 to extract the hours part (e.g., 400 / 100 = 4) */ tz_offset_hours = labs (strtol (end, &ptr, 10)) / 100; if (*ptr != '\0') return 1; if (strlen (end) >= 5) { /* minutes part of the offset is present */ tz_offset_minutes = strtol (end + 3, &ptr, 10); if (*ptr != '\0') return 1; } neg = (*end == '-'); tm->tm_gmtoff = (tz_offset_hours * 3600 + tz_offset_minutes * 60) * (neg ? -1 : 1); return 0; } #endif /* Format the given date/time according the given format. * * On error, 1 is returned. * On success, 0 is returned. */ #pragma GCC diagnostic ignored "-Wformat-nonliteral" int str_to_time (const char *str, const char *fmt, struct tm *tm, int tz) { time_t t; char *end = NULL, *sEnd = NULL; unsigned long long ts = 0; int us, ms; #if !defined(__GLIBC__) int se; #endif time_t seconds = 0; if (str == NULL || *str == '\0' || fmt == NULL || *fmt == '\0') return 1; us = strcmp ("%f", fmt) == 0; ms = strcmp ("%*", fmt) == 0; #if !defined(__GLIBC__) se = strcmp ("%s", fmt) == 0; #endif /* check if char string needs to be converted from milli/micro seconds */ /* note that MUSL doesn't have %s under strptime(3) */ #if !defined(__GLIBC__) if (se || us || ms) { #else if (us || ms) { #endif errno = 0; ts = strtoull (str, &sEnd, 10); if (str == sEnd || *sEnd != '\0' || errno == ERANGE) return 1; seconds = (us) ? ts / SECS : ((ms) ? ts / MILS : ts); if (conf.tz_name && tz) set_tz (); /* if GMT needed, gmtime_r instead of localtime_r. */ localtime_r (&seconds, tm); return 0; } #if defined(__linux__) && !defined(__GLIBC__) if (parse_tz_specifier (str, fmt, tm)) return -1; #else end = strptime (str, fmt, tm); if (end == NULL || *end != '\0') return 1; #endif if (!tz || !conf.tz_name) return 0; if ((t = tm2time (tm)) == -1) { LOG_DEBUG (("Can't set time via tm2time() %s: %s\n", str, strerror (errno))); return 0; } set_tz (); localtime_r (&t, tm); return 0; } /* Convert a date from one format to another and store in the given buffer. * * On error, 1 is returned. * On success, 0 is returned. */ int convert_date (char *res, const char *data, const char *from, const char *to, int size) { struct tm tm; memset (&tm, 0, sizeof (tm)); timestamp = time (NULL); localtime_r (×tamp, &now_tm); /* This assumes that the given date is already in the correct timezone. */ if (str_to_time (data, from, &tm, 0) != 0) return 1; /* if not a timestamp, use current year if not passed */ if (!has_timestamp (from) && strpbrk (from, "Yy") == NULL) tm.tm_year = now_tm.tm_year; if (strftime (res, size, to, &tm) <= 0) return 1; return 0; } #pragma GCC diagnostic warning "-Wformat-nonliteral" /* Determine if the given IP is a valid IPv4/IPv6 address. * * On error, 1 is returned. * On success, 0 is returned. */ int invalid_ipaddr (const char *str, int *ipvx) { union { struct sockaddr addr; struct sockaddr_in6 addr6; struct sockaddr_in addr4; } a; (*ipvx) = TYPE_IPINV; if (str == NULL || *str == '\0') return 1; memset (&a, 0, sizeof (a)); if (1 == inet_pton (AF_INET, str, &a.addr4.sin_addr)) { (*ipvx) = TYPE_IPV4; return 0; } else if (1 == inet_pton (AF_INET6, str, &a.addr6.sin6_addr)) { (*ipvx) = TYPE_IPV6; return 0; } return 1; } /* Encode a data key and a unique visitor's key to a new uint64_t key * * ###NOTE: THIS LIMITS THE MAX VALUE OF A DATA TABLE TO uint32_t * WILL NEED TO CHANGE THIS IF WE GO OVER uint32_t */ uint64_t u64encode (uint32_t x, uint32_t y) { return x > y ? (uint32_t) y | ((uint64_t) x << 32) : (uint32_t) x | ((uint64_t) y << 32); } /* Decode a uint64_t number into the original two uint32_t */ void u64decode (uint64_t n, uint32_t *x, uint32_t *y) { *x = (uint64_t) n >> 32; *y = (uint64_t) n & 0xFFFFFFFF; } /* Get information about the filename. * * On error, -1 is returned. * On success, the file size of the given filename. */ off_t file_size (const char *filename) { struct stat st; if (stat (filename, &st) == 0) return st.st_size; LOG_DEBUG (("Can't determine size of %s: %s\n", filename, strerror (errno))); return -1; } /* Determine if the given status code is within the list of status * codes and find out the status type/category. * * If not found, "Unknown" is returned. * On success, the status code type/category is returned. */ const char * verify_status_code_type (int code) { if (code < 0 || code > 599 || code_type[code / 100] == NULL) return "Unknown"; return code_type[code / 100]; } /* Determine if the given status code is within the list of status * codes. * * If not found, "Unknown" is returned. * On success, the status code is returned. */ const char * verify_status_code (int code) { if (code < 0 || code > 599 || code_type[code / 100] == NULL || codes[code] == NULL) return "Unknown"; return codes[code]; } int is_valid_http_status (int code) { return code >= 0 && code <= 599 && code_type[code / 100] != NULL && codes[code] != NULL; } /* Checks if the given string is within the given array. * * If not found, -1 is returned. * If found, the key for needle in the array is returned. */ int str_inarray (const char *s, const char *arr[], int size) { int i; for (i = 0; i < size; i++) { if (strcmp (arr[i], s) == 0) return i; } return -1; } /* Strip whitespace from the beginning of a string. * * On success, a string with whitespace stripped from the beginning of * the string is returned. */ char * ltrim (char *s) { char *begin = s; while (isspace ((unsigned char) *begin)) ++begin; memmove (s, begin, strlen (begin) + 1); return s; } /* Strip whitespace from the end of a string. * * On success, a string with whitespace stripped from the end of the * string is returned. */ char * rtrim (char *s) { char *end = s + strlen (s); while ((end != s) && isspace ((unsigned char) *(end - 1))) --end; *end = '\0'; return s; } /* Strip whitespace from the beginning and end of the string. * * On success, the trimmed string is returned. */ char * trim_str (char *str) { return rtrim (ltrim (str)); } /* Convert the file size in bytes to a human-readable format. * * On error, the original size of the string in bytes is returned. * On success, the file size in a human-readable format is returned. */ char * filesize_str (unsigned long long log_size) { char *size = xmalloc (sizeof (char) * 12); if (log_size >= (1ULL << 50)) snprintf (size, 12, "%.2f PiB", (double) (log_size) / PIB (1ULL)); else if (log_size >= (1ULL << 40)) snprintf (size, 12, "%.2f TiB", (double) (log_size) / TIB (1ULL)); else if (log_size >= (1ULL << 30)) snprintf (size, 12, "%.2f GiB", (double) (log_size) / GIB (1ULL)); else if (log_size >= (1ULL << 20)) snprintf (size, 12, "%.2f MiB", (double) (log_size) / MIB (1ULL)); else if (log_size >= (1ULL << 10)) snprintf (size, 12, "%.2f KiB", (double) (log_size) / KIB (1ULL)); else snprintf (size, 12, "%.1f B", (double) (log_size)); return size; } /* Convert microseconds to a human-readable format. * * On error, a malloc'd string in microseconds is returned. * On success, the time in a human-readable format is returned. */ char * usecs_to_str (unsigned long long usec) { char *size = xmalloc (sizeof (char) * 11); if (usec >= DAY) snprintf (size, 11, "%.2f d", (double) (usec) / DAY); else if (usec >= HOUR) snprintf (size, 11, "%.2f hr", (double) (usec) / HOUR); else if (usec >= MINS) snprintf (size, 11, "%.2f mn", (double) (usec) / MINS); else if (usec >= SECS) snprintf (size, 11, "%.2f s", (double) (usec) / SECS); else if (usec >= MILS) snprintf (size, 11, "%.2f ms", (double) (usec) / MILS); else snprintf (size, 11, "%.2f us", (double) (usec)); return size; } /* Convert the given int to a string with the ability to add some * padding. * * On success, the given number as a string is returned. */ char * int2str (int d, int width) { char *s = xmalloc (snprintf (NULL, 0, "%*d", width, d) + 1); sprintf (s, "%*d", width, d); return s; } /* Convert the given uint32_t to a string with the ability to add some * padding. * * On success, the given number as a string is returned. */ char * u322str (uint32_t d, int width) { char *s = xmalloc (snprintf (NULL, 0, "%*u", width, d) + 1); sprintf (s, "%*u", width, d); return s; } /* Convert the given uint64_t to a string with the ability to add some * padding. * * On success, the given number as a string is returned. */ char * u642str (uint64_t d, int width) { char *s = xmalloc (snprintf (NULL, 0, "%*" PRIu64, width, d) + 1); sprintf (s, "%*" PRIu64, width, d); return s; } /* Convert the given float to a string with the ability to add some * padding. * * On success, the given number as a string is returned. */ char * float2str (float d, int width) { char *s = xmalloc (snprintf (NULL, 0, "%*.2f", width, d) + 1); sprintf (s, "%*.2f", width, d); return s; } int ptr2int (char *ptr) { char *sEnd = NULL; int value = -1; value = strtol (ptr, &sEnd, 10); if (ptr == sEnd || *sEnd != '\0' || errno == ERANGE) { LOG_DEBUG (("Invalid parse of integer value from pointer. \n")); return -1; } return value; } int str2int (const char *date) { char *sEnd = NULL; int d = strtol (date, &sEnd, 10); if (date == sEnd || *sEnd != '\0' || errno == ERANGE) return -1; return d; } /* Determine the length of an integer (number of digits). * * On success, the length of the number is returned. */ int intlen (uint64_t num) { int l = 1; while (num > 9) { l++; num /= 10; } return l; } /* Allocate a new string and fill it with the given character. * * On success, the newly allocated string is returned. */ char * char_repeat (int n, char c) { char *dest = xmalloc (n + 1); memset (dest, c, n); dest[n] = '\0'; return dest; } /* Replace all occurrences of the given char with the replacement * char. * * On error the original string is returned. * On success, a string with the replaced values is returned. */ char * char_replace (char *str, char o, char n) { char *p = str; if (str == NULL || *str == '\0') return str; while ((p = strchr (p, o)) != NULL) *p++ = n; return str; } /* Remove all occurrences of a new line. * * On success, a string with the replaced new lines is returned. */ void strip_newlines (char *str) { char *src, *dst; for (src = dst = str; *src != '\0'; src++) { *dst = *src; if (*dst != '\r' && *dst != '\n') dst++; } *dst = '\0'; } /* Strip blanks from a string. * * On success, a string without whitespace is returned. */ char * deblank (char *str) { char *out = str, *put = str; for (; *str != '\0'; ++str) { if (*str != ' ') *put++ = *str; } *put = '\0'; return out; } /* Make a string uppercase. * * On error the original string is returned. * On success, the uppercased string is returned. */ char * strtoupper (char *str) { char *p = str; if (str == NULL || *str == '\0') return str; while (*p != '\0') { *p = toupper ((unsigned char) *p); p++; } return str; } /* Left-pad a string with n amount of spaces. * * On success, a left-padded string is returned. */ char * left_pad_str (const char *s, int indent) { char *buf = NULL; indent = strlen (s) + indent; buf = xmalloc (snprintf (NULL, 0, "%*s", indent, s) + 1); sprintf (buf, "%*s", indent, s); return buf; } /* Append the source string to destination and reallocates and * updating the destination buffer appropriately. */ size_t append_str (char **dest, const char *src) { size_t curlen = strlen (*dest); size_t srclen = strlen (src); size_t newlen = curlen + srclen; char *str = xrealloc (*dest, newlen + 1); memcpy (str + curlen, src, srclen + 1); *dest = str; return newlen; } /* Escapes the special characters, e.g., '\n', '\r', '\t', '\' * in the string source by inserting a '\' before them. * * On error NULL is returned. * On success the escaped string is returned */ char * escape_str (const char *src) { char *dest, *q; const unsigned char *p; if (src == NULL || *src == '\0') return NULL; p = (const unsigned char *) src; q = dest = xmalloc (strlen (src) * 4 + 1); while (*p) { switch (*p) { case '\\': *q++ = '\\'; *q++ = '\\'; break; case '\n': *q++ = '\\'; *q++ = 'n'; break; case '\r': *q++ = '\\'; *q++ = 'r'; break; case '\t': *q++ = '\\'; *q++ = 't'; break; default: /* not ASCII */ if ((*p < ' ') || (*p >= 0177)) { *q++ = '\\'; *q++ = '0' + (((*p) >> 6) & 07); *q++ = '0' + (((*p) >> 3) & 07); *q++ = '0' + ((*p) & 07); } else *q++ = *p; break; } p++; } *q = 0; return dest; } /* Get an unescaped malloc'd string * * On error NULL is returned. * On success the unescaped string is returned */ char * unescape_str (const char *src) { char *dest, *q; const char *p = src; if (src == NULL || *src == '\0') return NULL; dest = xmalloc (strlen (src) + 1); q = dest; while (*p) { if (*p == '\\') { p++; switch (*p) { case '\0': /* warning... */ goto out; case 'n': *q++ = '\n'; break; case 'r': *q++ = '\r'; break; case 't': *q++ = '\t'; break; default: *q++ = *p; break; } } else *q++ = *p; p++; } out: *q = 0; return dest; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/csv.c����������������������������������������������������������������������������0000644�0001750�0001730�00000021554�14624731651�010540� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * output.c -- output csv to the standard output stream * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #include <ctype.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <inttypes.h> #include "csv.h" #include "error.h" #include "gkhash.h" #include "ui.h" #include "util.h" struct tm now_tm; /* Panel output */ typedef struct GPanel_ { GModule module; void (*render) (FILE * fp, GHolder * h, GPercTotals totals); } GPanel; static void print_csv_data (FILE * fp, GHolder * h, GPercTotals totals); /* *INDENT-OFF* */ /* A function pointer for each panel */ static const GPanel paneling[] = { {VISITORS , print_csv_data} , {REQUESTS , print_csv_data} , {REQUESTS_STATIC , print_csv_data} , {NOT_FOUND , print_csv_data} , {HOSTS , print_csv_data} , {OS , print_csv_data} , {BROWSERS , print_csv_data} , {VISIT_TIMES , print_csv_data} , {VIRTUAL_HOSTS , print_csv_data} , {REFERRERS , print_csv_data} , {REFERRING_SITES , print_csv_data} , {KEYPHRASES , print_csv_data} , {STATUS_CODES , print_csv_data} , {REMOTE_USER , print_csv_data} , {CACHE_STATUS , print_csv_data} , #ifdef HAVE_GEOLOCATION {GEO_LOCATION , print_csv_data} , {ASN , print_csv_data} , #endif {MIME_TYPE , print_csv_data} , {TLS_TYPE , print_csv_data} , }; /* *INDENT-ON* */ /* Get a panel from the GPanel structure given a module. * * On error, or if not found, NULL is returned. * On success, the panel value is returned. */ static const GPanel * panel_lookup (GModule module) { int i, num_panels = ARRAY_SIZE (paneling); for (i = 0; i < num_panels; i++) { if (paneling[i].module == module) return &paneling[i]; } return NULL; } /* Iterate over the string and escape CSV output. */ static void escape_cvs_output (FILE *fp, char *s) { while (*s) { switch (*s) { case '"': fprintf (fp, "\"\""); break; default: fputc (*s, fp); break; } s++; } } /* Output metrics. * * On success, outputs item value. */ static void print_csv_metric_block (FILE *fp, GMetrics *nmetrics) { /* basic metrics */ fprintf (fp, "\"%" PRIu64 "\",", nmetrics->hits); fprintf (fp, "\"%4.2f%%\",", nmetrics->hits_perc); fprintf (fp, "\"%" PRIu64 "\",", nmetrics->visitors); fprintf (fp, "\"%4.2f%%\",", nmetrics->visitors_perc); /* bandwidth */ if (conf.bandwidth) { fprintf (fp, "\"%" PRIu64 "\",", nmetrics->bw.nbw); fprintf (fp, "\"%4.2f%%\",", nmetrics->bw_perc); } /* time served metrics */ if (conf.serve_usecs) { fprintf (fp, "\"%" PRIu64 "\",", nmetrics->avgts.nts); fprintf (fp, "\"%" PRIu64 "\",", nmetrics->cumts.nts); fprintf (fp, "\"%" PRIu64 "\",", nmetrics->maxts.nts); } /* request method */ if (conf.append_method && nmetrics->method) fprintf (fp, "\"%s\"", nmetrics->method); fprintf (fp, ","); /* request protocol */ if (conf.append_protocol && nmetrics->protocol) fprintf (fp, "\"%s\"", nmetrics->protocol); fprintf (fp, ","); /* data field */ fprintf (fp, "\""); escape_cvs_output (fp, nmetrics->data); fprintf (fp, "\"\r\n"); } /* Output a sublist (double linked-list) items for a particular parent node. * * On error, it exits early. * On success, outputs item value. */ static void print_csv_sub_items (FILE *fp, GHolder *h, int idx, GPercTotals totals) { GMetrics *nmetrics; GSubList *sub_list = h->items[idx].sub_list; GSubItem *iter; int i = 0; if (sub_list == NULL) return; for (iter = sub_list->head; iter; iter = iter->next, i++) { set_data_metrics (iter->metrics, &nmetrics, totals); fprintf (fp, "\"%d\",", i); /* idx */ fprintf (fp, "\"%d\",", idx); /* parent idx */ fprintf (fp, "\"%s\",", module_to_id (h->module)); /* output metrics */ print_csv_metric_block (fp, nmetrics); free (nmetrics); } } /* Output first-level items. * * On success, outputs item value. */ static void print_csv_data (FILE *fp, GHolder *h, GPercTotals totals) { GMetrics *nmetrics; int i; for (i = 0; i < h->idx; i++) { set_data_metrics (h->items[i].metrics, &nmetrics, totals); fprintf (fp, "\"%d\",", i); /* idx */ fprintf (fp, ","); /* no parent */ fprintf (fp, "\"%s\",", module_to_id (h->module)); /* output metrics */ print_csv_metric_block (fp, nmetrics); if (h->sub_items_size) print_csv_sub_items (fp, h, i, totals); free (nmetrics); } } #pragma GCC diagnostic ignored "-Wformat-nonliteral" /* Output general statistics information. */ static void print_csv_summary (FILE *fp) { char now[DATE_TIME]; char *source = NULL; const char *fmt; int i = 0; uint64_t total = 0; uint32_t t = 0; generate_time (); strftime (now, DATE_TIME, "%Y-%m-%d %H:%M:%S %z", &now_tm); /* generated date time */ fmt = "\"%d\",,\"%s\",,,,,,,,\"%s\",\"%s\"\r\n"; fprintf (fp, fmt, i++, GENER_ID, now, OVERALL_DATETIME); /* total requests */ fmt = "\"%d\",,\"%s\",,,,,,,,\"%" PRIu64 "\",\"%s\"\r\n"; total = ht_get_processed (); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_REQ); /* valid requests */ fmt = "\"%d\",,\"%s\",,,,,,,,\"%" PRIu64 "\",\"%s\"\r\n"; total = ht_sum_valid (); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_VALID); /* invalid requests */ total = ht_get_invalid (); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_FAILED); /* generated time */ fmt = "\"%d\",,\"%s\",,,,,,,,\"%u\",\"%s\"\r\n"; t = ht_get_processing_time (); fprintf (fp, fmt, i++, GENER_ID, t, OVERALL_GENTIME); /* visitors */ fmt = "\"%d\",,\"%s\",,,,,,,,\"%" PRIu64 "\",\"%s\"\r\n"; total = ht_get_size_uniqmap (VISITORS); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_VISITORS); /* files */ total = ht_get_size_datamap (REQUESTS); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_FILES); /* excluded hits */ total = ht_get_excluded_ips (); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_EXCL_HITS); /* referrers */ total = ht_get_size_datamap (REFERRERS); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_REF); /* not found */ total = ht_get_size_datamap (NOT_FOUND); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_NOTFOUND); /* static files */ total = ht_get_size_datamap (REQUESTS_STATIC); fprintf (fp, fmt, i++, GENER_ID, total, OVERALL_STATIC); /* log size */ fmt = "\"%d\",,\"%s\",,,,,,,,\"%jd\",\"%s\"\r\n"; fprintf (fp, fmt, i++, GENER_ID, (intmax_t) get_log_sizes (), OVERALL_LOGSIZE); /* bandwidth */ fmt = "\"%d\",,\"%s\",,,,,,,,\"%" PRIu64 "\",\"%s\"\r\n"; fprintf (fp, fmt, i++, GENER_ID, ht_sum_bw (), OVERALL_BANDWIDTH); /* log path */ source = get_log_source_str (0); fmt = "\"%d\",,\"%s\",,,,,,,,\"%s\",\"%s\"\r\n"; fprintf (fp, fmt, i++, GENER_ID, source, OVERALL_LOG); free (source); } #pragma GCC diagnostic warning "-Wformat-nonliteral" /* Entry point to generate a csv report writing it to the fp */ void output_csv (GHolder *holder, const char *filename) { GModule module; GPercTotals totals; const GPanel *panel = NULL; size_t idx = 0; FILE *fp; fp = (filename != NULL) ? fopen (filename, "w") : stdout; if (!fp) FATAL ("Unable to open CSV file: %s.", strerror (errno)); if (!conf.no_csv_summary) print_csv_summary (fp); set_module_totals (&totals); FOREACH_MODULE (idx, module_list) { module = module_list[idx]; if (!(panel = panel_lookup (module))) { continue; } panel->render (fp, holder + module, totals); } fclose (fp); } ����������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/persistence.h��������������������������������������������������������������������0000644�0001750�0001730�00000003052�14624731651�012267� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef PERSISTENCE_H_INCLUDED #define PERSISTENCE_H_INCLUDED void restore_data (void); void persist_data (void); void free_persisted_data (void); #endif // for #ifndef PERSISTENCE_H ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/xmalloc.c������������������������������������������������������������������������0000644�0001750�0001730�00000004517�14624731651�011404� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * xmalloc.c -- *alloc functions with error handling * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2022 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <stdio.h> #if !defined __SUNPRO_C #include <stdint.h> #endif #include <stdlib.h> #include <string.h> #include "error.h" #include "xmalloc.h" /* Self-checking wrapper to malloc() */ void * xmalloc (size_t size) { void *ptr; if ((ptr = malloc (size)) == NULL) FATAL ("Unable to allocate memory - failed."); return (ptr); } char * xstrdup (const char *s) { char *ptr; size_t len; len = strlen (s) + 1; ptr = xmalloc (len); strncpy (ptr, s, len); return (ptr); } /* Self-checking wrapper to calloc() */ void * xcalloc (size_t nmemb, size_t size) { void *ptr; if ((ptr = calloc (nmemb, size)) == NULL) FATAL ("Unable to calloc memory - failed."); return (ptr); } /* Self-checking wrapper to realloc() */ void * xrealloc (void *oldptr, size_t size) { void *newptr; if ((newptr = realloc (oldptr, size)) == NULL) FATAL ("Unable to reallocate memory - failed"); return (newptr); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gmenu.c��������������������������������������������������������������������������0000644�0001750�0001730�00000007745�14624731651�011066� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * gmenu.c -- goaccess menus * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "gmenu.h" #include "xmalloc.h" #include "ui.h" /* Allocate memory for a new GMenu instance. * * On success, the newly allocated GMenu is returned . */ GMenu * new_gmenu (WINDOW *parent, int h, int w, int y, int x) { GMenu *menu = xmalloc (sizeof (GMenu)); memset (menu, 0, sizeof *menu); menu->count = 0; menu->idx = 0; menu->multiple = 0; menu->selectable = 0; menu->start = 0; menu->status = 0; menu->h = h; menu->w = w; menu->x = x; menu->y = y; menu->win = derwin (parent, menu->h, menu->w, menu->y, menu->x); return menu; } /* Render actual menu item */ static void draw_menu_item (GMenu *menu, char *s, int x, int y, int w, int checked, GColors *(*func) (void)) { char check, *lbl = NULL; if (menu->selectable) { check = checked ? 'x' : ' '; lbl = xmalloc (snprintf (NULL, 0, "[%c] %s", check, s) + 1); sprintf (lbl, "[%c] %s", check, s); draw_header (menu->win, lbl, "%s", y, x, w, (*func)); free (lbl); } else { draw_header (menu->win, s, "%s", y, x, w, (*func)); } } /* Displays a menu to its associated window. * * On error, 1 is returned. * On success, the newly created menu is added to the window and 0 is * returned. */ int post_gmenu (GMenu *menu) { GColors *(*func) (void); int i = 0, j = 0, start, end, height, total, checked = 0; if (menu == NULL) return 1; werase (menu->win); height = menu->h; start = menu->start; total = menu->size; end = height < total ? start + height : total; for (i = start; i < end; i++, j++) { func = i == menu->idx ? color_selected : color_default; checked = menu->items[i].checked ? 1 : 0; draw_menu_item (menu, menu->items[i].name, 0, j, menu->w, checked, func); } wrefresh (menu->win); return 0; } /* Main work horse of the menu system processing input events */ void gmenu_driver (GMenu *menu, int c) { int i; switch (c) { case REQ_DOWN: if (menu->idx >= menu->size - 1) break; ++menu->idx; if (menu->idx >= menu->h && menu->idx >= menu->start + menu->h) menu->start++; post_gmenu (menu); break; case REQ_UP: if (menu->idx <= 0) break; --menu->idx; if (menu->idx < menu->start) --menu->start; post_gmenu (menu); break; case REQ_SEL: if (!menu->multiple) { for (i = 0; i < menu->size; i++) menu->items[i].checked = 0; } if (menu->items[menu->idx].checked) menu->items[menu->idx].checked = 0; else menu->items[menu->idx].checked = 1; post_gmenu (menu); break; } } ���������������������������goaccess-1.9.3/src/gholder.h������������������������������������������������������������������������0000644�0001750�0001730�00000004210�14624731651�011364� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef GHOLDER_H_INCLUDED #define GHOLDER_H_INCLUDED #define MTRC_ID_COUNTRY 0 #define MTRC_ID_CITY 1 #define MTRC_ID_ASN 2 #define MTRC_ID_HOSTNAME 3 #include "commons.h" #include "sort.h" /* Default Anonymization Levels */ typedef enum GAnonymizeLevels_ { ANONYMIZE_DEFAULT = 1, ANONYMIZE_STRONG, ANONYMIZE_PEDANTIC, } GAnonymizeLevels; /* Function Prototypes */ GHolder *new_gholder (uint32_t size); void *add_hostname_node (void *ptr_holder); void free_holder_by_module (GHolder ** holder, GModule module); void free_holder (GHolder ** holder); void load_holder_data (GRawData * raw_data, GHolder * h, GModule module, GSort sort); void load_host_to_holder (GHolder * h, char *ip); int dup_key_list (void *val, GSLList ** user_data); #endif // for #ifndef GHOLDER_H ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/browsers.h�����������������������������������������������������������������������0000644�0001750�0001730�00000003517�14624731651�011617� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef BROWSERS_H_INCLUDED #define BROWSERS_H_INCLUDED #define BROWSER_TYPE_LEN 13 #define MAX_LINE_BROWSERS 128 #define MAX_CUSTOM_BROWSERS 256 /* Each Browser contains the number of hits and the Browser's type */ typedef struct GBrowser_ { char browser_type[BROWSER_TYPE_LEN]; int hits; } GBrowser; char *verify_browser (char *str, char *browser_type); int is_crawler (const char *agent); void free_browsers_hash (void); void parse_browsers_file (void); #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/geoip1.c�������������������������������������������������������������������������0000644�0001750�0001730�00000040373�14624731651�011131� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * geoip.c -- implementation of GeoIP (legacy) * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #ifdef HAVE_LIBGEOIP #include <GeoIP.h> #include <GeoIPCity.h> #endif #include "geoip1.h" #include "error.h" #include "util.h" static GeoIP **geoips = NULL; static GeoIP *geo_location_data = NULL; static int db_cnt = 0; static int legacy_db = 0; /* Determine if we have a valid geoip resource. * * If the geoip resource is NULL, 0 is returned. * If the geoip resource is valid and malloc'd, 1 is returned. */ int is_geoip_resource (void) { return ((geoips && db_cnt) || (legacy_db && geo_location_data)); } /* Free up GeoIP resources */ void geoip_free (void) { int idx = 0; if (!is_geoip_resource ()) return; for (idx = 0; idx < db_cnt; idx++) GeoIP_delete (geoips[idx]); if (legacy_db) GeoIP_delete (geo_location_data); GeoIP_cleanup (); free (geoips); geoips = NULL; } /* Open the given GeoLocation database and set its charset. * * On error, it aborts. * On success, a new geolocation structure is returned. */ static GeoIP * geoip_open_db (const char *db) { GeoIP *geoip = GeoIP_open (db, GEOIP_MEMORY_CACHE); if (geoip == NULL) return NULL; GeoIP_set_charset (geoip, GEOIP_CHARSET_UTF8); LOG_DEBUG (("Opened legacy GeoIP database: %s\n", db)); return geoip; } static int set_geoip_db_by_type (GeoIP *geoip, GO_GEOIP_DB type) { unsigned char rec = GeoIP_database_edition (geoip); switch (rec) { case GEOIP_ASNUM_EDITION: if (type != TYPE_ASN) break; geo_location_data = geoip; return 0; case GEOIP_COUNTRY_EDITION: case GEOIP_COUNTRY_EDITION_V6: if (type != TYPE_COUNTRY && type != TYPE_CITY) break; geo_location_data = geoip; return 0; case GEOIP_CITY_EDITION_REV0: case GEOIP_CITY_EDITION_REV1: case GEOIP_CITY_EDITION_REV0_V6: case GEOIP_CITY_EDITION_REV1_V6: if (type != TYPE_CITY) break; geo_location_data = geoip; return 0; } return 1; } static int set_conf_by_type (GeoIP *geoip) { unsigned char rec = GeoIP_database_edition (geoip); switch (rec) { case GEOIP_ASNUM_EDITION: conf.has_geoasn = 1; return 0; case GEOIP_COUNTRY_EDITION: case GEOIP_COUNTRY_EDITION_V6: conf.has_geocountry = 1; return 0; case GEOIP_CITY_EDITION_REV0: case GEOIP_CITY_EDITION_REV1: case GEOIP_CITY_EDITION_REV0_V6: case GEOIP_CITY_EDITION_REV1_V6: conf.has_geocountry = conf.has_geocity = 1; return 0; } return 1; } /* Look up for a database on our array and set it as our current handlers. * Note: this is not ideal, for now. However, legacy will go out of support at some point. * * On error or if no entry is found, 1 is returned. * On success, GeoIP struct is set as our handler and 0 is returned. */ static int set_geoip_db (GO_GEOIP_DB type) { int idx = 0; if (!is_geoip_resource ()) return 1; /* in memory legacy DB */ if (legacy_db && geo_location_data) return 0; for (idx = 0; idx < db_cnt; idx++) { if (set_geoip_db_by_type (geoips[idx], type) == 0) return 0; } return 1; } static void set_geoip (const char *db) { GeoIP **new_geoips = NULL, *geoip = NULL; if (db == NULL || *db == '\0') return; if (!(geoip = geoip_open_db (db))) FATAL ("Unable to open GeoIP database %s\n", db); db_cnt++; new_geoips = realloc (geoips, sizeof (*geoips) * db_cnt); if (new_geoips == NULL) FATAL ("Unable to realloc GeoIP database %s\n", db); geoips = new_geoips; geoips[db_cnt - 1] = geoip; set_conf_by_type (geoip); } /* Set up and open GeoIP database */ void init_geoip (void) { int i; for (i = 0; i < conf.geoip_db_idx; ++i) set_geoip (conf.geoip_databases[i]); /* fall back to legacy GeoIP database */ if (!conf.geoip_db_idx) { geo_location_data = GeoIP_new (conf.geo_db); legacy_db = 1; } } static char ip4to6_out_buffer[17]; static char * ip4to6 (const char *ipv4) { unsigned int b[4]; int n = sscanf (ipv4, "%u.%u.%u.%u", b, b + 1, b + 2, b + 3); if (n == 4) { snprintf (ip4to6_out_buffer, sizeof (ip4to6_out_buffer), "::ffff:%02x%02x:%02x%02x", b[0], b[1], b[2], b[3]); return ip4to6_out_buffer; } return NULL; } /* Get continent name concatenated with code. * * If continent not found, "Unknown" is returned. * On success, the continent code & name is returned . */ static const char * get_continent_name_and_code (const char *continentid) { if (memcmp (continentid, "NA", 2) == 0) return "NA North America"; else if (memcmp (continentid, "OC", 2) == 0) return "OC Oceania"; else if (memcmp (continentid, "EU", 2) == 0) return "EU Europe"; else if (memcmp (continentid, "SA", 2) == 0) return "SA South America"; else if (memcmp (continentid, "AF", 2) == 0) return "AF Africa"; else if (memcmp (continentid, "AN", 2) == 0) return "AN Antarctica"; else if (memcmp (continentid, "AS", 2) == 0) return "AS Asia"; else return "-- Unknown"; } /* Compose a string with the country name and code and store it in the * given buffer. */ static void geoip_set_country (const char *country, const char *code, char *loc) { if (country && code) snprintf (loc, COUNTRY_LEN, "%s %s", code, country); else snprintf (loc, COUNTRY_LEN, "%s", "Unknown"); } /* Compose a string with the city name and state/region and store it * in the given buffer. */ static void geoip_set_city (const char *city, const char *region, char *loc) { snprintf (loc, CITY_LEN, "%s, %s", city ? city : "N/A City", region ? region : "N/A Region"); } /* Compose a string with the continent name and store it in the given * buffer. */ static void geoip_set_continent (const char *continent, char *loc) { if (continent) snprintf (loc, CONTINENT_LEN, "%s", get_continent_name_and_code (continent)); else snprintf (loc, CONTINENT_LEN, "%s", "Unknown"); } /* Compose a string with the continent name and store it in the given * buffer. */ static void geoip_set_asn (const char *name, char *asn) { if (name) snprintf (asn, ASN_LEN, "%s", name); else snprintf (asn, ASN_LEN, "%s", "Unknown"); } /* Get detailed information found in the GeoIP Database about the * given IPv4 or IPv6. * * On error, NULL is returned * On success, GeoIPRecord structure is returned */ static GeoIPRecord * get_geoip_record (const char *addr, GTypeIP type_ip) { GeoIPRecord *rec = NULL; if (TYPE_IPV4 == type_ip) rec = GeoIP_record_by_name (geo_location_data, addr); else if (TYPE_IPV6 == type_ip) rec = GeoIP_record_by_name_v6 (geo_location_data, addr); return rec; } /* Set country data by record into the given `location` buffer based * on the IP version. */ static void geoip_set_country_by_record (const char *ip, char *location, GTypeIP type_ip) { GeoIPRecord *rec = NULL; const char *country = NULL, *code = NULL, *addr = ip; if (geo_location_data == NULL) return; /* Custom GeoIP database */ if ((rec = get_geoip_record (addr, type_ip))) { country = rec->country_name; code = rec->country_code; } geoip_set_country (country, code, location); if (rec != NULL) { GeoIPRecord_delete (rec); } } /* Get the GeoIP location id by name. * * On error, 0 is returned * On success, the GeoIP location id is returned */ static int geoip_get_geoid (const char *addr, GTypeIP type_ip) { int geoid = 0; if (TYPE_IPV4 == type_ip) geoid = GeoIP_id_by_name (geo_location_data, addr); else if (TYPE_IPV6 == type_ip) geoid = GeoIP_id_by_name_v6 (geo_location_data, addr); return geoid; } /* Get the country name by GeoIP location id. * * On error, NULL is returned * On success, the country name is returned */ static const char * geoip_get_country_by_geoid (const char *addr, GTypeIP type_ip) { const char *country = NULL; if (TYPE_IPV4 == type_ip) country = GeoIP_country_name_by_name (geo_location_data, addr); else if (TYPE_IPV6 == type_ip) country = GeoIP_country_name_by_name_v6 (geo_location_data, addr); return country; } /* Set country data by geoid into the given `location` buffer based on * the IP version. */ static void geoip_set_country_by_geoid (const char *ip, char *location, GTypeIP type_ip) { const char *country = NULL, *code = NULL, *addr = ip; int geoid = 0; if (!is_geoip_resource ()) return; if (!(country = geoip_get_country_by_geoid (addr, type_ip))) goto out; /* return two letter country code */ if (!(geoid = geoip_get_geoid (addr, type_ip))) goto out; code = GeoIP_code_by_id (geoid); out: geoip_set_country (country, code, location); } /* Set continent data by record into the given `location` buffer based * on the IP version. */ static void geoip_set_continent_by_record (const char *ip, char *location, GTypeIP type_ip) { GeoIPRecord *rec = NULL; const char *continent = NULL, *addr = ip; if (geo_location_data == NULL) return; /* Custom GeoIP database */ if ((rec = get_geoip_record (addr, type_ip))) continent = rec->continent_code; geoip_set_continent (continent, location); if (rec != NULL) { GeoIPRecord_delete (rec); } } /* Set continent data by geoid into the given `location` buffer based * on the IP version. */ static void geoip_set_continent_by_geoid (const char *ip, char *location, GTypeIP type_ip) { const char *continent = NULL, *addr = ip; int geoid = 0; if (!is_geoip_resource ()) return; if (!(geoid = geoip_get_geoid (addr, type_ip))) goto out; continent = GeoIP_continent_by_id (geoid); out: geoip_set_continent (continent, location); } /* Set city data by record into the given `location` buffer based on * the IP version. */ static void geoip_set_city_by_record (const char *ip, char *location, GTypeIP type_ip) { GeoIPRecord *rec = NULL; const char *city = NULL, *region = NULL, *addr = ip; /* Custom GeoIP database */ if ((rec = get_geoip_record (addr, type_ip))) { city = rec->city; region = rec->region; } geoip_set_city (city, region, location); if (rec != NULL) { GeoIPRecord_delete (rec); } } /* Set city data by geoid or record into the given `location` buffer * based on the IP version and currently used database edition. * It uses the custom GeoIP database - i.e., GeoLiteCity.dat */ static void geoip_get_city (const char *ip, char *location, GTypeIP type_ip) { unsigned char rec = 0; if (geo_location_data == NULL) return; rec = GeoIP_database_edition (geo_location_data); switch (rec) { case GEOIP_CITY_EDITION_REV0: case GEOIP_CITY_EDITION_REV1: if (TYPE_IPV4 == type_ip) geoip_set_city_by_record (ip, location, TYPE_IPV4); else geoip_set_city (NULL, NULL, location); break; case GEOIP_CITY_EDITION_REV0_V6: case GEOIP_CITY_EDITION_REV1_V6: if (TYPE_IPV6 == type_ip) geoip_set_city_by_record (ip, location, TYPE_IPV6); else { char *ipv6 = ip4to6 (ip); if (ipv6) geoip_set_city_by_record (ipv6, location, TYPE_IPV6); else geoip_set_city (NULL, NULL, location); } break; } } /* Set country data by geoid or record into the given `location` buffer * based on the IP version and currently used database edition. */ void geoip_get_country (const char *ip, char *location, GTypeIP type_ip) { unsigned char rec = 0; if (set_geoip_db (TYPE_COUNTRY) && set_geoip_db (TYPE_CITY)) { geoip_set_country (NULL, NULL, location); return; } rec = GeoIP_database_edition (geo_location_data); switch (rec) { case GEOIP_COUNTRY_EDITION: if (TYPE_IPV4 == type_ip) geoip_set_country_by_geoid (ip, location, TYPE_IPV4); else geoip_set_country (NULL, NULL, location); break; case GEOIP_COUNTRY_EDITION_V6: if (TYPE_IPV6 == type_ip) geoip_set_country_by_geoid (ip, location, TYPE_IPV6); else { char *ipv6 = ip4to6 (ip); if (ipv6) geoip_set_country_by_geoid (ipv6, location, TYPE_IPV6); else geoip_set_country (NULL, NULL, location); } break; case GEOIP_CITY_EDITION_REV0: case GEOIP_CITY_EDITION_REV1: if (TYPE_IPV4 == type_ip) geoip_set_country_by_record (ip, location, TYPE_IPV4); else geoip_set_country (NULL, NULL, location); break; case GEOIP_CITY_EDITION_REV0_V6: case GEOIP_CITY_EDITION_REV1_V6: if (TYPE_IPV6 == type_ip) geoip_set_country_by_record (ip, location, TYPE_IPV6); else { char *ipv6 = ip4to6 (ip); if (ipv6) geoip_set_country_by_record (ipv6, location, TYPE_IPV6); else geoip_set_country (NULL, NULL, location); } break; } } /* Set continent data by geoid or record into the given `location` buffer * based on the IP version and currently used database edition. */ void geoip_get_continent (const char *ip, char *location, GTypeIP type_ip) { unsigned char rec = 0; if (set_geoip_db (TYPE_COUNTRY) && set_geoip_db (TYPE_CITY)) { geoip_set_continent (NULL, location); return; } rec = GeoIP_database_edition (geo_location_data); switch (rec) { case GEOIP_COUNTRY_EDITION: if (TYPE_IPV4 == type_ip) geoip_set_continent_by_geoid (ip, location, TYPE_IPV4); else geoip_set_continent (NULL, location); break; case GEOIP_COUNTRY_EDITION_V6: if (TYPE_IPV6 == type_ip) geoip_set_continent_by_geoid (ip, location, TYPE_IPV6); else { char *ipv6 = ip4to6 (ip); if (ipv6) geoip_set_continent_by_geoid (ipv6, location, TYPE_IPV6); else geoip_set_continent (NULL, location); } break; case GEOIP_CITY_EDITION_REV0: case GEOIP_CITY_EDITION_REV1: if (TYPE_IPV4 == type_ip) geoip_set_continent_by_record (ip, location, TYPE_IPV4); else geoip_set_continent (NULL, location); break; case GEOIP_CITY_EDITION_REV0_V6: case GEOIP_CITY_EDITION_REV1_V6: if (TYPE_IPV6 == type_ip) geoip_set_continent_by_record (ip, location, TYPE_IPV6); else { char *ipv6 = ip4to6 (ip); if (ipv6) geoip_set_continent_by_record (ipv6, location, TYPE_IPV6); else geoip_set_continent (NULL, location); } break; } } void geoip_asn (char *host, char *asn) { char *name = NULL; if (legacy_db || set_geoip_db (TYPE_ASN)) { geoip_set_asn (NULL, asn); return; } /* Custom GeoIP database */ name = GeoIP_org_by_name (geo_location_data, (const char *) host); geoip_set_asn (name, asn); free (name); } /* Entry point to set GeoIP location into the corresponding buffers, * (continent, country, city). * * On error, 1 is returned * On success, buffers are set and 0 is returned */ int set_geolocation (char *host, char *continent, char *country, char *city, GO_UNUSED char *asn) { int type_ip = 0; if (!is_geoip_resource ()) return 1; if (invalid_ipaddr (host, &type_ip)) return 1; /* set ASN data */ geoip_asn (host, asn); /* set Country/City data */ if (set_geoip_db (TYPE_COUNTRY) == 0 || set_geoip_db (TYPE_CITY) == 0) { geoip_get_country (host, country, type_ip); geoip_get_continent (host, continent, type_ip); } if (set_geoip_db (TYPE_CITY) == 0) geoip_get_city (host, city, type_ip); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/geoip2.c�������������������������������������������������������������������������0000644�0001750�0001730�00000026611�14624731651�011131� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * geoip2.c -- implementation of GeoIP2 * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2020 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #include <stdlib.h> #include <string.h> #include <errno.h> #ifdef HAVE_LIBMAXMINDDB #include <maxminddb.h> #endif #include "geoip1.h" #include "error.h" #include "labels.h" #include "util.h" #include "xmalloc.h" /* should be reused across lookups */ static int geoip_asn_type = 0; static int geoip_city_type = 0; static int geoip_country_type = 0; static int mmdb_cnt = 0; static MMDB_s *mmdbs = NULL; /* Determine if we have a valid geoip resource. * * If the geoip resource is NULL, 0 is returned. * If the geoip resource is valid and malloc'd, 1 is returned. */ int is_geoip_resource (void) { return mmdbs && mmdb_cnt; } /* Free up GeoIP resources */ void geoip_free (void) { int idx = 0; if (!is_geoip_resource ()) return; for (idx = 0; idx < mmdb_cnt; idx++) MMDB_close (&mmdbs[idx]); free (mmdbs); mmdbs = NULL; } static void set_geoip (const char *db) { int status = 0; MMDB_s *new_mmdbs = NULL, mmdb; if (db == NULL || *db == '\0') return; if ((status = MMDB_open (db, MMDB_MODE_MMAP, &mmdb)) != MMDB_SUCCESS) FATAL ("Unable to open GeoIP2 database %s: %s\n", db, MMDB_strerror (status)); mmdb_cnt++; new_mmdbs = realloc (mmdbs, sizeof (*mmdbs) * mmdb_cnt); if (new_mmdbs == NULL) FATAL ("Unable to realloc GeoIP2 database %s\n", db); mmdbs = new_mmdbs; mmdbs[mmdb_cnt - 1] = mmdb; if (strstr (mmdb.metadata.database_type, "-City") != NULL) conf.has_geocountry = conf.has_geocity = geoip_country_type = geoip_city_type = 1; if (strstr (mmdb.metadata.database_type, "-ASN") != NULL) conf.has_geoasn = geoip_asn_type = 1; if (strstr (mmdb.metadata.database_type, "-Country") != NULL) conf.has_geocountry = geoip_country_type = 1; } /* Open the given GeoIP2 database. * * On error, it aborts. * On success, a new geolocation structure is set. */ void init_geoip (void) { int i; for (i = 0; i < conf.geoip_db_idx; ++i) set_geoip (conf.geoip_databases[i]); } /* Look up an IP address that is passed in as a null-terminated string. * * On error, it aborts. * If no entry is found, 1 is returned. * On success, MMDB_lookup_result_s struct is set and 0 is returned. */ static int geoip_lookup (MMDB_lookup_result_s *res, const char *ip, int is_asn) { int gai_err, mmdb_err, idx = 0; MMDB_s *mmdb = NULL; for (idx = 0; idx < mmdb_cnt; idx++) { if (is_asn && (!strstr (mmdbs[idx].metadata.database_type, "ASN"))) continue; if (!is_asn && (strstr (mmdbs[idx].metadata.database_type, "ASN"))) continue; mmdb = &mmdbs[idx]; *res = MMDB_lookup_string (mmdb, ip, &gai_err, &mmdb_err); if (0 != gai_err) return 1; if (MMDB_SUCCESS != mmdb_err) FATAL ("Error from libmaxminddb: %s\n", MMDB_strerror (mmdb_err)); if (!(*res).found_entry) return 1; break; } return 0; } /* Get continent name concatenated with code. * * If continent not found, "Unknown" is returned. * On success, the continent code & name is returned . */ static const char * get_continent_name_and_code (const char *continentid) { if (memcmp (continentid, "NA", 2) == 0) return "NA North America"; else if (memcmp (continentid, "OC", 2) == 0) return "OC Oceania"; else if (memcmp (continentid, "EU", 2) == 0) return "EU Europe"; else if (memcmp (continentid, "SA", 2) == 0) return "SA South America"; else if (memcmp (continentid, "AF", 2) == 0) return "AF Africa"; else if (memcmp (continentid, "AN", 2) == 0) return "AN Antarctica"; else if (memcmp (continentid, "AS", 2) == 0) return "AS Asia"; else return "-- Unknown"; } /* Compose a string with the country name and code and store it in the * given buffer. */ static void geoip_set_country (const char *country, const char *code, char *loc) { if (country && code) snprintf (loc, COUNTRY_LEN, "%s %s", code, country); else snprintf (loc, COUNTRY_LEN, "%s", "Unknown"); } /* Compose a string with the ASN name and code and store it in the * given buffer. */ static void geoip_set_asn (MMDB_entry_data_s name, MMDB_entry_data_s code, char *asn, int status) { if (status == 0) snprintf (asn, ASN_LEN, "%05u: %.*s", code.uint32, name.data_size, name.utf8_string); else snprintf (asn, ASN_LEN, "%s", "00000: Unknown"); } /* Compose a string with the city name and state/region and store it * in the given buffer. */ static void geoip_set_city (const char *city, const char *region, char *loc) { snprintf (loc, CITY_LEN, "%s, %s", city ? city : "N/A City", region ? region : "N/A Region"); } /* Compose a string with the continent name and store it in the given * buffer. */ static void geoip_set_continent (const char *continent, char *loc) { if (continent) snprintf (loc, CONTINENT_LEN, "%s", get_continent_name_and_code (continent)); else snprintf (loc, CONTINENT_LEN, "%s", "Unknown"); } /* A wrapper to fetch the looked up result set. * * On error, it aborts. * If no data is found, NULL is returned. * On success, the fetched value is returned. */ static char * get_value (MMDB_lookup_result_s res, ...) { MMDB_entry_data_s entry_data; char *value = NULL; int status = 0; va_list keys; va_start (keys, res); status = MMDB_vget_value (&res.entry, &entry_data, keys); va_end (keys); if (status != MMDB_SUCCESS) return NULL; if (!entry_data.has_data) return NULL; if (entry_data.type != MMDB_DATA_TYPE_UTF8_STRING) FATAL ("Invalid data UTF8 GeoIP2 data %d:\n", entry_data.type); if ((value = strndup (entry_data.utf8_string, entry_data.data_size)) == NULL) FATAL ("Unable to allocate buffer %s: ", strerror (errno)); return value; } /* A wrapper to fetch the looked up result and set the city and region. * * If no data is found, NULL is set. * On success, the fetched value is set. */ static void geoip_query_city (MMDB_lookup_result_s res, char *location) { char *city = NULL, *region = NULL; if (res.found_entry) { city = get_value (res, "city", "names", DOC_LANG, NULL); region = get_value (res, "subdivisions", "0", "names", DOC_LANG, NULL); if (!city) { city = get_value (res, "city", "names", "en", NULL); } if (!region) { region = get_value (res, "subdivisions", "0", "names", "en", NULL); } } geoip_set_city (city, region, location); free (city); free (region); } /* A wrapper to fetch the looked up result and set the country and code. * * If no data is found, NULL is set. * On success, the fetched value is set. */ static void geoip_query_country (MMDB_lookup_result_s res, char *location) { char *country = NULL, *code = NULL; if (res.found_entry) { country = get_value (res, "country", "names", DOC_LANG, NULL); code = get_value (res, "country", "iso_code", NULL); if (!country) { country = get_value (res, "country", "names", "en", NULL); } } geoip_set_country (country, code, location); free (code); free (country); } /* Sets the value for the given array of strings as the lookup path. * * On error or not found, 1 is returned. * On success, 0 is returned and the entry data is set. */ static int geoip_query_asn_code (MMDB_lookup_result_s res, MMDB_entry_data_s *code) { int status; const char *key[] = { "autonomous_system_number", NULL }; if (res.found_entry) { status = MMDB_aget_value (&res.entry, code, key); if (status != MMDB_SUCCESS || !code->has_data) return 1; } return 0; } /* Sets the value for the given array of strings as the lookup path. * * On error or not found, 1 is returned. * On success, 0 is returned and the entry data is set. */ static int geoip_query_asn_name (MMDB_lookup_result_s res, MMDB_entry_data_s *name) { int status; const char *key[] = { "autonomous_system_organization", NULL }; if (res.found_entry) { status = MMDB_aget_value (&res.entry, name, key); if (status != MMDB_SUCCESS || !name->has_data) return 1; } return 0; } /* A wrapper to fetch the looked up result and set the ASN organization & code. * * If no data is found, "Unknown" is set. * On success, the fetched value is set. */ void geoip_asn (char *host, char *asn) { MMDB_lookup_result_s res = { 0 }; MMDB_entry_data_s name = { 0 }; MMDB_entry_data_s code = { 0 }; int status = 1; geoip_lookup (&res, host, 1); if (!res.found_entry) goto out; if ((status &= geoip_query_asn_name (res, &name))) goto out; if ((status |= geoip_query_asn_code (res, &code))) goto out; out: geoip_set_asn (name, code, asn, status); } /* A wrapper to fetch the looked up result and set the continent code. * * If no data is found, NULL is set. * On success, the fetched value is set. */ static void geoip_query_continent (MMDB_lookup_result_s res, char *location) { char *code = NULL; if (res.found_entry) code = get_value (res, "continent", "code", NULL); geoip_set_continent (code, location); free (code); } /* Set country data by record into the given `location` buffer */ void geoip_get_country (const char *ip, char *location, GO_UNUSED GTypeIP type_ip) { MMDB_lookup_result_s res = { 0 }; geoip_lookup (&res, ip, 0); geoip_query_country (res, location); } /* A wrapper to fetch the looked up result and set the continent. */ void geoip_get_continent (const char *ip, char *location, GO_UNUSED GTypeIP type_ip) { MMDB_lookup_result_s res = { 0 }; geoip_lookup (&res, ip, 0); geoip_query_continent (res, location); } /* Entry point to set GeoIP location into the corresponding buffers, * (continent, country, city). * * On error, 1 is returned * On success, buffers are set and 0 is returned */ int set_geolocation (char *host, char *continent, char *country, char *city, char *asn) { MMDB_lookup_result_s res = { 0 }; if (!is_geoip_resource ()) return 1; /* set ASN data */ if (geoip_asn_type) geoip_asn (host, asn); if (!geoip_city_type && !geoip_country_type) return 0; /* set Country/City data */ geoip_lookup (&res, host, 0); geoip_query_country (res, country); geoip_query_continent (res, continent); if (geoip_city_type) geoip_query_city (res, city); return 0; } �����������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gslist.c�������������������������������������������������������������������������0000644�0001750�0001730�00000010620�14624731651�011242� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * gslist.c -- A Singly link list implementation * _______ _______ __ __ * / ____/ | / / ___/____ _____/ /_____ / /_ * / / __ | | /| / /\__ \/ __ \/ ___/ //_/ _ \/ __/ * / /_/ / | |/ |/ /___/ / /_/ / /__/ ,< / __/ /_ * \____/ |__/|__//____/\____/\___/_/|_|\___/\__/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <stdlib.h> #include <string.h> #include <ctype.h> #include "gslist.h" #include "gstorage.h" #include "xmalloc.h" /* Instantiate a new Singly linked-list node. * * On error, aborts if node can't be malloc'd. * On success, the GSLList node. */ GSLList * list_create (void *data) { GSLList *node = xmalloc (sizeof (GSLList)); node->data = data; node->next = NULL; return node; } /* Create and insert a node after a given node. * * On error, aborts if node can't be malloc'd. * On success, the newly created node. */ GSLList * list_insert_append (GSLList *node, void *data) { GSLList *newnode; newnode = list_create (data); newnode->next = node->next; node->next = newnode; return newnode; } /* Create and insert a node in front of the list. * * On error, aborts if node can't be malloc'd. * On success, the newly created node. */ GSLList * list_insert_prepend (GSLList *list, void *data) { GSLList *newnode; newnode = list_create (data); newnode->next = list; return newnode; } /* Find a node given a pointer to a function that compares them. * * If comparison fails, NULL is returned. * On success, the existing node is returned. */ GSLList * list_find (GSLList *node, int (*func) (void *, void *), void *data) { while (node) { if (func (node->data, data) > 0) return node; node = node->next; } return NULL; } GSLList * list_copy (GSLList *node) { GSLList *list = NULL; while (node) { if (!list) list = list_create (i322ptr ((*(uint32_t *) node->data))); else list = list_insert_prepend (list, i322ptr ((*(uint32_t *) node->data))); node = node->next; } return list; } /* Remove all nodes from the list. * * On success, 0 is returned. */ int list_remove_nodes (GSLList *list) { GSLList *tmp; while (list != NULL) { tmp = list->next; if (list->data) free (list->data); free (list); list = tmp; } return 0; } /* Remove the given node from the list. * * On error, 1 is returned. * On success, 0 is returned. */ int list_remove_node (GSLList **list, GSLList *node) { GSLList **current = list, *next = NULL; for (; *current; current = &(*current)->next) { if ((*current) != node) continue; next = (*current)->next; if ((*current)->data) free ((*current)->data); free (*current); *current = next; return 0; } return 1; } /* Iterate over the single linked-list and call function pointer. * * If function pointer does not return 0, -1 is returned. * On success, 0 is returned. */ int list_foreach (GSLList *node, int (*func) (void *, void *), void *user_data) { while (node) { if (func (node->data, user_data) != 0) return -1; node = node->next; } return 0; } /* Count the number of elements on the linked-list. * * On success, the number of elements is returned. */ int list_count (GSLList *node) { int count = 0; while (node != 0) { count++; node = node->next; } return count; } ����������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gdns.h���������������������������������������������������������������������������0000644�0001750�0001730�00000005006�14624731651�010677� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef GDNS_H_INCLUDED #define GDNS_H_INCLUDED #define H_SIZE 1025 #define QUEUE_SIZE 400 typedef struct GDnsThread_ { pthread_cond_t not_empty; /* not empty queue condition */ pthread_cond_t not_full; /* not full queue condition */ pthread_mutex_t mutex; pthread_t thread; } GDnsThread; typedef struct GDnsQueue_ { int head; /* index to head of queue */ int tail; /* index to tail of queue */ int size; /* queue size */ int capacity; /* length at most */ char buffer[QUEUE_SIZE][H_SIZE]; /* data item */ } GDnsQueue; extern GDnsThread gdns_thread; char *gqueue_dequeue (GDnsQueue * q); char *reverse_ip (char *str); int gqueue_empty (GDnsQueue * q); int gqueue_enqueue (GDnsQueue * q, const char *item); int gqueue_find (GDnsQueue * q, const char *item); int gqueue_full (GDnsQueue * q); int gqueue_size (GDnsQueue * q); void dns_resolver (char *addr); void gdns_free_queue (void); void gdns_init (void); void gdns_queue_free (void); void gdns_thread_create (void); void gqueue_destroy (GDnsQueue * q); void gqueue_init (GDnsQueue * q, int capacity); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/error.h��������������������������������������������������������������������������0000644�0001750�0001730�00000007675�14624731651�011113� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef ERROR_H_INCLUDED #define ERROR_H_INCLUDED #ifndef COMMONS #include "commons.h" #endif #ifdef HAVE_NCURSESW_NCURSES_H #include <ncursesw/ncurses.h> #elif HAVE_NCURSES_NCURSES_H #include <ncurses/ncurses.h> #elif HAVE_NCURSES_H #include <ncurses.h> #elif HAVE_CURSES_H #include <curses.h> #endif #include <stdio.h> #include "settings.h" #define TRACE_SIZE 128 #define FATAL(fmt, ...) do { \ (void) endwin (); \ fprintf (stderr, "\nGoAccess - version %s - %s %s\n", GO_VERSION, __DATE__, __TIME__); \ fprintf (stderr, "Config file: %s\n", conf.iconfigfile ?: NO_CONFIG_FILE); \ fprintf (stderr, "\nFatal error has occurred"); \ fprintf (stderr, "\nError occurred at: %s - %s - %d\n", __FILE__, __FUNCTION__, __LINE__); \ fprintf (stderr, fmt, ##__VA_ARGS__); \ fprintf (stderr, "\n\n"); \ LOG_DEBUG ((fmt, ##__VA_ARGS__)); \ exit(EXIT_FAILURE); \ } while (0) #ifdef DEBUG #define DEBUG_TEST 1 #else #define DEBUG_TEST 0 #endif /* access requests log */ #define ACCESS_LOG(x, ...) do { access_fprintf x; } while (0) /* debug log */ #define LOG_DEBUG(x, ...) do { dbg_fprintf x; } while (0) /* invalid requests log */ #define LOG_INVALID(x, ...) do { invalid_fprintf x; } while (0) /* unknown browser log */ #define LOG_UNKNOWNS(x, ...) do { unknowns_fprintf x; } while (0) /* log debug wrapper */ #define LOG(x) do { if (DEBUG_TEST) dbg_printf x; } while (0) int access_log_open (const char *path); void access_fprintf (const char *fmt, ...) __attribute__((format (printf, 1, 2))); void access_log_close (void); void dbg_fprintf (const char *fmt, ...) __attribute__((format (printf, 1, 2))); void dbg_log_close (void); void dbg_log_open (const char *file); void dbg_printf (const char *fmt, ...) __attribute__((format (printf, 1, 2))); void invalid_fprintf (const char *fmt, ...) __attribute__((format (printf, 1, 2))); void unknowns_fprintf (const char *fmt, ...) __attribute__((format (printf, 1, 2))); void invalid_log_close (void); void invalid_log_open (const char *path); void set_signal_data (void *p); void setup_sigsegv_handler (void); void sigsegv_handler (int sig); void unknowns_log_close (void); void unknowns_log_open (const char *path); #endif �������������������������������������������������������������������goaccess-1.9.3/src/gdashboard.c���������������������������������������������������������������������0000644�0001750�0001730�00000120374�14624731651�012043� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * gdashboard.c -- goaccess main dashboard * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define _XOPEN_SOURCE 700 #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <regex.h> #include <inttypes.h> #include "gdashboard.h" #include "gkhash.h" #include "gholder.h" #include "color.h" #include "error.h" #include "gstorage.h" #include "util.h" #include "xmalloc.h" static GFind find_t; /* Reset find indices */ void reset_find (void) { if (find_t.pattern != NULL && *find_t.pattern != '\0') free (find_t.pattern); find_t.look_in_sub = 0; find_t.module = 0; find_t.next_idx = 0; /* next total index */ find_t.next_parent_idx = 0; /* next parent index */ find_t.next_sub_idx = 0; /* next sub item index */ find_t.pattern = NULL; } /* Allocate memory for a new GDash instance. * * On success, the newly allocated GDash is returned . */ GDash * new_gdash (void) { GDash *dash = xmalloc (sizeof (GDash)); memset (dash, 0, sizeof *dash); dash->total_alloc = 0; return dash; } /* Allocate memory for a new GDashData instance. * * On success, the newly allocated GDashData is returned . */ GDashData * new_gdata (uint32_t size) { GDashData *data = xcalloc (size, sizeof (GDashData)); return data; } /* Free memory allocated for a GDashData instance. Includes malloc'd * strings. */ static void free_dashboard_data (GDashData item) { if (item.metrics == NULL) return; if (item.metrics->data) free (item.metrics->data); if (item.metrics->bw.sbw) free (item.metrics->bw.sbw); if (conf.serve_usecs && item.metrics->avgts.sts) free (item.metrics->avgts.sts); if (conf.serve_usecs && item.metrics->cumts.sts) free (item.metrics->cumts.sts); if (conf.serve_usecs && item.metrics->maxts.sts) free (item.metrics->maxts.sts); free (item.metrics); } /* Free memory allocated for a GDash instance, and nested structure * data. */ void free_dashboard (GDash *dash) { GModule module; int j; size_t idx = 0; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; for (j = 0; j < dash->module[module].alloc_data; j++) { free_dashboard_data (dash->module[module].data[j]); } free (dash->module[module].data); } free (dash); } /* Get the current panel/module given the `Y` offset (position) in the * terminal dashboard. * * If not found, 0 is returned. * If found, the module number is returned . */ static GModule get_find_current_module (GDash *dash, int offset) { GModule module; size_t idx = 0; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; /* set current module */ if (dash->module[module].pos_y == offset) return module; /* we went over by one module, set current - 1 */ if (dash->module[module].pos_y > offset) return module - 1; } return 0; } /* Get the number of rows that a collapsed dashboard panel contains. * * On success, the number of rows is returned. */ int get_num_collapsed_data_rows (void) { /* The default number of rows is fixed */ int size = DASH_COLLAPSED - DASH_NON_DATA; /* If no column names, then add the number of rows occupied by the * column values to the default number */ return conf.no_column_names ? size + DASH_COL_ROWS : size; } /* Get the number of rows that an expanded dashboard panel contains. * * On success, the number of rows is returned. */ int get_num_expanded_data_rows (void) { /* The default number of rows is fixed */ int size = DASH_EXPANDED - DASH_NON_DATA; /* If no column names, then add the number of rows occupied by the * column values to the default number */ return conf.no_column_names ? size + DASH_COL_ROWS : size; } /* Get the Y position of the terminal dashboard where data rows * (metrics) start. * * On success, the Y position is returned. */ static int get_data_pos_rows (void) { return conf.no_column_names ? DASH_DATA_POS - DASH_COL_ROWS : DASH_DATA_POS; } /* Get the initial X position of the terminal dashboard where metrics * and data columns start. * * On success, the X position is returned. */ static int get_xpos (void) { return DASH_INIT_X; } /* Determine which module should be expanded given the current mouse * position. * * On error, 1 is returned. * On success, 0 is returned. */ int set_module_from_mouse_event (GScroll *gscroll, GDash *dash, int y) { int module = 0; int offset = y - MAX_HEIGHT_HEADER - MAX_HEIGHT_FOOTER + 1; if (gscroll->expanded) { module = get_find_current_module (dash, offset); } else { offset += gscroll->dash; module = offset / DASH_COLLAPSED; } if (module >= TOTAL_MODULES) module = TOTAL_MODULES - 1; else if (module < 0) module = 0; if ((int) gscroll->current == module) return 1; gscroll->current = module; return 0; } /* Allocate a new string for a sub item on the terminal dashboard. * * On error, NULL is returned. * On success, the newly allocated string is returned. */ static char * render_child_node (const char *data) { char *buf; int len = 0; /* chars to use based on encoding used */ #ifdef HAVE_LIBNCURSESW const char *bend = "\xe2\x94\x9c"; const char *horz = "\xe2\x94\x80"; #else const char *bend = "|"; const char *horz = "`-"; #endif if (data == NULL || *data == '\0') return NULL; len = snprintf (NULL, 0, " %s%s %s", bend, horz, data); buf = xmalloc (len + 3); sprintf (buf, " %s%s %s", bend, horz, data); return buf; } /* Get a string of bars given current hits, maximum hit & xpos. * * On success, the newly allocated string representing the chart is * returned. */ static char * get_bars (int n, int max, int x) { int w, h; float len = 0.0; getmaxyx (stdscr, h, w); (void) h; /* avoid lint warning */ len = ((((float) n) / max)); len *= (w - x); if (len < 1) len = 1; return char_repeat (len, '|'); } /* Get largest hits metric. * * On error, 0 is returned. * On success, largest hits metric is returned. */ static void set_max_metrics (GDashMeta *meta, GDashData *idata) { if (meta->max_hits < idata->metrics->hits) meta->max_hits = idata->metrics->hits; if (meta->max_visitors < idata->metrics->visitors) meta->max_visitors = idata->metrics->visitors; } /* Set largest hits metric (length of the integer). */ static void set_max_hit_len (GDashMeta *meta, GDashData *idata) { int vlen = intlen (idata->metrics->hits); int llen = strlen (MTRC_HITS_LBL); if (vlen > meta->hits_len) meta->hits_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->hits_len) meta->hits_len = llen; } /* Get the percent integer length. */ static void set_max_hit_perc_len (GDashMeta *meta, GDashData *idata) { int vlen = intlen (idata->metrics->hits_perc); int llen = strlen (MTRC_HITS_PERC_LBL); if (vlen > meta->hits_perc_len) meta->hits_perc_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->hits_perc_len) meta->hits_perc_len = llen; } /* Set largest hits metric (length of the integer). */ static void set_max_visitors_len (GDashMeta *meta, GDashData *idata) { int vlen = intlen (idata->metrics->visitors); int llen = strlen (MTRC_VISITORS_SHORT_LBL); if (vlen > meta->visitors_len) meta->visitors_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->visitors_len) meta->visitors_len = llen; } /* Get the percent integer length. */ static void set_max_visitors_perc_len (GDashMeta *meta, GDashData *idata) { int vlen = intlen (idata->metrics->visitors_perc); int llen = strlen (MTRC_VISITORS_PERC_LBL); if (vlen > meta->visitors_perc_len) meta->visitors_perc_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->visitors_perc_len) meta->visitors_perc_len = llen; } /* Get the percent integer length. */ static void set_max_bw_len (GDashMeta *meta, GDashData *idata) { int vlen = strlen (idata->metrics->bw.sbw); int llen = strlen (MTRC_BW_LBL); if (vlen > meta->bw_len) meta->bw_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->bw_len) meta->bw_len = llen; } /* Get the percent integer length. */ static void set_max_avgts_len (GDashMeta *meta, GDashData *idata) { int vlen = 0, llen = 0; if (!conf.serve_usecs || !idata->metrics->avgts.sts) return; vlen = strlen (idata->metrics->avgts.sts); llen = strlen (MTRC_AVGTS_LBL); if (vlen > meta->avgts_len) meta->avgts_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->avgts_len) meta->avgts_len = llen; } /* Get the percent integer length. */ static void set_max_cumts_len (GDashMeta *meta, GDashData *idata) { int vlen = 0, llen = 0; if (!conf.serve_usecs || !idata->metrics->cumts.sts) return; vlen = strlen (idata->metrics->cumts.sts); llen = strlen (MTRC_AVGTS_LBL); if (vlen > meta->cumts_len) meta->cumts_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->cumts_len) meta->cumts_len = llen; } /* Get the percent integer length. */ static void set_max_maxts_len (GDashMeta *meta, GDashData *idata) { int vlen = 0, llen = 0; if (!conf.serve_usecs || !idata->metrics->maxts.sts) return; vlen = strlen (idata->metrics->maxts.sts); llen = strlen (MTRC_AVGTS_LBL); if (vlen > meta->maxts_len) meta->maxts_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->maxts_len) meta->maxts_len = llen; } /* Get the percent integer length. */ static void set_max_method_len (GDashMeta *meta, GDashData *idata) { int vlen = 0, llen = 0; if (!conf.append_method || !idata->metrics->method) return; vlen = strlen (idata->metrics->method); llen = strlen (MTRC_METHODS_SHORT_LBL); if (vlen > meta->method_len) meta->method_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->method_len) meta->method_len = llen; } /* Get the percent integer length. */ static void set_max_protocol_len (GDashMeta *meta, GDashData *idata) { int vlen = 0, llen = 0; if (!conf.append_protocol || !idata->metrics->protocol) return; vlen = strlen (idata->metrics->protocol); llen = strlen (MTRC_PROTOCOLS_SHORT_LBL); if (vlen > meta->protocol_len) meta->protocol_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->protocol_len) meta->protocol_len = llen; } /* Get the percent integer length. */ static void set_max_data_len (GDashMeta *meta, GDashData *idata) { int vlen = 0, llen = 0; vlen = strlen (idata->metrics->data); llen = strlen (MTRC_DATA_LBL); if (vlen > meta->data_len) meta->data_len = vlen; /* if outputting with column names, then determine if the value is * longer than the length of the column name */ if (llen > meta->data_len) meta->data_len = llen; } static void set_metrics_len (GDashMeta *meta, GDashData *idata) { /* integer-based length */ set_max_hit_len (meta, idata); set_max_hit_perc_len (meta, idata); set_max_visitors_len (meta, idata); set_max_visitors_perc_len (meta, idata); /* string-based length */ set_max_bw_len (meta, idata); set_max_avgts_len (meta, idata); set_max_cumts_len (meta, idata); set_max_maxts_len (meta, idata); set_max_method_len (meta, idata); set_max_protocol_len (meta, idata); set_max_data_len (meta, idata); } /* Render host's panel selected row */ static void render_data_hosts (WINDOW *win, GDashRender render, char *value, int x) { char *padded_data; padded_data = left_pad_str (value, x); draw_header (win, padded_data, "%s", render.y, 0, render.w, color_selected); free (padded_data); } /* Set panel's date on the given buffer * * On error, '---' placeholder is returned. * On success, the formatted date is returned. */ static char * set_visitors_date (const char *value) { return get_visitors_date (value, conf.spec_date_time_num_format, conf.spec_date_time_format); } static char * get_fixed_fmt_width (int w, char type) { char *fmt = xmalloc (snprintf (NULL, 0, "%%%d%c", w, type) + 1); sprintf (fmt, "%%%d%c", w, type); return fmt; } /* Render the 'total' label on each panel */ static void render_total_label (WINDOW *win, GDashModule *data, int y, GColors *(*func) (void)) { char *s; int win_h, win_w, total, ht_size; total = data->holder_size; ht_size = data->ht_size; s = xmalloc (snprintf (NULL, 0, "%s: %d/%d", GEN_TOTAL, total, ht_size) + 1); getmaxyx (win, win_h, win_w); (void) win_h; sprintf (s, "%s: %d/%d", GEN_TOTAL, total, ht_size); draw_header (win, s, "%s", y, win_w - strlen (s) - 2, win_w, func); free (s); } /* Render panel bar graph */ static void render_bars (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color (COLOR_BARS); WINDOW *win = render.win; char *bar; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; bar = get_bars (data->data[idx].metrics->hits, data->meta.max_hits, *x); if (sel) draw_header (win, bar, "%s", y, *x, w, color_selected); else { wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%s", bar); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } free (bar); } /* Render the data metric for each panel */ static void render_data (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_DATA, data->module); WINDOW *win = render.win; char *date = NULL, *value = NULL, *buf = NULL; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; int date_len = 0; value = substring (data->data[idx].metrics->data, 0, w - *x); if (data->module == VISITORS) { date = set_visitors_date (value); date_len = strlen (date); } if (sel && data->module == HOSTS && data->data[idx].is_subitem) { render_data_hosts (win, render, value, *x); } else if (sel) { buf = data->module == VISITORS ? date : value; draw_header (win, buf, "%s", y, *x, w, color_selected); } else { wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%s", data->module == VISITORS ? date : value); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } *x += data->module == VISITORS ? date_len : data->meta.data_len; *x += DASH_SPACE; free (value); free (date); } /* Render the method metric for each panel * * On error, no method is rendered and it returns. * On success, method is rendered. */ static void render_method (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_MTHD, data->module); WINDOW *win = render.win; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; char *method = data->data[idx].metrics->method; if (method == NULL || *method == '\0') return; if (sel) { /* selected state */ draw_header (win, method, "%s", y, *x, w, color_selected); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%s", method); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } *x += data->meta.method_len + DASH_SPACE; } /* Render the protocol metric for each panel * * On error, no protocol is rendered and it returns. * On success, protocol is rendered. */ static void render_proto (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_PROT, data->module); WINDOW *win = render.win; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; char *protocol = data->data[idx].metrics->protocol; if (protocol == NULL || *protocol == '\0') return; if (sel) { /* selected state */ draw_header (win, protocol, "%s", y, *x, w, color_selected); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%s", protocol); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } *x += REQ_PROTO_LEN - 1 + DASH_SPACE; } /* Render the average time served metric for each panel */ static void render_avgts (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_AVGTS, data->module); WINDOW *win = render.win; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; char *avgts = data->data[idx].metrics->avgts.sts; if (data->module == HOSTS && data->data[idx].is_subitem) goto out; if (sel) { /* selected state */ draw_header (win, avgts, "%9s", y, *x, w, color_selected); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%9s", avgts); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } out: *x += DASH_SRV_TM_LEN + DASH_SPACE; } /* Render the cumulative time served metric for each panel */ static void render_cumts (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_CUMTS, data->module); WINDOW *win = render.win; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; char *cumts = data->data[idx].metrics->cumts.sts; if (data->module == HOSTS && data->data[idx].is_subitem) goto out; if (sel) { /* selected state */ draw_header (win, cumts, "%9s", y, *x, w, color_selected); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%9s", cumts); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } out: *x += DASH_SRV_TM_LEN + DASH_SPACE; } /* Render the maximum time served metric for each panel */ static void render_maxts (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_MAXTS, data->module); WINDOW *win = render.win; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; char *maxts = data->data[idx].metrics->maxts.sts; if (data->module == HOSTS && data->data[idx].is_subitem) goto out; if (sel) { /* selected state */ draw_header (win, maxts, "%9s", y, *x, w, color_selected); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%9s", maxts); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } out: *x += DASH_SRV_TM_LEN + DASH_SPACE; } /* Render the bandwidth metric for each panel */ static void render_bw (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_BW, data->module); WINDOW *win = render.win; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; char *bw = data->data[idx].metrics->bw.sbw; if (data->module == HOSTS && data->data[idx].is_subitem) goto out; if (sel) { char *fw = get_fixed_fmt_width (data->meta.bw_len, 's'); /* selected state */ draw_header (win, bw, fw, y, *x, w, color_selected); free (fw); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%*s", data->meta.bw_len, bw); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } out: *x += data->meta.bw_len + DASH_SPACE; } /* Render a percent metric */ static void render_percent (GDashRender render, GColors *color, float perc, int len, int x) { WINDOW *win = render.win; char *percent; int y = render.y, w = render.w, sel = render.sel; if (sel) { /* selected state */ percent = float2str (perc, len); draw_header (win, percent, "%s%%", y, x, w, color_selected); free (percent); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, x, "%*.2f%%", len, perc); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } } /* Render the hits percent metric for each panel */ static void render_hits_percent (GDashModule *data, GDashRender render, int *x) { GColorItem item = COLOR_MTRC_HITS_PERC; GColors *color; int l = data->meta.hits_perc_len + 3, idx = render.idx; if (data->module == HOSTS && data->data[idx].is_subitem) goto out; if (data->meta.max_hits == data->data[idx].metrics->hits) item = COLOR_MTRC_HITS_PERC_MAX; color = get_color_by_item_module (item, data->module); render_percent (render, color, data->data[idx].metrics->hits_perc, l, *x); out: *x += l + 1 + DASH_SPACE; } /* Render the visitors percent metric for each panel */ static void render_visitors_percent (GDashModule *data, GDashRender render, int *x) { GColorItem item = COLOR_MTRC_VISITORS_PERC; GColors *color; int l = data->meta.visitors_perc_len + 3, idx = render.idx; if (data->module == HOSTS && data->data[idx].is_subitem) goto out; if (data->meta.max_visitors == data->data[idx].metrics->visitors) item = COLOR_MTRC_VISITORS_PERC_MAX; color = get_color_by_item_module (item, data->module); render_percent (render, color, data->data[idx].metrics->visitors_perc, l, *x); out: *x += l + 1 + DASH_SPACE; } /* Render the hits metric for each panel */ static void render_hits (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_HITS, data->module); WINDOW *win = render.win; char *hits; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; int len = data->meta.hits_len; if (data->module == HOSTS && data->data[idx].is_subitem) goto out; if (sel) { /* selected state */ hits = u642str (data->data[idx].metrics->hits, len); draw_header (win, hits, " %s", y, 0, w, color_selected); free (hits); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%*" PRIu64 "", len, data->data[idx].metrics->hits); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } out: *x += len + DASH_SPACE; } /* Render the visitors metric for each panel */ static void render_visitors (GDashModule *data, GDashRender render, int *x) { GColors *color = get_color_by_item_module (COLOR_MTRC_VISITORS, data->module); WINDOW *win = render.win; char *visitors; int y = render.y, w = render.w, idx = render.idx, sel = render.sel; int len = data->meta.visitors_len; if (data->module == HOSTS && data->data[idx].is_subitem) goto out; if (sel) { /* selected state */ visitors = u642str (data->data[idx].metrics->visitors, len); draw_header (win, visitors, "%s", y, *x, w, color_selected); free (visitors); } else { /* regular state */ wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%*" PRIu64 "", len, data->data[idx].metrics->visitors); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); } out: *x += len + DASH_SPACE; } /* Render the header row for each panel */ static void render_header (WINDOW *win, GDashModule *data, GModule cur_module, int *y) { GColors *(*func) (void); char ind; char *hd; int k, w, h; getmaxyx (win, h, w); (void) h; k = data->module + 1; ind = cur_module == data->module ? '>' : ' '; func = cur_module == data->module && conf.hl_header ? color_panel_active : color_panel_header; hd = xmalloc (snprintf (NULL, 0, "%c %d - %s", ind, k, data->head) + 1); sprintf (hd, "%c %d - %s", ind, k, data->head); draw_header (win, hd, " %s", (*y), 0, w, func); free (hd); render_total_label (win, data, (*y), func); data->pos_y = (*y); (*y)++; } /* Render the description row for each panel */ static void render_description (WINDOW *win, GDashModule *data, int *y) { int w, h; getmaxyx (win, h, w); (void) h; draw_header (win, data->desc, " %s", (*y), 0, w, color_panel_desc); data->pos_y = (*y); (*y)++; (*y)++; /* add empty line underneath description */ } /* Render available metrics per panel. * ###TODO: Have the abilitity to display metrics in specific order */ static void render_metrics (GDashModule *data, GDashRender render, int expanded) { int x = get_xpos (); GModule module = data->module; const GOutput *output = output_lookup (module); /* basic metrics */ if (output->hits) render_hits (data, render, &x); if (output->percent) render_hits_percent (data, render, &x); if (output->visitors) render_visitors (data, render, &x); if (output->percent) render_visitors_percent (data, render, &x); /* render bandwidth if available */ if (conf.bandwidth && output->bw) render_bw (data, render, &x); /* render avgts, cumts and maxts if available */ if (output->avgts && conf.serve_usecs) render_avgts (data, render, &x); if (output->cumts && conf.serve_usecs) render_cumts (data, render, &x); if (output->maxts && conf.serve_usecs) render_maxts (data, render, &x); /* render request method if available */ if (output->method && conf.append_method) render_method (data, render, &x); /* render request protocol if available */ if (output->protocol && conf.append_protocol) render_proto (data, render, &x); if (output->data) render_data (data, render, &x); /* skip graph bars if module is expanded and we have sub nodes */ if ((output->graph && !expanded) || (output->sub_graph && expanded)) render_bars (data, render, &x); } /* Render a dashboard row. */ static void render_data_line (WINDOW *win, GDashModule *data, int *y, int j, GScroll *gscroll) { GDashRender render; GModule module = data->module; int expanded = 0, sel = 0; int w, h; getmaxyx (win, h, w); (void) h; if (gscroll->expanded && module == gscroll->current) expanded = 1; if (j >= data->idx_data) goto out; sel = expanded && j == gscroll->module[module].scroll ? 1 : 0; render.win = win; render.y = *y; render.w = w; render.idx = j; render.sel = sel; render_metrics (data, render, expanded); out: (*y)++; } /* Render a dashed line underneath the metric label. */ static void print_horizontal_dash (WINDOW *win, int y, int x, int len) { mvwprintw (win, y, x, "%.*s", len, "----------------"); } /* Render left-aligned column label. */ static void lprint_col (WINDOW *win, int y, int *x, int len, const char *str) { GColors *color = get_color (COLOR_PANEL_COLS); wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%s", str); print_horizontal_dash (win, y + 1, *x, len); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); *x += len + DASH_SPACE; } /* Render right-aligned column label. */ static void rprint_col (WINDOW *win, int y, int *x, int len, const char *str) { GColors *color = get_color (COLOR_PANEL_COLS); wattron (win, color->attr | COLOR_PAIR (color->pair->idx)); mvwprintw (win, y, *x, "%*s", len, str); print_horizontal_dash (win, y + 1, *x, len); wattroff (win, color->attr | COLOR_PAIR (color->pair->idx)); *x += len + DASH_SPACE; } /* Render column names for available metrics. * ###TODO: Have the abilitity to display metrics in specific order */ static void render_cols (WINDOW *win, GDashModule *data, int *y) { GModule module = data->module; const GOutput *output = output_lookup (module); int x = get_xpos (); if (data->idx_data == 0 || conf.no_column_names) return; if (output->hits) lprint_col (win, *y, &x, data->meta.hits_len, MTRC_HITS_LBL); if (output->percent) rprint_col (win, *y, &x, data->meta.hits_perc_len + 4, MTRC_HITS_PERC_LBL); if (output->visitors) rprint_col (win, *y, &x, data->meta.visitors_len, MTRC_VISITORS_SHORT_LBL); if (output->percent) rprint_col (win, *y, &x, data->meta.visitors_perc_len + 4, MTRC_VISITORS_PERC_LBL); if (output->bw && conf.bandwidth) rprint_col (win, *y, &x, data->meta.bw_len, MTRC_BW_LBL); if (output->avgts && conf.serve_usecs) rprint_col (win, *y, &x, DASH_SRV_TM_LEN, MTRC_AVGTS_LBL); if (output->cumts && conf.serve_usecs) rprint_col (win, *y, &x, DASH_SRV_TM_LEN, MTRC_CUMTS_LBL); if (output->maxts && conf.serve_usecs) rprint_col (win, *y, &x, DASH_SRV_TM_LEN, MTRC_MAXTS_LBL); if (output->method && conf.append_method) lprint_col (win, *y, &x, data->meta.method_len, MTRC_METHODS_SHORT_LBL); if (output->protocol && conf.append_protocol) lprint_col (win, *y, &x, 8, MTRC_PROTOCOLS_SHORT_LBL); if (output->data) lprint_col (win, *y, &x, 4, MTRC_DATA_LBL); } /* Iterate over all dashboard data and render its content. */ static void render_content (WINDOW *win, GDashModule *data, int *y, int *offset, int *total, GScroll *gscroll) { GModule module = data->module; int i, j, size, h, w, data_pos = get_data_pos_rows (); getmaxyx (win, h, w); (void) w; size = data->dash_size; for (i = *offset; i < size; i++) { /* header */ if ((i % size) == DASH_HEAD_POS) { render_header (win, data, gscroll->current, y); } else if ((i % size) == DASH_EMPTY_POS && conf.no_column_names) { /* if no column names, print panel description */ render_description (win, data, y); } else if ((i % size) == DASH_EMPTY_POS || (i % size) == size - 1) { /* blank lines */ (*y)++; } else if ((i % size) == DASH_DASHES_POS && !conf.no_column_names) { /* account for already printed dash lines under columns */ (*y)++; } else if ((i % size) == DASH_COLS_POS && !conf.no_column_names) { /* column headers lines */ render_cols (win, data, y); (*y)++; } else if ((i % size) >= data_pos || (i % size) <= size - 2) { /* account for 2 lines at the header and 2 blank lines */ j = ((i % size) - data_pos) + gscroll->module[module].offset; /* actual data */ render_data_line (win, data, y, j, gscroll); } else { /* everything else should be empty */ (*y)++; } (*total)++; if (*y >= h) break; } } /* Entry point to render the terminal dashboard. */ void display_content (WINDOW *win, GDash *dash, GScroll *gscroll) { GModule module; int j = 0; size_t idx = 0; int y = 0, offset = 0, total = 0; int dash_scroll = gscroll->dash; werase (win); FOREACH_MODULE (idx, module_list) { module = module_list[idx]; offset = 0; for (j = 0; j < dash->module[module].dash_size; j++) { if (dash_scroll > total) { offset++; total++; } } /* used module */ dash->module[module].module = module; render_content (win, &dash->module[module], &y, &offset, &total, gscroll); } wrefresh (win); } /* Reset the scroll and offset fields for each panel/module. */ void reset_scroll_offsets (GScroll *gscroll) { GModule module; size_t idx = 0; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; gscroll->module[module].scroll = 0; gscroll->module[module].offset = 0; } } /* Compile the regular expression and see if it's valid. * * If unable to compile, an error as described in <regex.h>. * Upon successful completion, function returns 0. */ static int regexp_init (regex_t *regex, const char *pattern) { int y, x, rc; char buf[REGEX_ERROR]; getmaxyx (stdscr, y, x); rc = regcomp (regex, pattern, REG_EXTENDED | (find_t.icase ? REG_ICASE : 0)); /* something went wrong */ if (rc != 0) { regerror (rc, regex, buf, sizeof (buf)); draw_header (stdscr, buf, "%s", y - 1, 0, x, color_error); refresh (); return 1; } return 0; } /* Set the dashboard scroll and offset based on the search index. */ static void perform_find_dash_scroll (GScroll *gscroll, GModule module) { int *scrll, *offset; int exp_size = get_num_expanded_data_rows (); /* reset gscroll offsets if we are changing module */ if (gscroll->current != module) reset_scroll_offsets (gscroll); scrll = &gscroll->module[module].scroll; offset = &gscroll->module[module].offset; (*scrll) = find_t.next_idx; if (*scrll >= exp_size && *scrll >= *offset + exp_size) (*offset) = (*scrll) < exp_size - 1 ? 0 : (*scrll) - exp_size + 1; gscroll->current = module; gscroll->dash = get_module_index (module) * DASH_COLLAPSED; gscroll->expanded = 1; find_t.module = module; } /* Find the searched item within the given sub list. * * If not found, the GFind structure is reset and 1 is returned. * If found, a GFind structure is set and 0 is returned. */ static int find_next_sub_item (GSubList *sub_list, regex_t *regex) { GSubItem *iter; int i = 0, rc; if (sub_list == NULL) goto out; for (iter = sub_list->head; iter; iter = iter->next) { if (i >= find_t.next_sub_idx) { rc = regexec (regex, iter->metrics->data, 0, NULL, 0); if (rc == 0) { find_t.next_idx++; find_t.next_sub_idx = (1 + i); return 0; } find_t.next_idx++; } i++; } out: find_t.next_parent_idx++; find_t.next_sub_idx = 0; find_t.look_in_sub = 0; return 1; } /* Perform a forward search across all modules. * * On error or if not found, 1 is returned. * On success or if found, a GFind structure is set and 0 is returned. */ int perform_next_find (GHolder *h, GScroll *gscroll) { GModule module; GSubList *sub_list; regex_t regex; char buf[REGEX_ERROR], *data; int y, x, j, n, rc; size_t idx = 0; getmaxyx (stdscr, y, x); if (find_t.pattern == NULL || *find_t.pattern == '\0') return 1; /* compile and initialize regexp */ if (regexp_init (®ex, find_t.pattern)) return 1; /* use last find_t.module and start search */ idx = find_t.module; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; n = h[module].idx; for (j = find_t.next_parent_idx; j < n; j++, find_t.next_idx++) { data = h[module].items[j].metrics->data; rc = regexec (®ex, data, 0, NULL, 0); /* error matching against the precompiled pattern buffer */ if (rc != 0 && rc != REG_NOMATCH) { regerror (rc, ®ex, buf, sizeof (buf)); draw_header (stdscr, buf, "%s", y - 1, 0, x, color_error); refresh (); regfree (®ex); return 1; } /* a match was found (data level) */ else if (rc == 0 && !find_t.look_in_sub) { find_t.look_in_sub = 1; perform_find_dash_scroll (gscroll, module); goto out; } /* look at sub list nodes */ else { sub_list = h[module].items[j].sub_list; if (find_next_sub_item (sub_list, ®ex) == 0) { perform_find_dash_scroll (gscroll, module); goto out; } } } /* reset find */ find_t.next_idx = 0; find_t.next_parent_idx = 0; find_t.next_sub_idx = 0; if (find_t.module != module) { reset_scroll_offsets (gscroll); gscroll->expanded = 0; } if (module == TOTAL_MODULES - 1) { find_t.module = 0; goto out; } } out: regfree (®ex); return 0; } /* Render a find dialog. * * On error or if no query is set, 1 is returned. * On success, the dialog is rendered and 0 is returned. */ int render_find_dialog (WINDOW *main_win, GScroll *gscroll) { int y, x, valid = 1; int w = FIND_DLG_WIDTH; int h = FIND_DLG_HEIGHT; char *query = NULL; WINDOW *win; getmaxyx (stdscr, y, x); win = newwin (h, w, (y - h) / 2, (x - w) / 2); keypad (win, TRUE); wborder (win, '|', '|', '-', '-', '+', '+', '+', '+'); draw_header (win, FIND_HEAD, " %s", 1, 1, w - 2, color_panel_header); mvwprintw (win, 2, 1, " %s", FIND_DESC); find_t.icase = 0; query = input_string (win, 4, 2, w - 3, "", 1, &find_t.icase); if (query != NULL && *query != '\0') { reset_scroll_offsets (gscroll); reset_find (); find_t.pattern = xstrdup (query); valid = 0; } if (query != NULL) free (query); touchwin (main_win); close_win (win); wrefresh (main_win); return valid; } static void set_dash_metrics (GDash **dash, GMetrics *metrics, GModule module, GPercTotals totals, int is_subitem) { GDashData *idata = NULL; GDashMeta *meta = NULL; char *data = NULL; int *idx; data = is_subitem ? render_child_node (metrics->data) : metrics->data; if (!data) return; idx = &(*dash)->module[module].idx_data; idata = &(*dash)->module[module].data[(*idx)]; meta = &(*dash)->module[module].meta; idata->metrics = new_gmetrics (); idata->is_subitem = is_subitem; idata->metrics->hits = metrics->hits; idata->metrics->hits_perc = get_percentage (totals.hits, metrics->hits); idata->metrics->visitors = metrics->visitors; idata->metrics->visitors_perc = get_percentage (totals.visitors, metrics->visitors); idata->metrics->bw.sbw = filesize_str (metrics->bw.nbw); idata->metrics->data = xstrdup (data); if (conf.append_method && metrics->method) idata->metrics->method = metrics->method; if (conf.append_protocol && metrics->protocol) idata->metrics->protocol = metrics->protocol; if (!conf.serve_usecs) goto out; idata->metrics->avgts.sts = usecs_to_str (metrics->avgts.nts); idata->metrics->cumts.sts = usecs_to_str (metrics->cumts.nts); idata->metrics->maxts.sts = usecs_to_str (metrics->maxts.nts); out: if (is_subitem) free (data); set_metrics_len (meta, idata); set_max_metrics (meta, idata); (*idx)++; } /* Add an item from a sub list to the dashboard. * * If no items on the sub list, the function returns. * On success, sub list data is set into the dashboard structure. */ static void add_sub_item_to_dash (GDash **dash, GHolderItem item, GModule module, GPercTotals totals, int *i) { GSubList *sub_list = item.sub_list; GSubItem *iter; if (sub_list == NULL) return; for (iter = sub_list->head; iter; iter = iter->next, (*i)++) { set_dash_metrics (dash, iter->metrics, module, totals, 1); } } /* Add a first level item to dashboard. * * On success, data is set into the dashboard structure. */ static void add_item_to_dash (GDash **dash, GHolderItem item, GModule module, GPercTotals totals) { set_dash_metrics (dash, item.metrics, module, totals, 0); } /* Load holder's data into the dashboard structure. */ void load_data_to_dash (GHolder *h, GDash *dash, GModule module, GScroll *gscroll) { int alloc_size = 0; int i, j; GPercTotals totals; alloc_size = dash->module[module].alloc_data; if (gscroll->expanded && module == gscroll->current) alloc_size += h->sub_items_size; dash->module[module].alloc_data = alloc_size; dash->module[module].data = new_gdata (alloc_size); dash->module[module].holder_size = h->holder_size; memset (&dash->module[module].meta, 0, sizeof (GDashData)); set_module_totals (&totals); for (i = 0, j = 0; i < alloc_size; i++) { if (h->items[j].metrics->data == NULL) continue; add_item_to_dash (&dash, h->items[j], module, totals); if (gscroll->expanded && module == gscroll->current && h->sub_items_size) add_sub_item_to_dash (&dash, h->items[j], module, totals, &i); j++; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/goaccess.h�����������������������������������������������������������������������0000644�0001750�0001730�00000003134�14624731651�011533� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef GOACCESS_H_INCLUDED #define GOACCESS_H_INCLUDED #include "ui.h" #define RAND_FN 7 + 1 extern GSpinner *parsing_spinner; extern int active_gdns; /* kill dns pthread flag */ void read_client (void *ptr_data); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/util.h���������������������������������������������������������������������������0000644�0001750�0001730�00000010111�14624731651�010712� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef UTIL_H_INCLUDED #define UTIL_H_INCLUDED #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #define REGEX_ERROR 100 #define KIB(n) (n << 10) #define MIB(n) (n << 20) #define GIB(n) (n << 30) #define TIB(n) (n << 40) #define PIB(n) (n << 50) #define MILS 1000ULL #define SECS 1000000ULL #define MINS 60000000ULL #define HOUR 3600000000ULL #define DAY 86400000000ULL #define TZ_NAME_LEN 48 #define RAND_FN 7 + 1 /* Convenient macros */ #define MIN(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a < _b ? _a : _b; }) #define MAX(a,b) (((a)>(b))?(a):(b)) /* *INDENT-OFF* */ #include <stdint.h> #include <sys/types.h> #include <time.h> char *alloc_string (const char *str); char *char_repeat (int n, char c); char *char_replace (char *str, char o, char n); char *deblank (char *str); char *escape_str (const char *src); char *filesize_str (unsigned long long log_size); char *float2str (float d, int width); char *get_global_config (void); char *get_user_config (void); char *get_visitors_date (const char *odate, const char *from, const char *to); char *int2str (int d, int width); char *left_pad_str (const char *s, int indent); char *ltrim (char *s); char *regex_extract_string (const char *str, const char *regex, int max_groups, char const **err); char *rtrim (char *s); char *strtoupper (char *str); char *substring (const char *str, int begin, int len); char *trim_str (char *str); char *u322str (uint32_t d, int width); char *u642str (uint64_t d, int width); char *unescape_str (const char *src); char *usecs_to_str (unsigned long long usec); const char *verify_status_code (int code); const char *verify_status_code_type (int code); int convert_date (char *res, const char *data, const char *from, const char *to, int size); int count_matches (const char *s1, char c); int find_output_type (char **filename, const char *ext, int alloc); int hide_referer (const char *host); int ignore_referer (const char *host); int intlen (uint64_t num); int invalid_ipaddr (const char *str, int *ipvx); int ip_in_range (const char *ip); int is_valid_http_status (int code); int ptr2int (char *ptr); int str2int (const char *date); int str_inarray (const char *s, const char *arr[], int size); int str_to_time (const char *str, const char *fmt, struct tm *tm, int tz); int valid_output_type (const char *filename); off_t file_size (const char *filename); size_t append_str (char **dest, const char *src); uint32_t djb2 (const unsigned char *str); uint64_t u64encode (uint32_t x, uint32_t y); void genstr (char *dest, size_t len); void set_tz (void); void strip_newlines (char *str); void u64decode (uint64_t n, uint32_t * x, uint32_t * y); void xstrncpy (char *dest, const char *source, const size_t dest_size); /* *INDENT-ON* */ #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/win/�����������������������������������������������������������������������������0000755�0001750�0001730�00000000000�14626467007�010452� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/win/mman.h�����������������������������������������������������������������������0000644�0001750�0001730�00000003275�14624731651�011477� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef _MMAN_H_ #define _MMAN_H_ /* Protections */ #define PROT_NONE 0x00 /* no permissions */ #define PROT_READ 0x01 /* pages can be read */ #define PROT_WRITE 0x02 /* pages can be written */ #define PROT_EXEC 0x04 /* pages can be executed */ /* Sharing type and options */ #define MAP_SHARED 0x0001 /* share changes */ #define MAP_PRIVATE 0x0002 /* changes are private */ #define MAP_COPY MAP_PRIVATE /* Obsolete */ #define MAP_FIXED 0x0010 /* map addr must be exactly as requested */ #define MAP_RENAME 0x0020 /* Sun: rename private pages to file */ #define MAP_NORESERVE 0x0040 /* Sun: don't reserve needed swap area */ #define MAP_INHERIT 0x0080 /* region is retained after exec */ #define MAP_NOEXTEND 0x0100 /* for MAP_FILE, don't change file size */ #define MAP_HASSEMAPHORE 0x0200 /* region may contain semaphores */ #define MAP_STACK 0x0400 /* region grows down, like a stack */ /* Error returned from mmap() */ #define MAP_FAILED ((void *)-1) /* Flags to msync */ #define MS_ASYNC 0x01 /* perform asynchronous writes */ #define MS_SYNC 0x02 /* perform synchronous writes */ #define MS_INVALIDATE 0x04 /* invalidate cached data */ /* File modes for 'open' not defined in MinGW32 (not used by mmap) */ #ifndef S_IWGRP #define S_IWGRP 0 #define S_IRGRP 0 #define S_IROTH 0 #endif /** * Map a file to a memory region */ void *mmap (void *addr, unsigned int len, int prot, int flags, int fd, unsigned int offset); /** * Unmap a memory region */ int munmap (void *addr, int len); /** * Synchronize a mapped region */ int msync (char *addr, int len, int flags); #endif /* _MMAN_H_ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/win/mmap.c�����������������������������������������������������������������������0000644�0001750�0001730�00000007243�14624731651�011473� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdlib.h> #include <windows.h> #ifdef _WIN32 #include <io.h> #endif #include <errno.h> #include "mman.h" static const char id[] = "$Id: tpl.c 107 2007-04-20 17:11:29Z thanson $"; /** * @brief Map a file to a memory region * * This function emulates the POSIX mmap() using CreateFileMapping() and * MapViewOfFile() * * @param addr the suggested start address (if != 0) * @param len length of the region * @param prot region accessibility, bitwise OR of PROT_READ, PROT_WRITE, PROT_EXEC * @param flags mapping type and options (ignored) * @param fd object to be mapped into memory * @param offset offset into mapped object * @return pointer to the memory region, or NULL in case of error */ void * mmap (void *addr, unsigned int len, int prot, int flags, int fd, unsigned int offset) { DWORD wprot; DWORD waccess; HANDLE h; void *region; /* Translate read/write/exec flags into WIN32 constants */ switch (prot) { case PROT_READ: wprot = PAGE_READONLY; break; case PROT_EXEC: wprot = PAGE_EXECUTE_READ; break; case PROT_READ | PROT_EXEC: wprot = PAGE_EXECUTE_READ; break; case PROT_WRITE: wprot = PAGE_READWRITE; break; case PROT_READ | PROT_WRITE: wprot = PAGE_READWRITE; break; case PROT_READ | PROT_WRITE | PROT_EXEC: wprot = PAGE_EXECUTE_READWRITE; break; case PROT_WRITE | PROT_EXEC: wprot = PAGE_EXECUTE_READWRITE; break; } /* Obtaing handle to map region */ h = CreateFileMapping ((HANDLE) _get_osfhandle (fd), 0, wprot, 0, len, 0); if (h == NULL) { DWORD error = GetLastError (); /* Try and translate some error codes */ switch (error) { case ERROR_ACCESS_DENIED: case ERROR_INVALID_ACCESS: errno = EACCES; break; case ERROR_OUTOFMEMORY: case ERROR_NOT_ENOUGH_MEMORY: errno = ENOMEM; break; default: errno = EINVAL; break; } return MAP_FAILED; } /* Translate sharing options into WIN32 constants */ switch (wprot) { case PAGE_READONLY: waccess = FILE_MAP_READ; break; case PAGE_READWRITE: waccess = FILE_MAP_WRITE; break; } /* Map file and return pointer */ region = MapViewOfFile (h, waccess, 0, 0, 0); if (region == NULL) { DWORD error = GetLastError (); /* Try and translate some error codes */ switch (error) { case ERROR_ACCESS_DENIED: case ERROR_INVALID_ACCESS: errno = EACCES; break; case ERROR_INVALID_HANDLE: errno = EBADF; break; default: errno = EINVAL; break; } CloseHandle (h); return MAP_FAILED; } CloseHandle (h); /* ok to call UnmapViewOfFile after this */ /* All fine */ return region; } /** * @brief Unmap a memory region * * This is a wrapper around UnmapViewOfFile in the win32 API * * @param addr start address * @param len length of the region * @return 0 for success, -1 for error */ int munmap (void *addr, int len) { if (UnmapViewOfFile (addr)) { return 0; } else { errno = EINVAL; return -1; } } /** * Synchronize a mapped region * * This is a wrapper around FlushViewOfFile * * @param addr start address * @param len number of bytes to flush * @param flags sync options -- currently ignored * @return 0 for success, -1 for error */ int msync (char *addr, int len, int flags) { if (FlushViewOfFile (addr, len) == 0) { DWORD error = GetLastError (); /* Try and translate some error codes */ switch (error) { case ERROR_INVALID_PARAMETER: errno = EINVAL; break; case ERROR_WRITE_FAULT: errno = EIO; break; default: errno = EINVAL; break; } return -1; } /* Success */ return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gmenu.h��������������������������������������������������������������������������0000644�0001750�0001730�00000004314�14624731651�011060� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #ifdef HAVE_NCURSESW_NCURSES_H #include <ncursesw/ncurses.h> #elif HAVE_NCURSES_NCURSES_H #include <ncurses/ncurses.h> #elif HAVE_NCURSES_H #include <ncurses.h> #elif HAVE_CURSES_H #include <curses.h> #endif #ifndef GMENU_H_INCLUDED #define GMENU_H_INCLUDED enum ACTION { REQ_DOWN, REQ_UP, REQ_SEL }; typedef struct GMenu_ GMenu; typedef struct GItem_ GItem; /* Menu Item */ struct GItem_ { char *name; int checked; }; /* Menu Panel */ struct GMenu_ { WINDOW *win; int count; int size; int idx; int start; int h; int w; int x; int y; unsigned short multiple; unsigned short selectable; unsigned short status; GItem *items; }; GMenu *new_gmenu (WINDOW * parent, int h, int w, int y, int x); int post_gmenu (GMenu * menu); void gmenu_driver (GMenu * menu, int c); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/ui.h�����������������������������������������������������������������������������0000644�0001750�0001730�00000017422�14624731651�010366� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef UI_H_INCLUDED #define UI_H_INCLUDED #ifdef HAVE_NCURSESW_NCURSES_H #include <ncursesw/ncurses.h> #elif HAVE_NCURSES_NCURSES_H #include <ncurses/ncurses.h> #elif HAVE_NCURSES_H #include <ncurses.h> #elif HAVE_CURSES_H #include <curses.h> #endif #ifdef HAVE_LIBPTHREAD #include <pthread.h> #endif /* string literals and translations */ #include "labels.h" #include "commons.h" /* Global UI defaults */ #define MIN_HEIGHT 8 /* minimum window height */ #define MIN_WIDTH 0 /* minimum window width */ #define MAX_HEIGHT_FOOTER 1 /* height of the footer window */ #define MAX_HEIGHT_HEADER 7 /* height of the header window */ #define OVERALL_NUM_COLS 4 /* number of columns on the overall stats win */ /* Spinner Label Format */ #define SPIN_FMT "%s" #define SPIN_FMTM "[%s %s] {%'"PRIu64"} @ {%'lld/s}" #define SPIN_LBL 256 /* max length of the progress spinner */ #define SPIN_UPDATE_INTERVAL 100000000 /* in nanoseconds */ /* Module JSON keys */ #define VISITORS_ID "visitors" #define REQUESTS_ID "requests" #define REQUESTS_STATIC_ID "static_requests" #define VISIT_TIMES_ID "visit_time" #define VIRTUAL_HOSTS_ID "vhosts" #define REMOTE_USER_ID "remote_user" #define CACHE_STATUS_ID "cache_status" #define NOT_FOUND_ID "not_found" #define HOSTS_ID "hosts" #define OS_ID "os" #define BROWSERS_ID "browsers" #define REFERRERS_ID "referrers" #define REFERRING_SITES_ID "referring_sites" #define KEYPHRASES_ID "keyphrases" #define GEO_LOCATION_ID "geolocation" #define ASN_ID "asn" #define STATUS_CODES_ID "status_codes" #define GENER_ID "general" #define MIME_TYPE_ID "mime_type" #define TLS_TYPE_ID "tls_type" /* Overall Statistics CSV/JSON Keys */ #define OVERALL_STARTDATE "start_date" #define OVERALL_ENDDATE "end_date" #define OVERALL_DATETIME "date_time" #define OVERALL_REQ "total_requests" #define OVERALL_VALID "valid_requests" #define OVERALL_GENTIME "generation_time" #define OVERALL_FAILED "failed_requests" #define OVERALL_VISITORS "unique_visitors" #define OVERALL_FILES "unique_files" #define OVERALL_EXCL_HITS "excluded_hits" #define OVERALL_REF "unique_referrers" #define OVERALL_NOTFOUND "unique_not_found" #define OVERALL_STATIC "unique_static_files" #define OVERALL_LOGSIZE "log_size" #define OVERALL_BANDWIDTH "bandwidth" #define OVERALL_LOG "log_path" /* CONFIG DIALOG */ #define CONF_MENU_H 6 #define CONF_MENU_W 67 #define CONF_MENU_X 2 #define CONF_MENU_Y 4 #define CONF_WIN_H 20 #define CONF_WIN_W 71 #define CONF_MAX_LEN_DLG 512 /* FIND DIALOG */ #define FIND_DLG_HEIGHT 8 #define FIND_DLG_WIDTH 50 #define FIND_MAX_MATCHES 1 /* COLOR SCHEME DIALOG */ #define SCHEME_MENU_H 4 #define SCHEME_MENU_W 38 #define SCHEME_MENU_X 2 #define SCHEME_MENU_Y 4 #define SCHEME_WIN_H 10 #define SCHEME_WIN_W 42 /* SORT DIALOG */ #define SORT_MENU_H 6 #define SORT_MENU_W 38 #define SORT_MENU_X 2 #define SORT_MENU_Y 4 #define SORT_WIN_H 13 #define SORT_WIN_W 42 /* AGENTS DIALOG */ #define AGENTS_MENU_X 2 #define AGENTS_MENU_Y 4 /* HELP DIALOG */ #define HELP_MENU_HEIGHT 12 #define HELP_MENU_WIDTH 60 #define HELP_MENU_X 2 #define HELP_MENU_Y 4 #define HELP_WIN_HEIGHT 17 #define HELP_WIN_WIDTH 64 /* CONF ERROR DIALOG */ #define ERR_MENU_HEIGHT 10 #define ERR_MENU_WIDTH 67 #define ERR_MENU_X 2 #define ERR_MENU_Y 4 #define ERR_WIN_HEIGHT 15 #define ERR_WIN_WIDTH 71 #include "color.h" #include "commons.h" #include "sort.h" /* Curses dashboard find */ typedef struct GFind_ { GModule module; char *pattern; int next_idx; int next_parent_idx; int next_sub_idx; int look_in_sub; int done; int icase; } GFind; /* Each panel contains its own scrolling and offset */ typedef struct GScrollModule_ { int scroll; int offset; } GScrollModule; /* Curses Scrolling */ typedef struct GScroll_ { GScrollModule module[TOTAL_MODULES]; GModule current; int dash; int expanded; } GScroll; /* Spinner or Progress Indicator */ typedef struct GSpinner_ { const char *label; GColors *(*color) (void); int curses; int spin_x; int w; int x; int y; pthread_mutex_t mutex; pthread_t thread; uint64_t **processed; char **filename; WINDOW *win; enum { SPN_RUN, SPN_END } state; } GSpinner; /* Controls metric output. * i.e., which metrics it should display */ typedef struct GOutput_ { GModule module; int8_t visitors; int8_t hits; int8_t percent; int8_t bw; int8_t avgts; int8_t cumts; int8_t maxts; int8_t protocol; int8_t method; int8_t data; int8_t graph; /* display bars when collapsed */ int8_t sub_graph; /* display bars upon expanding it */ } GOutput; /* *INDENT-OFF* */ const GOutput *output_lookup (GModule module); GSpinner *new_gspinner (void); char *get_browser_type (char *line); char *get_overall_header (GHolder *h); char *input_string (WINDOW * win, int pos_y, int pos_x, size_t max_width, const char *str, int enable_case, int *toggle_case); const char *module_to_desc (GModule module); const char *module_to_head (GModule module); const char *module_to_id (GModule module); const char *module_to_label (GModule module); GAgents *load_host_agents (const char *addr); int get_start_end_parsing_dates (char **start, char **end, const char *f); int render_confdlg (Logs * logs, GSpinner * spinner); void close_win (WINDOW * w); void display_general (WINDOW * win, GHolder *h); void draw_header (WINDOW * win, const char *s, const char *fmt, int y, int x, int w, GColors * (*func) (void)); void end_spinner (void); void generate_time (void); void init_colors (int force); void init_windows (WINDOW ** header_win, WINDOW ** main_win); void load_agent_list (WINDOW * main_win, char *addr); void load_help_popup (WINDOW * main_win); void load_schemes_win (WINDOW * main_win); void load_sort_win (WINDOW * main_win, GModule module, GSort * sort); void lock_spinner (void); void set_curses_spinner (GSpinner *spinner); void set_input_opts (void); void set_wbkgd (WINDOW *main_win, WINDOW *header_win); void term_size (WINDOW * main_win, int *main_win_height); void ui_spinner_create (GSpinner * spinner); void unlock_spinner (void); void update_active_module (WINDOW * header_win, GModule current); void update_header (WINDOW * header_win, int current); /* *INDENT-ON* */ #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/options.h������������������������������������������������������������������������0000644�0001750�0001730�00000003273�14624731651�011443� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef OPTIONS_H_INCLUDED #define OPTIONS_H_INCLUDED #define CYN "\x1B[36m" #define RESET "\x1B[0m" #define HTML_REFRESH 1 /* in seconds */ void add_dash_filename (void); void cmd_help (void) __attribute__((noreturn)); void read_option_args (int argc, char **argv); void verify_global_config (int argc, char **argv); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/settings.h�����������������������������������������������������������������������0000644�0001750�0001730�00000025756�14624731651�011622� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef SETTINGS_H_INCLUDED #define SETTINGS_H_INCLUDED #include <stdint.h> #include "commons.h" #define MAX_LINE_CONF 4096 #define MAX_EXTENSIONS 128 #define MAX_GEOIP_DBS 3 #define MAX_IGNORE_IPS 1024 + 128 #define MAX_IGNORE_REF 64 #define MAX_CUSTOM_COLORS 64 #define MAX_IGNORE_STATUS 64 #define MAX_OUTFORMATS 3 #define MAX_FILENAMES 3072 #define MIN_DATENUM_FMT_LEN 7 #define NO_CONFIG_FILE "No config file used" typedef enum LOGTYPE { COMBINED, VCOMBINED, COMMON, VCOMMON, W3C, CLOUDFRONT, CLOUDSTORAGE, AWSELB, SQUID, AWSS3, CADDY, AWSALB, TRAEFIKCLF, } GLogType; /* predefined log times */ typedef struct GPreConfTime_ { const char *fmt24; const char *usec; const char *sec; } GPreConfTime; /* predefined log dates */ typedef struct GPreConfDate_ { const char *apache; const char *w3c; const char *usec; const char *sec; } GPreConfDate; /* predefined log formats */ typedef struct GPreConfLog_ { const char *combined; const char *vcombined; const char *common; const char *vcommon; const char *w3c; const char *cloudfront; const char *cloudstorage; const char *awselb; const char *squid; const char *awss3; const char *caddy; const char *awsalb; const char *traefikclf; } GPreConfLog; /* *INDENT-OFF* */ /* All configuration properties */ typedef struct GConf_ { /* Array options */ const char *colors[MAX_CUSTOM_COLORS]; /* colors */ const char *enable_panels[TOTAL_MODULES]; /* array of panels to enable */ const char *filenames[MAX_FILENAMES]; /* log files */ const char *hide_referers[MAX_IGNORE_REF]; /* hide referrers from report */ const char *ignore_ips[MAX_IGNORE_IPS]; /* array of ips to ignore */ const char *ignore_panels[TOTAL_MODULES]; /* array of panels to ignore */ const char *ignore_referers[MAX_IGNORE_REF]; /* referrers to ignore */ int ignore_status[MAX_IGNORE_STATUS]; /* status to ignore */ const char *output_formats[MAX_OUTFORMATS]; /* output format, e.g. , HTML */ const char *sort_panels[TOTAL_MODULES]; /* sorting options for each panel */ const char *static_files[MAX_EXTENSIONS]; /* static extensions */ const char *geoip_databases[MAX_GEOIP_DBS]; /* geoip db paths */ /* Log/date/time formats */ const char *tz_name; /* Canonical TZ name, e.g., America/Chicago */ char *date_time_format; /* date & time format */ char *date_format; /* date format */ char *date_num_format; /* numeric date format %Y%m%d */ char *time_format; /* time format as given by the user */ char *spec_date_time_format; /* date format w/ specificity */ char *spec_date_time_num_format; /* numeric date format w/ specificity */ char *log_format; /* log format */ char *iconfigfile; /* config file path */ char ***user_browsers_hash; /* custom list of browsers */ const char *debug_log; /* debug log path */ const char *html_custom_css; /* custom CSS */ const char *html_custom_js; /* custom JS */ const char *html_prefs; /* default HTML JSON preferences */ const char *html_report_title; /* report title */ const char *invalid_requests_log; /* invalid lines log path */ const char *unknowns_log; /* unknown browsers/OSs log path */ const char *pidfile; /* daemonize pid file path */ const char *browsers_file; /* browser's file path */ const char *db_path; /* db path to files */ const char *fname_as_vhost; /* filenames as vhost/server blocks */ /* HTML real-time */ const char *addr; /* IP address to bind to */ const char *fifo_in; /* path FIFO in (reader) */ const char *fifo_out; /* path FIFO out (writer) */ const char *origin; /* WebSocket origin */ const char *port; /* port to use */ const char *sslcert; /* TLS/SSL path to certificate */ const char *sslkey; /* TLS/SSL path to private key */ const char *ws_url; /* WebSocket URL */ const char *ping_interval; /* WebSocket ping interval in seconds */ const char *unix_socket; /* unix socket to bind to */ /* User flags */ int all_static_files; /* parse all static files */ int anonymize_ip; /* anonymize ip addresses */ int anonymize_level; /* anonymization level */ int append_method; /* append method to the req key */ int append_protocol; /* append protocol to the req key */ int client_err_to_unique_count; /* count 400s as visitors */ int code444_as_404; /* 444 as 404s? */ int color_scheme; /* color scheme */ int chunk_size; /* chunk size for each thread */ int crawlers_only; /* crawlers only */ int daemonize; /* run program as a Unix daemon */ const char *username; /* user to run program as */ int double_decode; /* need to double decode */ int external_assets; /* write JS/CSS assets to external files */ int enable_html_resolver; /* html/json/csv resolver */ int geo_db; /* legacy geoip db */ int hl_header; /* highlight header on term */ int ignore_crawlers; /* ignore crawlers */ int unknowns_as_crawlers; /* unknown OS and browsers are classified as crawlers */ int ignore_qstr; /* ignore query string */ int ignore_statics; /* ignore static files */ int jobs; /* multi-thread jobs count */ int json_pretty_print; /* pretty print JSON data */ int list_agents; /* show list of agents per host */ int load_conf_dlg; /* load curses config dialog */ int load_global_config; /* use global config file */ int max_items; /* max number of items to output */ int mouse_support; /* add curses mouse support */ int no_color; /* no terminal colors */ int no_strict_status; /* don't enforce 100-599 status codes */ int no_column_names; /* don't show col names on terminal */ int no_csv_summary; /* don't show overall metrics */ int no_html_last_updated; /* don't show HTML last updated field */ int no_ip_validation; /* don't validate client IP addresses */ int no_parsing_spinner; /* disable parsing spinner */ int no_progress; /* disable progress metrics */ int no_tab_scroll; /* don't scroll dashboard on tab */ int output_stdout; /* outputting to stdout */ int persist; /* ensure to persist data on exit */ int process_and_exit; /* parse and exit without outputting */ int real_os; /* show real OSs */ int real_time_html; /* enable real-time HTML output */ int restore; /* reload data from db-path */ int skip_term_resolver; /* no terminal resolver */ int is_json_log_format; /* is a json log format */ uint32_t keep_last; /* number of days to keep in storage */ uint32_t num_tests; /* number of lines to test */ uint64_t html_refresh; /* refresh html report every X of seconds */ uint64_t log_size; /* log size override */ /* Internal flags */ int bandwidth; /* is there bandwidth within the req line */ int date_spec_hr; /* date specificity - hour */ int has_geocity; int has_geocountry; int has_geoasn; int hour_spec_min; /* hour specificity - min */ int read_stdin; /* read from stdin */ int serve_usecs; /* is there time served within req line */ int stop_processing; /* stop all processing */ int tailing_mode; /* in tailing-mode? */ /* Array indices */ int color_idx; /* colors index */ int enable_panel_idx; /* enable panels index */ int filenames_idx; /* filenames index */ int hide_referer_idx; /* hide referrers index */ int ignore_ip_idx; /* ignored ips index */ int ignore_panel_idx; /* ignored panels index */ int ignore_referer_idx; /* ignored referrers index */ int ignore_status_idx; /* ignore status index */ int output_format_idx; /* output format index */ int sort_panel_idx; /* sort panel index */ int static_file_idx; /* static extensions index */ int geoip_db_idx; /* geoip db index */ int browsers_hash_idx; /* browsers hash index */ size_t static_file_max_len; } GConf; /* *INDENT-ON* */ char *get_selected_date_str (size_t idx); char *get_selected_format_str (size_t idx); char *get_selected_time_str (size_t idx); const char *verify_formats (void); int is_json_log_format (const char *fmt); int parse_json_string (void *userdata, const char *str, int (*cb) (void *, char *, char *)); size_t get_selected_format_idx (void); void set_date_format_str (const char *optarg); void set_log_format_str (const char *optarg); void set_spec_date_format (void); void set_time_format_str (const char *optarg); extern GConf conf; char *get_config_file_path (void); int parse_conf_file (int *argc, char ***argv); void free_cmd_args (void); void free_formats (void); void set_default_static_files (void); #endif ������������������goaccess-1.9.3/src/color.c��������������������������������������������������������������������������0000644�0001750�0001730�00000065113�14624731651�011062� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * color.c -- functions related to custom color * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include "color.h" #include "error.h" #include "gslist.h" #include "util.h" #include "xmalloc.h" static GSLList *color_list = NULL; static GSLList *pair_list = NULL; /* *INDENT-OFF* */ static const GEnum CSTM_COLORS[] = { {"COLOR_MTRC_HITS" , COLOR_MTRC_HITS}, {"COLOR_MTRC_VISITORS" , COLOR_MTRC_VISITORS}, {"COLOR_MTRC_HITS_PERC" , COLOR_MTRC_HITS_PERC}, {"COLOR_MTRC_VISITORS_PERC" , COLOR_MTRC_VISITORS_PERC}, {"COLOR_MTRC_BW" , COLOR_MTRC_BW}, {"COLOR_MTRC_AVGTS" , COLOR_MTRC_AVGTS}, {"COLOR_MTRC_CUMTS" , COLOR_MTRC_CUMTS}, {"COLOR_MTRC_MAXTS" , COLOR_MTRC_MAXTS}, {"COLOR_MTRC_PROT" , COLOR_MTRC_PROT}, {"COLOR_MTRC_MTHD" , COLOR_MTRC_MTHD}, {"COLOR_MTRC_DATA" , COLOR_MTRC_DATA}, {"COLOR_MTRC_HITS_PERC_MAX" , COLOR_MTRC_HITS_PERC_MAX}, {"COLOR_MTRC_VISITORS_PERC_MAX" , COLOR_MTRC_VISITORS_PERC_MAX}, {"COLOR_PANEL_COLS" , COLOR_PANEL_COLS}, {"COLOR_BARS" , COLOR_BARS}, {"COLOR_ERROR" , COLOR_ERROR}, {"COLOR_SELECTED" , COLOR_SELECTED}, {"COLOR_PANEL_ACTIVE" , COLOR_PANEL_ACTIVE}, {"COLOR_PANEL_HEADER" , COLOR_PANEL_HEADER}, {"COLOR_PANEL_DESC" , COLOR_PANEL_DESC}, {"COLOR_OVERALL_LBLS" , COLOR_OVERALL_LBLS}, {"COLOR_OVERALL_VALS" , COLOR_OVERALL_VALS}, {"COLOR_OVERALL_PATH" , COLOR_OVERALL_PATH}, {"COLOR_ACTIVE_LABEL" , COLOR_ACTIVE_LABEL}, {"COLOR_BG" , COLOR_BG}, {"COLOR_DEFAULT" , COLOR_DEFAULT}, {"COLOR_PROGRESS" , COLOR_PROGRESS}, }; static const char *const colors256_mono[] = { "COLOR_MTRC_HITS color7:color-1", "COLOR_MTRC_VISITORS color8:color-1", "COLOR_MTRC_DATA color7:color-1", "COLOR_MTRC_BW color8:color-1", "COLOR_MTRC_AVGTS color8:color-1", "COLOR_MTRC_CUMTS color8:color-1", "COLOR_MTRC_MAXTS color8:color-1", "COLOR_MTRC_PROT color8:color-1", "COLOR_MTRC_MTHD color7:color-1", "COLOR_MTRC_HITS_PERC color0:color-1 bold", "COLOR_MTRC_HITS_PERC color1:color-1 bold VISITORS", "COLOR_MTRC_HITS_PERC color1:color-1 bold OS", "COLOR_MTRC_HITS_PERC color1:color-1 bold BROWSERS", "COLOR_MTRC_HITS_PERC color1:color-1 bold VISIT_TIMES", "COLOR_MTRC_HITS_PERC_MAX color0:color-1 bold", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold VISITORS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold OS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold BROWSERS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold VISIT_TIMES", "COLOR_MTRC_VISITORS_PERC color0:color-1 bold", "COLOR_MTRC_VISITORS_PERC_MAX color0:color-1 bold", "COLOR_PANEL_COLS color7:color-1", "COLOR_BARS color7:color-1", "COLOR_ERROR color7:color1", "COLOR_SELECTED color7:color8", "COLOR_PANEL_ACTIVE color0:color3", "COLOR_PANEL_HEADER color0:color7", "COLOR_PANEL_DESC color7:color-1", "COLOR_OVERALL_LBLS color7:color-1 bold", "COLOR_OVERALL_VALS color6:color-1 bold", "COLOR_OVERALL_PATH color3:color-1", "COLOR_ACTIVE_LABEL color4:color7", "COLOR_BG color7:color-1", "COLOR_DEFAULT color7:color-1", "COLOR_PROGRESS color0:color6", }; static const char *const colors256_green[] = { "COLOR_MTRC_HITS color7:color-1", "COLOR_MTRC_VISITORS color8:color-1", "COLOR_MTRC_DATA color7:color-1", "COLOR_MTRC_BW color8:color-1", "COLOR_MTRC_AVGTS color8:color-1", "COLOR_MTRC_CUMTS color8:color-1", "COLOR_MTRC_MAXTS color8:color-1", "COLOR_MTRC_PROT color8:color-1", "COLOR_MTRC_MTHD color7:color-1", "COLOR_MTRC_HITS_PERC color0:color-1 bold", "COLOR_MTRC_HITS_PERC color1:color-1 bold VISITORS", "COLOR_MTRC_HITS_PERC color1:color-1 bold OS", "COLOR_MTRC_HITS_PERC color1:color-1 bold BROWSERS", "COLOR_MTRC_HITS_PERC color1:color-1 bold VISIT_TIMES", "COLOR_MTRC_HITS_PERC_MAX color0:color-1 bold", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold VISITORS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold OS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold BROWSERS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold VISIT_TIMES", "COLOR_MTRC_VISITORS_PERC color0:color-1 bold", "COLOR_MTRC_VISITORS_PERC_MAX color0:color-1 bold", "COLOR_PANEL_COLS color7:color-1", "COLOR_BARS color7:color-1", "COLOR_ERROR color7:color1", "COLOR_SELECTED color7:color8", "COLOR_PANEL_ACTIVE color0:color3", "COLOR_PANEL_HEADER color0:color35", "COLOR_PANEL_DESC color7:color-1", "COLOR_OVERALL_LBLS color7:color-1 bold", "COLOR_OVERALL_VALS color6:color-1 bold", "COLOR_OVERALL_PATH color3:color-1", "COLOR_ACTIVE_LABEL color7:color35", "COLOR_BG color7:color-1", "COLOR_DEFAULT color7:color-1", "COLOR_PROGRESS color0:color6", }; static const char *const colors256_monokai[] = { "COLOR_MTRC_HITS color197:color-1", "COLOR_MTRC_VISITORS color148:color-1", "COLOR_MTRC_DATA color7:color-1", "COLOR_MTRC_BW color81:color-1", "COLOR_MTRC_AVGTS color247:color-1", "COLOR_MTRC_CUMTS color95:color-1", "COLOR_MTRC_MAXTS color186:color-1", "COLOR_MTRC_PROT color141:color-1", "COLOR_MTRC_MTHD color81:color-1", "COLOR_MTRC_HITS_PERC color186:color-1", "COLOR_MTRC_HITS_PERC color186:color-1 VISITORS", "COLOR_MTRC_HITS_PERC color186:color-1 OS", "COLOR_MTRC_HITS_PERC color186:color-1 BROWSERS", "COLOR_MTRC_HITS_PERC color186:color-1 VISIT_TIMES", "COLOR_MTRC_HITS_PERC_MAX color208:color-1", "COLOR_MTRC_HITS_PERC_MAX color208:color-1 VISITORS", "COLOR_MTRC_HITS_PERC_MAX color208:color-1 OS", "COLOR_MTRC_HITS_PERC_MAX color208:color-1 BROWSERS", "COLOR_MTRC_HITS_PERC_MAX color208:color-1 VISIT_TIMES", "COLOR_MTRC_VISITORS_PERC color187:color-1", "COLOR_MTRC_VISITORS_PERC_MAX color208:color-1", "COLOR_PANEL_COLS color242:color-1", "COLOR_BARS color186:color-1", "COLOR_ERROR color231:color197", "COLOR_SELECTED color0:color215", "COLOR_PANEL_ACTIVE color7:color240", "COLOR_PANEL_HEADER color7:color237", "COLOR_PANEL_DESC color242:color-1", "COLOR_OVERALL_LBLS color251:color-1", "COLOR_OVERALL_VALS color148:color-1", "COLOR_OVERALL_PATH color186:color-1", "COLOR_ACTIVE_LABEL color7:color237", "COLOR_BG color7:color-1", "COLOR_DEFAULT color7:color-1", "COLOR_PROGRESS color7:color141", }; static const char *const colors8_mono[] = { "COLOR_MTRC_HITS color7:color-1", "COLOR_MTRC_VISITORS color0:color-1 bold", "COLOR_MTRC_DATA color7:color-1", "COLOR_MTRC_BW color0:color-1 bold", "COLOR_MTRC_AVGTS color0:color-1 bold", "COLOR_MTRC_CUMTS color0:color-1 bold", "COLOR_MTRC_MAXTS color0:color-1 bold", "COLOR_MTRC_PROT color0:color-1 bold", "COLOR_MTRC_MTHD color7:color-1 ", "COLOR_MTRC_HITS_PERC color0:color-1 bold", "COLOR_MTRC_HITS_PERC color1:color-1 bold VISITORS", "COLOR_MTRC_HITS_PERC color1:color-1 bold OS", "COLOR_MTRC_HITS_PERC color1:color-1 bold BROWSERS", "COLOR_MTRC_HITS_PERC color1:color-1 bold VISIT_TIMES", "COLOR_MTRC_HITS_PERC_MAX color0:color-1 bold", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold VISITORS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold OS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold BROWSERS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold VISIT_TIMES", "COLOR_MTRC_VISITORS_PERC color0:color-1 bold", "COLOR_MTRC_VISITORS_PERC_MAX color0:color-1 bold", "COLOR_PANEL_COLS color7:color-1", "COLOR_BARS color7:color-1", "COLOR_ERROR color7:color1", "COLOR_SELECTED color0:color7", "COLOR_PANEL_ACTIVE color0:color3", "COLOR_PANEL_HEADER color0:color7", "COLOR_PANEL_DESC color7:color-1", "COLOR_OVERALL_LBLS color7:color-1 bold", "COLOR_OVERALL_VALS color6:color-1", "COLOR_OVERALL_PATH color3:color-1", "COLOR_ACTIVE_LABEL color4:color7", "COLOR_BG color7:color-1", "COLOR_DEFAULT color7:color-1", "COLOR_PROGRESS color0:color6", }; static const char *const colors8_green[] = { "COLOR_MTRC_HITS color7:color-1", "COLOR_MTRC_VISITORS color0:color-1 bold", "COLOR_MTRC_DATA color7:color-1", "COLOR_MTRC_BW color0:color-1 bold", "COLOR_MTRC_AVGTS color0:color-1 bold", "COLOR_MTRC_CUMTS color0:color-1 bold", "COLOR_MTRC_MAXTS color0:color-1 bold", "COLOR_MTRC_PROT color0:color-1 bold", "COLOR_MTRC_MTHD color7:color-1 ", "COLOR_MTRC_HITS_PERC color0:color-1 bold", "COLOR_MTRC_HITS_PERC color1:color-1 bold VISITORS", "COLOR_MTRC_HITS_PERC color1:color-1 bold OS", "COLOR_MTRC_HITS_PERC color1:color-1 bold BROWSERS", "COLOR_MTRC_HITS_PERC color1:color-1 bold VISIT_TIMES", "COLOR_MTRC_HITS_PERC_MAX color0:color-1 bold", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold VISITORS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold OS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold BROWSERS", "COLOR_MTRC_HITS_PERC_MAX color3:color-1 bold VISIT_TIMES", "COLOR_MTRC_VISITORS_PERC color0:color-1 bold", "COLOR_MTRC_VISITORS_PERC_MAX color0:color-1 bold", "COLOR_PANEL_COLS color7:color-1", "COLOR_BARS color2:color-1", "COLOR_ERROR color7:color1", "COLOR_SELECTED color0:color7", "COLOR_PANEL_ACTIVE color0:color3", "COLOR_PANEL_HEADER color0:color2", "COLOR_PANEL_DESC color7:color-1", "COLOR_OVERALL_LBLS color7:color-1 bold", "COLOR_OVERALL_VALS color6:color-1", "COLOR_OVERALL_PATH color3:color-1", "COLOR_ACTIVE_LABEL color0:color2", "COLOR_BG color7:color-1", "COLOR_DEFAULT color7:color-1", "COLOR_PROGRESS color0:color6", }; static const char *const nocolors[] = { "COLOR_MTRC_HITS color0:color-1", "COLOR_MTRC_VISITORS color0:color-1", "COLOR_MTRC_DATA color0:color-1", "COLOR_MTRC_BW color0:color-1", "COLOR_MTRC_AVGTS color0:color-1", "COLOR_MTRC_CUMTS color0:color-1", "COLOR_MTRC_MAXTS color0:color-1", "COLOR_MTRC_PROT color0:color-1", "COLOR_MTRC_MTHD color0:color-1", "COLOR_MTRC_HITS_PERC color0:color-1", "COLOR_MTRC_HITS_PERC_MAX color0:color-1", "COLOR_MTRC_VISITORS_PERC color0:color-1", "COLOR_MTRC_VISITORS_PERC_MAX color0:color-1", "COLOR_PANEL_COLS color0:color-1", "COLOR_BARS color0:color-1", "COLOR_ERROR color0:color-1", "COLOR_SELECTED color0:color-1 reverse", "COLOR_PANEL_ACTIVE color0:color-1 reverse", "COLOR_PANEL_HEADER color0:color-1 reverse", "COLOR_PANEL_DESC color0:color-1", "COLOR_OVERALL_LBLS color0:color-1", "COLOR_OVERALL_VALS color0:color-1", "COLOR_OVERALL_PATH color0:color-1", "COLOR_ACTIVE_LABEL color0:color-1 reverse", "COLOR_BG color0:color-1", "COLOR_DEFAULT color0:color-1", "COLOR_PROGRESS color0:color-1 reverse", }; /* *INDENT-ON* */ /* Allocate memory for color elements */ static GColors * new_gcolors (void) { GColors *color = xcalloc (1, sizeof (GColors)); color->module = -1; return color; } /* Allocate memory for a color element properties */ static GColorPair * new_gcolorpair (void) { GColorPair *pair = xcalloc (1, sizeof (GColorPair)); /* Must be between 2 and COLOR_PAIRS-1. * Starts at 2 since COLOR_NORMAL has already been set */ pair->idx = 2; return pair; } /* Free malloc'd memory for color elements */ void free_color_lists (void) { if (pair_list) list_remove_nodes (pair_list); if (color_list) list_remove_nodes (color_list); color_list = NULL; pair_list = NULL; } /* Set a default color - COLOR_NORMAL, this will be used if * no colors are supported by the terminal */ void set_normal_color (void) { GColorPair *pair = new_gcolorpair (); GColors *color = new_gcolors (); pair->idx = 1; pair->fg = COLOR_WHITE; pair->bg = -1; color->pair = pair; color->item = COLOR_NORMAL; pair_list = list_create (pair); color_list = list_create (color); init_pair (pair->idx, pair->fg, pair->bg); } /* Get color properties for COLOR_OVERALL_LBLS */ GColors * color_overall_lbls (void) { return get_color (COLOR_OVERALL_LBLS); } /* Get color properties for COLOR_OVERALL_VALS */ GColors * color_overall_vals (void) { return get_color (COLOR_OVERALL_VALS); } /* Get color properties for COLOR_OVERALL_PATH */ GColors * color_overall_path (void) { return get_color (COLOR_OVERALL_PATH); } /* Get color properties for COLOR_PANEL_HEADER */ GColors * color_panel_header (void) { return get_color (COLOR_PANEL_HEADER); } /* Get color properties for COLOR_PANEL_DESC */ GColors * color_panel_desc (void) { return get_color (COLOR_PANEL_DESC); } /* Get color properties for COLOR_PANEL_ACTIVE*/ GColors * color_panel_active (void) { return get_color (COLOR_PANEL_ACTIVE); } /* Get color properties for COLOR_SELECTED */ GColors * color_selected (void) { return get_color (COLOR_SELECTED); } /* Get color properties for COLOR_PROGRESS */ GColors * color_progress (void) { return get_color (COLOR_PROGRESS); } /* Get color properties for COLOR_DEFAULT */ GColors * color_default (void) { return get_color (COLOR_DEFAULT); } /* Get color properties for COLOR_ERROR */ GColors * color_error (void) { return get_color (COLOR_ERROR); } /* Get the enumerated color given its equivalent color string. * * On error, -1 is returned. * On success, the enumerated color is returned. */ static int get_color_item_enum (const char *str) { return str2enum (CSTM_COLORS, ARRAY_SIZE (CSTM_COLORS), str); } /* Extract color number from the given config string. * * On error, -2 is returned. If color is greater than max colors, it aborts. * On success, the color number is returned. */ static int extract_color (char *color) { char *sEnd; int col = 0; if (strncasecmp (color, "color", 5) != 0) return -2; color += 5; col = strtol (color, &sEnd, 10); if (color == sEnd || *sEnd != '\0' || errno == ERANGE) return -2; /* ensure used color is supported by the terminal */ if (col > COLORS) FATAL ("Terminal doesn't support color: %d - max colors: %d", col, COLORS); return col; } /* Assign the background and foreground color number from the given * config string to GColorPair. * * On error, 1 is returned. * On success, 0 is returned. */ static int parse_bg_fg_color (GColorPair *pair, const char *value) { char bgcolor[COLOR_STR_LEN] = "", fgcolor[COLOR_STR_LEN] = ""; int ret = 0; if (sscanf (value, "%8[^:]:%8[^ ]", fgcolor, bgcolor) != 2) return 1; if ((pair->bg = extract_color (bgcolor)) == -2) ret = 1; if ((pair->fg = extract_color (fgcolor)) == -2) ret = 1; return ret; } /* Assign color attributes from the given config string to GColors. */ static void locate_attr_color (GColors *color, const char *attr) { if (strstr (attr, "bold")) color->attr |= A_BOLD; if (strstr (attr, "underline")) color->attr |= A_UNDERLINE; if (strstr (attr, "normal")) color->attr |= A_NORMAL; if (strstr (attr, "reverse")) color->attr |= A_REVERSE; if (strstr (attr, "standout")) color->attr |= A_REVERSE; if (strstr (attr, "blink")) color->attr |= A_BLINK; } /* Parse color attributes from the given config string. * * On error, 1 is returned. * On success, 0 is returned. */ static int parse_attr_color (GColors *color, const char *value) { char *line, *ptr, *start; int ret = 0; line = xstrdup (value); start = strchr (line, ' '); if ((!start) || (!*(start + 1))) { LOG_DEBUG (("attempted to parse color attr: %s\n", value)); goto clean; } start++; while (1) { if ((ptr = strpbrk (start, ", ")) != NULL) *ptr = 0; locate_attr_color (color, start); if (ptr == NULL) break; start = ptr + 1; } clean: free (line); return ret; } /* Parse color module from the given config string. * * On error, 1 is returned. * On success, 0 is returned. */ static int parse_module_color (GColors *color, const char *value) { char *line = xstrdup (value), *p; p = strrchr (line, ' '); if (!p || !*(p + 1)) { LOG_DEBUG (("attempted to parse color module: %s\n", value)); goto clean; } if ((color->module = get_module_enum (p + 1)) == -1) LOG_DEBUG (("attempted to parse color module: %s\n", value)); clean: free (line); return 0; } /* Find a color by item and module attributes on the list of already * parsed colors. * * If color exists, 1 is returned. * If color does not exist, 1 is returned. */ static int find_color_in_list (void *data, void *color) { GColors *new_color = color; GColors *old_color = data; if (old_color->item != new_color->item) return 0; if (old_color->module != new_color->module) return 0; return 1; } /* Find a color by foreground and background attributes on the list of * already parsed colors. * * If color exists, 1 is returned. * If color does not exist, 1 is returned. */ static int find_pair_in_list (void *data, void *color) { GColorPair *new_color = color; GColorPair *old_color = data; if (old_color->fg != new_color->fg) return 0; if (old_color->bg != new_color->bg) return 0; return 1; } /* Compare a color item (GColorItem) that has no module with the given needle * item. * * If the items match and with no module, 1 is returned. * If condition is not satisfied, 0 is returned. */ static int find_color_item_in_list (void *data, void *needle) { GColors *color = data; GColorItem *item = needle; return color->item == (GColorItem) (*(int *) item) && color->module == -1; } /* Compare a color item (GColorItem) and module with the given needle item. * * If the items match and with no module, 1 is returned. * If condition is not satisfied, 0 is returned. */ static int find_color_item_module_in_list (void *data, void *needle) { GColors *color = data; GColors *item = needle; return color->item == item->item && color->module == item->module; } /* Get color item properties given an item (enumerated). * * On error, it aborts. * On success, the color item properties are returned, or NULL if no match * found. */ GColors * get_color (GColorItem item) { GColorItem normal = COLOR_NORMAL; GSLList *match = NULL; if ((match = list_find (color_list, find_color_item_in_list, &item))) return (GColors *) match->data; if ((match = list_find (color_list, find_color_item_in_list, &normal))) return (GColors *) match->data; /* should not get here */ FATAL ("Unable to find color item %d", item); } /* Get color item properties given an item (enumerated) and its module. * * On error, it aborts. * On success, the color item properties are returned, or NULL if no match * found. */ GColors * get_color_by_item_module (GColorItem item, GModule module) { GColors *needle = new_gcolors (), *color = NULL; GSLList *match = NULL; needle->module = module; needle->item = item; /* find color for specific item/module pair */ if ((match = list_find (color_list, find_color_item_module_in_list, needle))) color = match->data; /* attempt to find color by item (fallback) */ if (!color) color = get_color (item); free (needle); return color; } /* Parse a color definition line from the config file. * * On error, it aborts. * On success, the color properties are assigned */ static void parse_color_line (GColorPair *pair, GColors *color, char *line) { char *val; int item = 0; size_t idx; /* key */ idx = strcspn (line, " \t"); if (strlen (line) == idx) FATAL ("Malformed color key at line: %s", line); line[idx] = '\0'; if ((item = get_color_item_enum (line)) == -1) FATAL ("Unable to find color key: %s", line); /* value */ val = line + (idx + 1); idx = strspn (val, " \t"); if (strlen (val) == idx) FATAL ("Malformed color value at line: %s", line); val = val + idx; /* get background/foreground color */ if (parse_bg_fg_color (pair, val) == 1) FATAL ("Invalid bg/fg color pairs at: %s %s", line, val); if (parse_attr_color (color, val) == 1) FATAL ("Invalid color attrs at: %s %s", line, val); if (parse_module_color (color, val) == 1) FATAL ("Invalid color module at: %s %s", line, val); color->item = item; } /* Attempt to prepend the given color on our color linked list. * * On error, or if color already exists, the given color is freed. * On success, or if not color found, store color properties */ static void prepend_color (GColors **color) { /* create a list of colors if one does not exist */ if (color_list == NULL) { color_list = list_create (*color); } /* attempt to find the given color data type (by item and attributes) in * our color list */ else if (list_find (color_list, find_color_in_list, *color)) { /* if found, free the recently malloc'd color data type and use * existing color */ free (*color); *color = NULL; } else { /* not a dup, so insert the new color in our color list */ color_list = list_insert_prepend (color_list, *color); } } /* Parse a color definition line from the config file and store it on a single * linked-list. * * On error, it aborts. * On success, the color properties are stored */ static void parse_color (char *line) { GSLList *match = NULL; GColors *color = NULL; GColorPair *pair = NULL; color = new_gcolors (); pair = new_gcolorpair (); /* extract a color pair and color attributes from the given config line */ parse_color_line (pair, color, line); /* create a pair color list if one doesn't exist */ if (pair_list == NULL) { pair_list = list_create (pair); } /* attempt to find the given color pair in our pair list */ else if ((match = list_find (pair_list, find_pair_in_list, pair))) { /* pair found, use new pair and free existing one */ free (pair); pair = (GColorPair *) match->data; } /* pair not found, use it then */ else { pair->idx += list_count (pair_list); pair_list = list_insert_prepend (pair_list, pair); } /* set color pair */ color->pair = pair; prepend_color (&color); /* if no color pair was found, then we init the color pair */ if (!match && color) init_pair (color->pair->idx, color->pair->fg, color->pair->bg); free (line); } /* Iterate over all color definitions in the config file. * * On error, it aborts. * On success, the color properties are parsed and stored */ static void parse_colors (const char *const colors[], size_t n) { char *line; size_t i; for (i = 0; i < n; ++i) { line = strdup (colors[i]); /* did not find a valid format */ if (strchr (line, ':') == NULL) { free (line); continue; } parse_color (line); } } /* Use default color definitions if necessary. */ static void add_default_colors (void) { /* no colors */ if (COLORS < 8) parse_colors (nocolors, ARRAY_SIZE (nocolors)); /* 256 colors, and no color scheme set or set to monokai */ if (COLORS == 256 && (!conf.color_scheme || conf.color_scheme == MONOKAI)) parse_colors (colors256_monokai, ARRAY_SIZE (colors256_monokai)); /* otherwise use 16 colors scheme */ else if (COLORS > 16) { if (conf.color_scheme == STD_GREEN) parse_colors (colors256_green, ARRAY_SIZE (colors256_green)); else parse_colors (colors256_mono, ARRAY_SIZE (colors256_mono)); } /* 8 colors */ if (COLORS >= 8 && COLORS <= 16) { if (conf.color_scheme == STD_GREEN) parse_colors (colors8_green, ARRAY_SIZE (colors8_green)); else parse_colors (colors8_mono, ARRAY_SIZE (colors8_mono)); } } /* Entry point to parse color definitions or use default colors */ void set_colors (int force) { errno = 0; if (conf.color_idx > 0 && !force) parse_colors (conf.colors, conf.color_idx); else add_default_colors (); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gwsocket.h�����������������������������������������������������������������������0000644�0001750�0001730�00000005211�14624731651�011570� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * _______ _______ __ __ * / ____/ | / / ___/____ _____/ /_____ / /_ * / / __ | | /| / /\__ \/ __ \/ ___/ //_/ _ \/ __/ * / /_/ / | |/ |/ /___/ / /_/ / /__/ ,< / __/ /_ * \____/ |__/|__//____/\____/\___/_/|_|\___/\__/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef GWSOCKET_H_INCLUDED #define GWSOCKET_H_INCLUDED #define GW_VERSION "0.1" #include <pthread.h> #include "websocket.h" typedef struct GWSReader_ { int fd; int self_pipe[2]; /* self-pipe */ pthread_mutex_t mutex; /* Mutex fifo out */ pthread_t thread; /* Thread fifo in */ WSPacket *packet; /* FIFO data's buffer */ char hdr[HDR_SIZE]; /* FIFO header's buffer */ int hlen; /* header length */ } GWSReader; typedef struct GWSWriter_ { int fd; pthread_mutex_t mutex; /* Mutex fifo in */ pthread_t thread; /* Thread fifo out */ WSServer *server; /* WebSocket server */ } GWSWriter; GWSReader *new_gwsreader (void); GWSWriter *new_gwswriter (void); int broadcast_holder (int fd, const char *buf, int len); int open_fifoin (void); int open_fifoout (void); int read_fifo (GWSReader * gwsreader, void (*f) (int)); int send_holder_to_client (int fd, int listener, const char *buf, int len); int setup_ws_server (GWSWriter * gwswriter, GWSReader * gwsreader); void set_ready_state (void); void set_self_pipe (int *self_pipe); void stop_ws_server (GWSWriter * gwswriter, GWSReader * gwsreader); #endif // for #ifndef GWSOCKET_H ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gdns.c���������������������������������������������������������������������������0000644�0001750�0001730�00000015763�14624731651�010705� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * gdns.c -- hosts resolver * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define _MULTI_THREADED #ifdef __FreeBSD__ #include <sys/socket.h> #endif #if HAVE_CONFIG_H #include <config.h> #endif #include <pthread.h> #include <netinet/in.h> #include <arpa/inet.h> #include <ctype.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <time.h> #include "gdns.h" #include "error.h" #include "gkhash.h" #include "goaccess.h" #include "util.h" #include "xmalloc.h" GDnsThread gdns_thread; static GDnsQueue *gdns_queue; /* Initialize the queue. */ void gqueue_init (GDnsQueue *q, int capacity) { q->head = 0; q->tail = -1; q->size = 0; q->capacity = capacity; } /* Get the current size of queue. * * Returns the size of the queue. */ int gqueue_size (GDnsQueue *q) { return q->size; } /* Determine if the queue is empty. * * Returns true if empty, otherwise false. */ int gqueue_empty (GDnsQueue *q) { return q->size == 0; } /* Determine if the queue is full. * * Returns true if full, otherwise false. */ int gqueue_full (GDnsQueue *q) { return q->size == q->capacity; } /* Free the queue. */ void gqueue_destroy (GDnsQueue *q) { free (q); } /* Add at the end of the queue a string item. * * If the queue is full, -1 is returned. * If added to the queue, 0 is returned. */ int gqueue_enqueue (GDnsQueue *q, const char *item) { if (gqueue_full (q)) return -1; q->tail = (q->tail + 1) % q->capacity; strncpy (q->buffer[q->tail], item, sizeof (q->buffer[q->tail])); q->buffer[q->tail][sizeof (q->buffer[q->tail]) - 1] = '\0'; q->size++; return 0; } /* Find a string item in the queue. * * If the queue is empty, or the item is not in the queue, 0 is returned. * If found, 1 is returned. */ int gqueue_find (GDnsQueue *q, const char *item) { int i; if (gqueue_empty (q)) return 0; for (i = 0; i < q->size; i++) { if (strcmp (item, q->buffer[i]) == 0) return 1; } return 0; } /* Remove a string item from the head of the queue. * * If the queue is empty, NULL is returned. * If removed, the string item is returned. */ char * gqueue_dequeue (GDnsQueue *q) { char *item; if (gqueue_empty (q)) return NULL; item = q->buffer[q->head]; q->head = (q->head + 1) % q->capacity; q->size--; return item; } /* Get the corresponding hostname given an IP address. * * On error, a string error message is returned. * On success, a malloc'd hostname is returned. */ static char * reverse_host (const struct sockaddr *a, socklen_t length) { char h[H_SIZE] = { 0 }; int flags, st; flags = NI_NAMEREQD; st = getnameinfo (a, length, h, H_SIZE, NULL, 0, flags); if (!st) { /* BSD returns \0 while Linux . on solve lookups */ if (*h == '\0') return alloc_string ("."); return alloc_string (h); } return alloc_string (gai_strerror (st)); } /* Determine if IPv4 or IPv6 and resolve. * * On error, NULL is returned. * On success, a malloc'd hostname is returned. */ char * reverse_ip (char *str) { union { struct sockaddr addr; struct sockaddr_in6 addr6; struct sockaddr_in addr4; } a; if (str == NULL || *str == '\0') return NULL; memset (&a, 0, sizeof (a)); if (1 == inet_pton (AF_INET, str, &a.addr4.sin_addr)) { a.addr4.sin_family = AF_INET; return reverse_host (&a.addr, sizeof (a.addr4)); } else if (1 == inet_pton (AF_INET6, str, &a.addr6.sin6_addr)) { a.addr6.sin6_family = AF_INET6; return reverse_host (&a.addr, sizeof (a.addr6)); } return NULL; } /* Producer - Resolve an IP address and add it to the queue. */ void dns_resolver (char *addr) { pthread_mutex_lock (&gdns_thread.mutex); /* queue is not full and the IP address is not in the queue */ if (!gqueue_full (gdns_queue) && !gqueue_find (gdns_queue, addr)) { /* add the IP to the queue */ gqueue_enqueue (gdns_queue, addr); pthread_cond_broadcast (&gdns_thread.not_empty); } pthread_mutex_unlock (&gdns_thread.mutex); } /* Consumer - Once an IP has been resolved, add it to dwithe hostnames * hash structure. */ static void dns_worker (void GO_UNUSED (*ptr_data)) { char *ip = NULL, *host = NULL; while (1) { pthread_mutex_lock (&gdns_thread.mutex); /* wait until an item has been added to the queue */ while (gqueue_empty (gdns_queue)) pthread_cond_wait (&gdns_thread.not_empty, &gdns_thread.mutex); ip = gqueue_dequeue (gdns_queue); pthread_mutex_unlock (&gdns_thread.mutex); host = reverse_ip (ip); pthread_mutex_lock (&gdns_thread.mutex); if (!active_gdns) { pthread_mutex_unlock (&gdns_thread.mutex); free (host); return; } /* insert the corresponding IP -> hostname map */ if (host != NULL && active_gdns) { ht_insert_hostname (ip, host); free (host); } pthread_cond_signal (&gdns_thread.not_full); pthread_mutex_unlock (&gdns_thread.mutex); } } /* Initialize queue and dns thread */ void gdns_init (void) { gdns_queue = xmalloc (sizeof (GDnsQueue)); gqueue_init (gdns_queue, QUEUE_SIZE); if (pthread_cond_init (&(gdns_thread.not_empty), NULL)) FATAL ("Failed init thread condition"); if (pthread_cond_init (&(gdns_thread.not_full), NULL)) FATAL ("Failed init thread condition"); if (pthread_mutex_init (&(gdns_thread.mutex), NULL)) FATAL ("Failed init thread mutex"); } /* Destroy (free) queue */ void gdns_free_queue (void) { gqueue_destroy (gdns_queue); } /* Create a DNS thread and make it active */ void gdns_thread_create (void) { int th; active_gdns = 1; th = pthread_create (&(gdns_thread.thread), NULL, (void *) &dns_worker, NULL); if (th) FATAL ("Return code from pthread_create(): %d", th); pthread_detach (gdns_thread.thread); } �������������goaccess-1.9.3/src/gholder.c������������������������������������������������������������������������0000644�0001750�0001730�00000046020�14624731651�011364� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * gholder.c -- data structure to hold raw data * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <pthread.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include "gholder.h" #include "error.h" #include "gdns.h" #include "gkhash.h" #include "util.h" #include "xmalloc.h" #ifdef HAVE_GEOLOCATION #include "geoip1.h" #endif typedef struct GPanel_ { GModule module; void (*insert) (GRawDataItem item, GHolder * h, datatype type, const struct GPanel_ *); void (*holder_callback) (GHolder * h); } GPanel; /* *INDENT-OFF* */ static void add_data_to_holder (GRawDataItem item, GHolder * h, datatype type, const GPanel * panel); static void add_host_to_holder (GRawDataItem item, GHolder * h, datatype type, const GPanel * panel); static void add_root_to_holder (GRawDataItem item, GHolder * h, datatype type, const GPanel * panel); static void add_host_child_to_holder (GHolder * h); static const GPanel paneling[] = { {VISITORS , add_data_to_holder , NULL}, {REQUESTS , add_data_to_holder , NULL}, {REQUESTS_STATIC , add_data_to_holder , NULL}, {NOT_FOUND , add_data_to_holder , NULL}, {HOSTS , add_host_to_holder , add_host_child_to_holder} , {OS , add_root_to_holder , NULL}, {BROWSERS , add_root_to_holder , NULL}, {VISIT_TIMES , add_data_to_holder , NULL}, {VIRTUAL_HOSTS , add_data_to_holder , NULL}, {REFERRERS , add_data_to_holder , NULL}, {REFERRING_SITES , add_data_to_holder , NULL}, {KEYPHRASES , add_data_to_holder , NULL}, {STATUS_CODES , add_root_to_holder , NULL}, {REMOTE_USER , add_data_to_holder , NULL}, {CACHE_STATUS , add_data_to_holder , NULL}, #ifdef HAVE_GEOLOCATION {GEO_LOCATION , add_root_to_holder , NULL}, {ASN , add_data_to_holder , NULL} , #endif {MIME_TYPE , add_root_to_holder , NULL} , {TLS_TYPE , add_root_to_holder , NULL} , }; /* *INDENT-ON* */ /* Get a panel from the GPanel structure given a module. * * On error, or if not found, NULL is returned. * On success, the panel value is returned. */ static const GPanel * panel_lookup (GModule module) { int i, num_panels = ARRAY_SIZE (paneling); for (i = 0; i < num_panels; i++) { if (paneling[i].module == module) return &paneling[i]; } return NULL; } /* Allocate memory for a new GHolder instance. * * On success, the newly allocated GHolder is returned . */ GHolder * new_gholder (uint32_t size) { GHolder *holder = xmalloc (size * sizeof (GHolder)); memset (holder, 0, size * sizeof *holder); return holder; } /* Allocate memory for a new GHolderItem instance. * * On success, the newly allocated GHolderItem is returned . */ static GHolderItem * new_gholder_item (uint32_t size) { GHolderItem *item = xcalloc (size, sizeof (GHolderItem)); return item; } /* Allocate memory for a new double linked-list GSubList instance. * * On success, the newly allocated GSubList is returned . */ static GSubList * new_gsublist (void) { GSubList *sub_list = xmalloc (sizeof (GSubList)); sub_list->head = NULL; sub_list->tail = NULL; sub_list->size = 0; return sub_list; } /* Allocate memory for a new double linked-list GSubItem node. * * On success, the newly allocated GSubItem is returned . */ static GSubItem * new_gsubitem (GModule module, GMetrics *nmetrics) { GSubItem *sub_item = xmalloc (sizeof (GSubItem)); sub_item->metrics = nmetrics; sub_item->module = module; sub_item->prev = NULL; sub_item->next = NULL; return sub_item; } /* Add an item to the end of a given sub list. */ static void add_sub_item_back (GSubList *sub_list, GModule module, GMetrics *nmetrics) { GSubItem *sub_item = new_gsubitem (module, nmetrics); if (sub_list->tail) { sub_list->tail->next = sub_item; sub_item->prev = sub_list->tail; sub_list->tail = sub_item; } else { sub_list->head = sub_item; sub_list->tail = sub_item; } sub_list->size++; } /* Delete the entire given sub list. */ static void delete_sub_list (GSubList *sub_list) { GSubItem *item = NULL; GSubItem *next = NULL; if (sub_list->size == 0) goto clear; for (item = sub_list->head; item; item = next) { next = item->next; free (item->metrics->data); free (item->metrics); free (item); } clear: sub_list->head = NULL; sub_list->size = 0; free (sub_list); } /* Free malloc'd holder fields. */ static void free_holder_data (GHolderItem item) { if (item.sub_list != NULL) delete_sub_list (item.sub_list); free_gmetrics (item.metrics); } /* Free all memory allocated in holder for a given module. */ void free_holder_by_module (GHolder **holder, GModule module) { int j; if ((*holder) == NULL) return; for (j = 0; j < (*holder)[module].idx; j++) { free_holder_data ((*holder)[module].items[j]); } free ((*holder)[module].items); (*holder)[module].holder_size = 0; (*holder)[module].idx = 0; (*holder)[module].sub_items_size = 0; } /* Free all memory allocated in holder for all modules. */ void free_holder (GHolder **holder) { GModule module; int j; size_t idx = 0; if ((*holder) == NULL) return; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; for (j = 0; j < (*holder)[module].idx; j++) { free_holder_data ((*holder)[module].items[j]); } free ((*holder)[module].items); } free (*holder); (*holder) = NULL; } /* Iterate over holder and get the key index. * * If the key does not exist, -1 is returned. * On success, the key in holder is returned . */ static int get_item_idx_in_holder (GHolder *holder, const char *k) { int i; if (holder == NULL) return KEY_NOT_FOUND; if (holder->idx == 0) return KEY_NOT_FOUND; if (k == NULL || *k == '\0') return KEY_NOT_FOUND; for (i = 0; i < holder->idx; i++) { if (strcmp (k, holder->items[i].metrics->data) == 0) return i; } return KEY_NOT_FOUND; } /* Copy linked-list items to an array, sort, and move them back to the * list. Should be faster than sorting the list */ static void sort_sub_list (GHolder *h, GSort sort) { GHolderItem *arr; GSubItem *iter; GSubList *sub_list; int i, j, k; /* iterate over root-level nodes */ for (i = 0; i < h->idx; i++) { sub_list = h->items[i].sub_list; if (sub_list == NULL) continue; arr = new_gholder_item (sub_list->size); /* copy items from the linked-list into an array */ for (j = 0, iter = sub_list->head; iter; iter = iter->next, j++) { arr[j].metrics = new_gmetrics (); arr[j].metrics->bw.nbw = iter->metrics->bw.nbw; arr[j].metrics->data = xstrdup (iter->metrics->data); arr[j].metrics->hits = iter->metrics->hits; arr[j].metrics->id = iter->metrics->id; arr[j].metrics->visitors = iter->metrics->visitors; if (conf.serve_usecs) { arr[j].metrics->avgts.nts = iter->metrics->avgts.nts; arr[j].metrics->cumts.nts = iter->metrics->cumts.nts; arr[j].metrics->maxts.nts = iter->metrics->maxts.nts; } } sort_holder_items (arr, j, sort); delete_sub_list (sub_list); sub_list = new_gsublist (); for (k = 0; k < j; k++) { if (k > 0) sub_list = h->items[i].sub_list; add_sub_item_back (sub_list, h->module, arr[k].metrics); h->items[i].sub_list = sub_list; sub_list = NULL; } free (arr); if (sub_list) { delete_sub_list (sub_list); sub_list = NULL; } } } /* Set the data metric field for the host panel. * * On success, the data field/metric is set. */ static int set_host_child_metrics (char *data, uint8_t id, GMetrics **nmetrics) { GMetrics *metrics; metrics = new_gmetrics (); metrics->data = xstrdup (data); metrics->id = id; *nmetrics = metrics; return 0; } /* Set host panel data, including sub items. * * On success, the host panel data is set. */ static void set_host_sub_list (GHolder *h, GSubList *sub_list) { GMetrics *nmetrics; #ifdef HAVE_GEOLOCATION char city[CITY_LEN] = ""; char continent[CONTINENT_LEN] = ""; char country[ASN_LEN] = ""; char asn[ASN_LEN] = ""; #endif char *host = h->items[h->idx].metrics->data, *hostname = NULL; #ifdef HAVE_GEOLOCATION /* add geolocation child nodes */ set_geolocation (host, continent, country, city, asn); /* country */ if (country[0] != '\0') { set_host_child_metrics (country, MTRC_ID_COUNTRY, &nmetrics); add_sub_item_back (sub_list, h->module, nmetrics); h->items[h->idx].sub_list = sub_list; h->sub_items_size++; /* flag only */ conf.has_geocountry = 1; } /* city */ if (city[0] != '\0') { set_host_child_metrics (city, MTRC_ID_CITY, &nmetrics); add_sub_item_back (sub_list, h->module, nmetrics); h->items[h->idx].sub_list = sub_list; h->sub_items_size++; /* flag only */ conf.has_geocity = 1; } /* ASN */ if (asn[0] != '\0') { set_host_child_metrics (asn, MTRC_ID_ASN, &nmetrics); add_sub_item_back (sub_list, h->module, nmetrics); h->items[h->idx].sub_list = sub_list; h->sub_items_size++; /* flag only */ conf.has_geoasn = 1; } #endif /* hostname */ if (conf.enable_html_resolver && conf.output_stdout && !conf.no_ip_validation && !conf.real_time_html) { hostname = reverse_ip (host); set_host_child_metrics (hostname, MTRC_ID_HOSTNAME, &nmetrics); add_sub_item_back (sub_list, h->module, nmetrics); h->items[h->idx].sub_list = sub_list; h->sub_items_size++; free (hostname); } } /* Set host panel data, including sub items. * * On success, the host panel data is set. */ static void add_host_child_to_holder (GHolder *h) { GMetrics *nmetrics; GSubList *sub_list = new_gsublist (); char *ip = h->items[h->idx].metrics->data; char *hostname = NULL; int n = h->sub_items_size; /* add child nodes */ set_host_sub_list (h, sub_list); pthread_mutex_lock (&gdns_thread.mutex); hostname = ht_get_hostname (ip); pthread_mutex_unlock (&gdns_thread.mutex); /* determine if we have the IP's hostname */ if (!hostname) { dns_resolver (ip); } else if (hostname) { set_host_child_metrics (hostname, MTRC_ID_HOSTNAME, &nmetrics); add_sub_item_back (sub_list, h->module, nmetrics); h->items[h->idx].sub_list = sub_list; h->sub_items_size++; free (hostname); } /* did not add any items */ if (n == h->sub_items_size) free (sub_list); } /* Given a GRawDataType, set the data and hits value. * * On error, no values are set and 1 is returned. * On success, the data and hits values are set and 0 is returned. */ static int map_data (GModule module, GRawDataItem item, datatype type, char **data, uint32_t *hits) { switch (type) { case U32: if (!(*data = ht_get_datamap (module, item.nkey))) return 1; if (!item.hits) return 1; *hits = item.hits; break; case STR: if (!(*hits = ht_get_hits (module, item.nkey))) return 1; *data = xstrdup (item.data); break; } return 0; } /* Given a data item, store it into a holder structure. */ static void set_single_metrics (GRawDataItem item, GHolder *h, char *data, uint32_t hits) { uint32_t visitors = 0; uint64_t bw = 0, cumts = 0, maxts = 0; bw = ht_get_bw (h->module, item.nkey); cumts = ht_get_cumts (h->module, item.nkey); maxts = ht_get_maxts (h->module, item.nkey); visitors = ht_get_visitors (h->module, item.nkey); h->items[h->idx].metrics = new_gmetrics (); h->items[h->idx].metrics->hits = hits; h->items[h->idx].metrics->data = data; h->items[h->idx].metrics->visitors = visitors; h->items[h->idx].metrics->bw.nbw = bw; h->items[h->idx].metrics->avgts.nts = cumts / hits; h->items[h->idx].metrics->cumts.nts = cumts; h->items[h->idx].metrics->maxts.nts = maxts; if (bw && !conf.bandwidth) conf.bandwidth = 1; if (cumts && !conf.serve_usecs) conf.serve_usecs = 1; if (conf.append_method) { h->items[h->idx].metrics->method = ht_get_method (h->module, item.nkey); } if (conf.append_protocol) { h->items[h->idx].metrics->protocol = ht_get_protocol (h->module, item.nkey); } } /* Set all panel data. This will set data for panels that do not * contain sub items. A function pointer is used for post data set. */ static void add_data_to_holder (GRawDataItem item, GHolder *h, datatype type, const GPanel *panel) { char *data = NULL; uint32_t hits = 0; if (map_data (h->module, item, type, &data, &hits) == 1) return; set_single_metrics (item, h, data, hits); if (panel->holder_callback) panel->holder_callback (h); h->idx++; } /* A wrapper to set a host item */ static void set_host (GRawDataItem item, GHolder *h, const GPanel *panel, char *data, uint32_t hits) { set_single_metrics (item, h, xstrdup (data), hits); if (panel->holder_callback) panel->holder_callback (h); h->idx++; } /* Set all panel data. This will set data for panels that do not * contain sub items. A function pointer is used for post data set. */ static void add_host_to_holder (GRawDataItem item, GHolder *h, datatype type, const GPanel *panel) { char buf4[INET_ADDRSTRLEN]; char buf6[INET6_ADDRSTRLEN]; char *data = NULL; uint32_t hits = 0; unsigned i; struct in6_addr addr6, mask6, nwork6; struct in_addr addr4, mask4, nwork4; const char *arr4[] = { "255.255.255.0", "255.255.0.0", "255.0.0.0" }; const char *arr6[] = { "ffff:ffff:ffff:ffff:0000:0000:0000:0000", "ffff:ffff:ffff:0000:0000:0000:0000:0000", "ffff:ffff:0000:0000:0000:0000:0000:0000" }; const char *m4 = arr4[0]; const char *m6 = arr6[0]; if (map_data (h->module, item, type, &data, &hits) == 1) return; if (!conf.anonymize_ip) { add_data_to_holder (item, h, type, panel); free (data); return; } if (conf.anonymize_level == ANONYMIZE_STRONG || conf.anonymize_level == ANONYMIZE_PEDANTIC) { m4 = arr4[conf.anonymize_level - 1]; m6 = arr6[conf.anonymize_level - 1]; } if (1 == inet_pton (AF_INET, data, &addr4)) { if (1 == inet_pton (AF_INET, m4, &mask4)) { memset (buf4, 0, sizeof *buf4); nwork4.s_addr = addr4.s_addr & mask4.s_addr; if (inet_ntop (AF_INET, &nwork4, buf4, INET_ADDRSTRLEN) != NULL) { set_host (item, h, panel, buf4, hits); free (data); } } } else if (1 == inet_pton (AF_INET6, data, &addr6)) { if (1 == inet_pton (AF_INET6, m6, &mask6)) { memset (buf6, 0, sizeof *buf6); for (i = 0; i < 16; i++) { nwork6.s6_addr[i] = addr6.s6_addr[i] & mask6.s6_addr[i]; } if (inet_ntop (AF_INET6, &nwork6, buf6, INET6_ADDRSTRLEN) != NULL) { set_host (item, h, panel, buf6, hits); free (data); } } } } /* Set all root panel data. This will set the root nodes. */ static int set_root_metrics (GRawDataItem item, GModule module, datatype type, GMetrics **nmetrics) { GMetrics *metrics; char *data = NULL; uint64_t bw = 0, cumts = 0, maxts = 0; uint32_t hits = 0, visitors = 0; if (map_data (module, item, type, &data, &hits) == 1) return 1; bw = ht_get_bw (module, item.nkey); cumts = ht_get_cumts (module, item.nkey); maxts = ht_get_maxts (module, item.nkey); visitors = ht_get_visitors (module, item.nkey); metrics = new_gmetrics (); metrics->avgts.nts = cumts / hits; metrics->cumts.nts = cumts; metrics->maxts.nts = maxts; metrics->bw.nbw = bw; metrics->data = data; metrics->hits = hits; metrics->visitors = visitors; *nmetrics = metrics; return 0; } /* Set all root panel data, including sub list items. */ static void add_root_to_holder (GRawDataItem item, GHolder *h, datatype type, GO_UNUSED const GPanel *panel) { GSubList *sub_list; GMetrics *metrics, *nmetrics; char *root = NULL; int root_idx = KEY_NOT_FOUND, idx = 0; if (set_root_metrics (item, h->module, type, &nmetrics) == 1) return; if (!(root = ht_get_root (h->module, item.nkey))) { free_gmetrics (nmetrics); return; } /* add data as a child node into holder */ if (KEY_NOT_FOUND == (root_idx = get_item_idx_in_holder (h, root))) { idx = h->idx; sub_list = new_gsublist (); metrics = new_gmetrics (); h->items[idx].metrics = metrics; h->items[idx].metrics->data = root; h->idx++; } else { sub_list = h->items[root_idx].sub_list; metrics = h->items[root_idx].metrics; idx = root_idx; free (root); } add_sub_item_back (sub_list, h->module, nmetrics); h->items[idx].sub_list = sub_list; h->items[idx].metrics = metrics; h->items[idx].metrics->cumts.nts += nmetrics->cumts.nts; h->items[idx].metrics->bw.nbw += nmetrics->bw.nbw; h->items[idx].metrics->hits += nmetrics->hits; h->items[idx].metrics->visitors += nmetrics->visitors; h->items[idx].metrics->avgts.nts = h->items[idx].metrics->cumts.nts / h->items[idx].metrics->hits; if (nmetrics->maxts.nts > h->items[idx].metrics->maxts.nts) h->items[idx].metrics->maxts.nts = nmetrics->maxts.nts; h->sub_items_size++; } /* Load raw data into our holder structure */ void load_holder_data (GRawData *raw_data, GHolder *h, GModule module, GSort sort) { int i; uint32_t size = 0, max_choices = get_max_choices (); const GPanel *panel = panel_lookup (module); #ifdef _DEBUG clock_t begin = clock (); double taken; const char *modstr = NULL; LOG_DEBUG (("== load_holder_data ==\n")); #endif size = raw_data->size; h->holder_size = size > max_choices ? max_choices : size; h->ht_size = size; h->idx = 0; h->module = module; h->sub_items_size = 0; h->items = new_gholder_item (h->holder_size); for (i = 0; i < h->holder_size; i++) { panel->insert (raw_data->items[i], h, raw_data->type, panel); } sort_holder_items (h->items, h->idx, sort); if (h->sub_items_size) sort_sub_list (h, sort); free_raw_data (raw_data); #ifdef _DEBUG modstr = get_module_str (module); taken = (double) (clock () - begin) / CLOCKS_PER_SEC; LOG_DEBUG (("== %-30s%f\n\n", modstr, taken)); #endif } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gdashboard.h���������������������������������������������������������������������0000644�0001750�0001730�00000011231�14624731651�012037� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #ifndef GDASHBOARD_H_INCLUDED #define GDASHBOARD_H_INCLUDED #include <stdint.h> #include "ui.h" #define DASH_HEAD_POS 0 /* position of header line */ #define DASH_EMPTY_POS 1 /* empty line position */ #define DASH_COLS_POS 2 /* position of column names */ #define DASH_DASHES_POS 3 /* position of dashes under column names */ #define DASH_DATA_POS 4 /* data line position */ #define DASH_NON_DATA 5 /* number of rows without data stats */ #define DASH_COL_ROWS 2 /* number of rows for column values + dashed lines */ #define DASH_COLLAPSED 12 /* number of rows per panel (collapsed) */ #define DASH_EXPANDED 32 /* number of rows per panel (expanded) */ #define DASH_INIT_X 1 /* start position (x-axis) */ #define DASH_BW_LEN 11 /* max bandwidth string length, e.g., 151.69 MiB */ #define DASH_SRV_TM_LEN 9 /* max time served length, e.g., 483.00 us */ #define DASH_SPACE 1 /* space between columns (metrics) */ /* Common render data line fields */ typedef struct GDashRender_ { WINDOW *win; int y; int w; int idx; int sel; } GDashRender; /* Dashboard panel item */ typedef struct GDashData_ { GMetrics *metrics; short is_subitem; } GDashData; /* Dashboard panel meta data */ typedef struct GDashMeta_ { uint64_t max_hits; /* maximum value on the hits column */ uint64_t max_visitors; /* maximum value on the visitors column */ /* determine the maximum metric's length of these metrics */ /* for instance, 1022 is the max value for the hits column and its length = 4 */ int hits_len; int hits_perc_len; int visitors_len; int visitors_perc_len; int bw_len; int avgts_len; int cumts_len; int maxts_len; int method_len; int protocol_len; int data_len; } GDashMeta; /* Dashboard panel */ typedef struct GDashModule_ { GDashData *data; /* data metrics */ GModule module; /* module */ GDashMeta meta; /* meta data */ const char *head; /* panel header */ const char *desc; /* panel description */ int alloc_data; /* number of data items allocated. */ /* e.g., MAX_CHOICES or holder size */ int dash_size; /* dashboard size */ int holder_size; /* hash table size */ int ht_size; /* hash table size */ int idx_data; /* idx data */ unsigned short pos_y; /* dashboard current Y position */ } GDashModule; /* Dashboard */ typedef struct GDash_ { int total_alloc; /* number of allocated dashboard lines */ GDashModule module[TOTAL_MODULES]; } GDash; /* Function Prototypes */ GDashData *new_gdata (uint32_t size); GDash *new_gdash (void); int get_num_collapsed_data_rows (void); int get_num_expanded_data_rows (void); int perform_next_find (GHolder * h, GScroll * scroll); int render_find_dialog (WINDOW * main_win, GScroll * scroll); int set_module_from_mouse_event (GScroll * scroll, GDash * dash, int y); uint32_t get_ht_size_by_module (GModule module); void display_content (WINDOW * win, GDash * dash, GScroll * scroll); void free_dashboard (GDash * dash); void load_data_to_dash (GHolder * h, GDash * dash, GModule module, GScroll * scroll); void reset_find (void); void reset_scroll_offsets (GScroll * scroll); #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/tpl.c����������������������������������������������������������������������������0000644�0001750�0001730�00000245632�14624731651�010551� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (c) 2005-2013, Troy D. Hanson http://troydhanson.github.com/tpl/ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define TPL_VERSION 1.6 /*static const char id[]="$Id: tpl.c 192 2009-04-24 10:35:30Z thanson $";*/ #include <stdlib.h> /* malloc */ #include <stdarg.h> /* va_list */ #include <string.h> /* memcpy, memset, strchr */ #include <stdio.h> /* printf (tpl_hook.oops default function) */ #ifndef _WIN32 #include <unistd.h> /* for ftruncate */ #else #include <io.h> #define ftruncate(x,y) _chsize(x,y) #endif #include <sys/stat.h> /* for 'open' */ #include <fcntl.h> /* for 'open' */ #include <errno.h> #ifndef _WIN32 #include <inttypes.h> /* uint32_t, uint64_t, etc */ #else typedef unsigned short ushort; typedef __int16 int16_t; typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #endif #ifndef S_ISREG #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) #endif #if ( defined __CYGWIN__ || defined __MINGW32__ || defined _WIN32 ) #include "win/mman.h" /* mmap */ #else #include <sys/mman.h> /* mmap */ #endif #include "tpl.h" #define TPL_GATHER_BUFLEN 8192 #define TPL_MAGIC "tpl" /* macro to add a structure to a doubly-linked list */ #define DL_ADD(head,add) \ do { \ if (head) { \ (add)->prev = (head)->prev; \ (head)->prev->next = (add); \ (head)->prev = (add); \ (add)->next = NULL; \ } else { \ (head)=(add); \ (head)->prev = (head); \ (head)->next = NULL; \ } \ } while (0); #define fatal_oom() tpl_hook.fatal("out of memory\n") /* bit flags (internal). preceded by the external flags in tpl.h */ #define TPL_WRONLY (1 << 9) /* app has initiated tpl packing */ #define TPL_RDONLY (1 << 10) /* tpl was loaded (for unpacking) */ #define TPL_XENDIAN (1 << 11) /* swap endianness when unpacking */ #define TPL_OLD_STRING_FMT (1 << 12) /* tpl has strings in 1.2 format */ /* values for the flags byte that appears after the magic prefix */ #define TPL_SUPPORTED_BITFLAGS 3 #define TPL_FL_BIGENDIAN (1 << 0) #define TPL_FL_NULLSTRINGS (1 << 1) /* char values for node type */ #define TPL_TYPE_ROOT 0 #define TPL_TYPE_INT32 1 #define TPL_TYPE_UINT32 2 #define TPL_TYPE_BYTE 3 #define TPL_TYPE_STR 4 #define TPL_TYPE_ARY 5 #define TPL_TYPE_BIN 6 #define TPL_TYPE_DOUBLE 7 #define TPL_TYPE_INT64 8 #define TPL_TYPE_UINT64 9 #define TPL_TYPE_INT16 10 #define TPL_TYPE_UINT16 11 #define TPL_TYPE_POUND 12 /* error codes */ #define ERR_NOT_MINSIZE (-1) #define ERR_MAGIC_MISMATCH (-2) #define ERR_INCONSISTENT_SZ (-3) #define ERR_FMT_INVALID (-4) #define ERR_FMT_MISSING_NUL (-5) #define ERR_FMT_MISMATCH (-6) #define ERR_FLEN_MISMATCH (-7) #define ERR_INCONSISTENT_SZ2 (-8) #define ERR_INCONSISTENT_SZ3 (-9) #define ERR_INCONSISTENT_SZ4 (-10) #define ERR_UNSUPPORTED_FLAGS (-11) /* access to A(...) nodes by index */ typedef struct tpl_pidx { struct tpl_node *node; struct tpl_pidx *next, *prev; } tpl_pidx; /* A(...) node datum */ typedef struct tpl_atyp { uint32_t num; /* num elements */ size_t sz; /* size of each backbone's datum */ struct tpl_backbone *bb, *bbtail; void *cur; } tpl_atyp; /* backbone to extend A(...) lists dynamically */ typedef struct tpl_backbone { struct tpl_backbone *next; /* when this structure is malloc'd, extra space is alloc'd at the * end to store the backbone "datum", and data points to it. */ #if __STDC_VERSION__ < 199901 char *data; #else char data[]; #endif } tpl_backbone; /* mmap record */ typedef struct tpl_mmap_rec { int fd; void *text; size_t text_sz; } tpl_mmap_rec; /* root node datum */ typedef struct tpl_root_data { int flags; tpl_pidx *pidx; tpl_mmap_rec mmap; char *fmt; int *fxlens, num_fxlens; } tpl_root_data; /* node type to size mapping */ struct tpl_type_t { char c; int sz; }; /* Internal prototypes */ static tpl_node *tpl_node_new (tpl_node * parent); static tpl_node *tpl_find_i (tpl_node * n, int i); static void *tpl_cpv (void *datav, const void *data, size_t sz); static void *tpl_extend_backbone (tpl_node * n); static char *tpl_fmt (tpl_node * r); static void *tpl_dump_atyp (tpl_node * n, tpl_atyp * at, void *dv); static size_t tpl_ser_osz (tpl_node * n); static void tpl_free_atyp (tpl_node * n, tpl_atyp * atyp); static int tpl_dump_to_mem (tpl_node * r, void *addr, size_t sz); static int tpl_mmap_file (char *filename, tpl_mmap_rec * map_rec); static int tpl_mmap_output_file (char *filename, size_t sz, void **text_out); static int tpl_cpu_bigendian (void); static int tpl_needs_endian_swap (void *); static void tpl_byteswap (void *word, int len); static void tpl_fatal (const char *fmt, ...) __attribute__((__format__ (printf, 1, 2))) __attribute__((__noreturn__)); static int tpl_serlen (tpl_node * r, tpl_node * n, void *dv, size_t *serlen); static int tpl_unpackA0 (tpl_node * r); static int tpl_oops (const char *fmt, ...) __attribute__((__format__ (printf, 1, 2))); static int tpl_gather_mem (char *buf, size_t len, tpl_gather_t ** gs, tpl_gather_cb * cb, void *data); static int tpl_gather_nonblocking (int fd, tpl_gather_t ** gs, tpl_gather_cb * cb, void *data); static int tpl_gather_blocking (int fd, void **img, size_t *sz); /* This is used internally to help calculate padding when a 'double' * follows a smaller datatype in a structure. Normally under gcc * on x86, d will be aligned at +4, however use of -malign-double * causes d to be aligned at +8 (this is actually faster on x86). * Also SPARC and x86_64 seem to align always on +8. */ struct tpl_double_alignment_detector { char a; double d; /* some platforms align this on +4, others on +8 */ }; /* this is another case where alignment varies. mac os x/gcc was observed * to align the int64_t at +4 under -m32 and at +8 under -m64 */ struct tpl_int64_alignment_detector { int i; int64_t j; /* some platforms align this on +4, others on +8 */ }; typedef struct { size_t inter_elt_len; /* padded inter-element len; i.e. &a[1].field - &a[0].field */ tpl_node *iter_start_node; /* node to jump back to, as we start each new iteration */ size_t iternum; /* current iteration number (total req'd. iter's in n->num) */ } tpl_pound_data; /* Hooks for customizing tpl mem alloc, error handling, etc. Set defaults. */ tpl_hook_t tpl_hook = { /* .oops = */ tpl_oops, /* .malloc = */ malloc, /* .realloc = */ realloc, /* .free = */ free, /* .fatal = */ tpl_fatal, /* .gather_max = */ 0 /* max tpl size (bytes) for tpl_gather */ }; static const char tpl_fmt_chars[] = "AS($)BiucsfIUjv#"; /* valid format chars */ /* valid within S(...) */ /* static const char tpl_S_fmt_chars[] = "iucsfIUjv#$()"; */ static const char tpl_datapeek_ok_chars[] = "iucsfIUjv"; /* valid in datapeek */ static const struct tpl_type_t tpl_types[] = { /* [TPL_TYPE_ROOT] = */ {'r', 0}, /* [TPL_TYPE_INT32] = */ {'i', sizeof (int32_t)}, /* [TPL_TYPE_UINT32] = */ {'u', sizeof (uint32_t)}, /* [TPL_TYPE_BYTE] = */ {'c', sizeof (char)}, /* [TPL_TYPE_STR] = */ {'s', sizeof (char *)}, /* [TPL_TYPE_ARY] = */ {'A', 0}, /* [TPL_TYPE_BIN] = */ {'B', 0}, /* [TPL_TYPE_DOUBLE] = */ {'f', 8}, /* not sizeof(double) as that varies */ /* [TPL_TYPE_INT64] = */ {'I', sizeof (int64_t)}, /* [TPL_TYPE_UINT64] = */ {'U', sizeof (uint64_t)}, /* [TPL_TYPE_INT16] = */ {'j', sizeof (int16_t)}, /* [TPL_TYPE_UINT16] = */ {'v', sizeof (uint16_t)}, /* [TPL_TYPE_POUND] = */ {'#', 0}, }; /* default error-reporting function. Just writes to stderr. */ static int tpl_oops (const char *fmt, ...) { va_list ap; va_start (ap, fmt); vfprintf (stderr, fmt, ap); va_end (ap); return 0; } static tpl_node * tpl_node_new (tpl_node *parent) { tpl_node *n; if ((n = tpl_hook.malloc (sizeof (tpl_node))) == NULL) { fatal_oom (); } n->addr = NULL; n->data = NULL; n->num = 1; n->ser_osz = 0; n->children = NULL; n->next = NULL; n->parent = parent; return n; } /* Used in S(..) formats to pack several fields from a structure based on * only the structure address. We need to calculate field addresses * manually taking into account the size of the fields and intervening padding. * The wrinkle is that double is not normally aligned on x86-32 but the * -malign-double compiler option causes it to be. Double are aligned * on Sparc, and apparently on 64 bit x86. We use a helper structure * to detect whether double is aligned in this compilation environment. */ static char * calc_field_addr (tpl_node *parent, int type, char *struct_addr, int ordinal) { tpl_node *prev; int offset; int align_sz; if (ordinal == 1) return struct_addr; /* first field starts on structure address */ /* generate enough padding so field addr is divisible by it's align_sz. 4, 8, etc */ prev = parent->children->prev; switch (type) { case TPL_TYPE_DOUBLE: align_sz = sizeof (struct tpl_double_alignment_detector) > 12 ? 8 : 4; break; case TPL_TYPE_INT64: case TPL_TYPE_UINT64: align_sz = sizeof (struct tpl_int64_alignment_detector) > 12 ? 8 : 4; break; default: align_sz = tpl_types[type].sz; break; } offset = ((uintptr_t) prev->addr - (uintptr_t) struct_addr) + (tpl_types[prev->type].sz * prev->num); offset = (offset + align_sz - 1) / align_sz * align_sz; return struct_addr + offset; } TPL_API tpl_node * tpl_map (char *fmt, ...) { va_list ap; tpl_node *tn; va_start (ap, fmt); tn = tpl_map_va (fmt, ap); va_end (ap); return tn; } TPL_API tpl_node * tpl_map_va (char *fmt, va_list ap) { int lparen_level = 0, expect_lparen = 0, t = 0, in_structure = 0, ordinal = 0; int in_nested_structure = 0; char *c, *peek, *struct_addr = NULL, *struct_next; tpl_node *root, *parent, *n = NULL, *preceding, *iter_start_node = NULL, *struct_widest_node = NULL, *np; tpl_pidx *pidx; tpl_pound_data *pd; int *fxlens, num_fxlens, pound_num, pound_prod, applies_to_struct; int contig_fxlens[10]; /* temp space for contiguous fxlens */ uint32_t num_contig_fxlens; uint32_t i; int j; ptrdiff_t inter_elt_len = 0; /* padded element length of contiguous structs in array */ root = tpl_node_new (NULL); root->type = TPL_TYPE_ROOT; root->data = (tpl_root_data *) tpl_hook.malloc (sizeof (tpl_root_data)); if (!root->data) fatal_oom (); memset ((tpl_root_data *) root->data, 0, sizeof (tpl_root_data)); /* set up root nodes special ser_osz to reflect overhead of preamble */ root->ser_osz = sizeof (uint32_t); /* tpl leading length */ root->ser_osz += strlen (fmt) + 1; /* fmt + NUL-terminator */ root->ser_osz += 4; /* 'tpl' magic prefix + flags byte */ parent = root; c = fmt; while (*c != '\0') { switch (*c) { case 'c': case 'i': case 'u': case 'j': case 'v': case 'I': case 'U': case 'f': if (*c == 'c') t = TPL_TYPE_BYTE; else if (*c == 'i') t = TPL_TYPE_INT32; else if (*c == 'u') t = TPL_TYPE_UINT32; else if (*c == 'j') t = TPL_TYPE_INT16; else if (*c == 'v') t = TPL_TYPE_UINT16; else if (*c == 'I') t = TPL_TYPE_INT64; else if (*c == 'U') t = TPL_TYPE_UINT64; else if (*c == 'f') t = TPL_TYPE_DOUBLE; if (expect_lparen) goto fail; n = tpl_node_new (parent); n->type = t; if (in_structure) { if (ordinal == 1) { /* for S(...)# iteration. Apply any changes to case 's' too!!! */ iter_start_node = n; struct_widest_node = n; } if (tpl_types[n->type].sz > tpl_types[struct_widest_node->type].sz) { struct_widest_node = n; } n->addr = calc_field_addr (parent, n->type, struct_addr, ordinal++); } else n->addr = (void *) va_arg (ap, void *); n->data = tpl_hook.malloc (tpl_types[t].sz); if (!n->data) fatal_oom (); if (n->parent->type == TPL_TYPE_ARY) ((tpl_atyp *) (n->parent->data))->sz += tpl_types[t].sz; DL_ADD (parent->children, n); break; case 's': if (expect_lparen) goto fail; n = tpl_node_new (parent); n->type = TPL_TYPE_STR; if (in_structure) { if (ordinal == 1) { iter_start_node = n; /* for S(...)# iteration */ struct_widest_node = n; } if (tpl_types[n->type].sz > tpl_types[struct_widest_node->type].sz) { struct_widest_node = n; } n->addr = calc_field_addr (parent, n->type, struct_addr, ordinal++); } else n->addr = (void *) va_arg (ap, void *); n->data = tpl_hook.malloc (sizeof (char *)); if (!n->data) fatal_oom (); *(char **) (n->data) = NULL; if (n->parent->type == TPL_TYPE_ARY) ((tpl_atyp *) (n->parent->data))->sz += sizeof (void *); DL_ADD (parent->children, n); break; case '#': /* apply a 'num' to preceding atom */ if (!parent->children) goto fail; preceding = parent->children->prev; /* first child's prev is 'last child' */ t = preceding->type; applies_to_struct = (*(c - 1) == ')') ? 1 : 0; if (!applies_to_struct) { if (!(t == TPL_TYPE_BYTE || t == TPL_TYPE_INT32 || t == TPL_TYPE_UINT32 || t == TPL_TYPE_DOUBLE || t == TPL_TYPE_UINT64 || t == TPL_TYPE_INT64 || t == TPL_TYPE_UINT16 || t == TPL_TYPE_INT16 || t == TPL_TYPE_STR)) goto fail; } /* count up how many contiguous # and form their product */ pound_prod = 1; num_contig_fxlens = 0; for (peek = c; *peek == '#'; peek++) { pound_num = va_arg (ap, int); if (pound_num < 1) { tpl_hook.fatal ("non-positive iteration count %d\n", pound_num); } if (num_contig_fxlens >= (sizeof (contig_fxlens) / sizeof (contig_fxlens[0]))) { tpl_hook.fatal ("contiguous # exceeds hardcoded limit\n"); } contig_fxlens[num_contig_fxlens++] = pound_num; pound_prod *= pound_num; } /* increment c to skip contiguous # so its points to last one */ c = peek - 1; /* differentiate atom-# from struct-# by noting preceding rparen */ if (applies_to_struct) { /* insert # node to induce looping */ n = tpl_node_new (parent); n->type = TPL_TYPE_POUND; n->num = pound_prod; n->data = tpl_hook.malloc (sizeof (tpl_pound_data)); if (!n->data) fatal_oom (); pd = (tpl_pound_data *) n->data; pd->inter_elt_len = inter_elt_len; pd->iter_start_node = iter_start_node; pd->iternum = 0; DL_ADD (parent->children, n); /* multiply the 'num' and data space on each atom in the structure */ for (np = iter_start_node; np != n; np = np->next) { if (n->parent->type == TPL_TYPE_ARY) { ((tpl_atyp *) (n->parent->data))->sz += tpl_types[np->type].sz * (np->num * (n->num - 1)); } np->data = tpl_hook.realloc (np->data, tpl_types[np->type].sz * np->num * n->num); if (!np->data) fatal_oom (); memset (np->data, 0, tpl_types[np->type].sz * np->num * n->num); } } else { /* simple atom-# form does not require a loop */ preceding->num = pound_prod; preceding->data = tpl_hook.realloc (preceding->data, tpl_types[t].sz * preceding->num); if (!preceding->data) fatal_oom (); memset (preceding->data, 0, tpl_types[t].sz * preceding->num); if (n->parent->type == TPL_TYPE_ARY) { ((tpl_atyp *) (n->parent->data))->sz += tpl_types[t].sz * (preceding->num - 1); } } root->ser_osz += (sizeof (uint32_t) * num_contig_fxlens); j = ((tpl_root_data *) root->data)->num_fxlens; /* before incrementing */ (((tpl_root_data *) root->data)->num_fxlens) += num_contig_fxlens; num_fxlens = ((tpl_root_data *) root->data)->num_fxlens; /* new value */ fxlens = ((tpl_root_data *) root->data)->fxlens; fxlens = tpl_hook.realloc (fxlens, sizeof (int) * num_fxlens); if (!fxlens) fatal_oom (); ((tpl_root_data *) root->data)->fxlens = fxlens; for (i = 0; i < num_contig_fxlens; i++) fxlens[j++] = contig_fxlens[i]; break; case 'B': if (expect_lparen) goto fail; if (in_structure) goto fail; n = tpl_node_new (parent); n->type = TPL_TYPE_BIN; n->addr = (tpl_bin *) va_arg (ap, void *); n->data = tpl_hook.malloc (sizeof (tpl_bin *)); if (!n->data) fatal_oom (); *((tpl_bin **) n->data) = NULL; if (n->parent->type == TPL_TYPE_ARY) ((tpl_atyp *) (n->parent->data))->sz += sizeof (tpl_bin); DL_ADD (parent->children, n); break; case 'A': if (in_structure) goto fail; n = tpl_node_new (parent); n->type = TPL_TYPE_ARY; DL_ADD (parent->children, n); parent = n; expect_lparen = 1; pidx = (tpl_pidx *) tpl_hook.malloc (sizeof (tpl_pidx)); if (!pidx) fatal_oom (); pidx->node = n; pidx->next = NULL; DL_ADD (((tpl_root_data *) (root->data))->pidx, pidx); /* set up the A's tpl_atyp */ n->data = (tpl_atyp *) tpl_hook.malloc (sizeof (tpl_atyp)); if (!n->data) fatal_oom (); ((tpl_atyp *) (n->data))->num = 0; ((tpl_atyp *) (n->data))->sz = 0; ((tpl_atyp *) (n->data))->bb = NULL; ((tpl_atyp *) (n->data))->bbtail = NULL; ((tpl_atyp *) (n->data))->cur = NULL; if (n->parent->type == TPL_TYPE_ARY) ((tpl_atyp *) (n->parent->data))->sz += sizeof (void *); break; case 'S': if (in_structure) goto fail; expect_lparen = 1; ordinal = 1; /* index upcoming atoms in S(..) */ in_structure = 1 + lparen_level; /* so we can tell where S fmt ends */ struct_addr = (char *) va_arg (ap, void *); break; case '$': /* nested structure */ if (!in_structure) goto fail; expect_lparen = 1; in_nested_structure++; break; case ')': lparen_level--; if (lparen_level < 0) goto fail; if (*(c - 1) == '(') goto fail; if (in_nested_structure) in_nested_structure--; else if (in_structure && (in_structure - 1 == lparen_level)) { /* calculate delta between contiguous structures in array */ struct_next = calc_field_addr (parent, struct_widest_node->type, struct_addr, ordinal++); inter_elt_len = struct_next - struct_addr; in_structure = 0; } else parent = parent->parent; /* rparen ends A() type, not S() type */ break; case '(': if (!expect_lparen) goto fail; expect_lparen = 0; lparen_level++; break; default: tpl_hook.oops ("unsupported option %c\n", *c); goto fail; } c++; } if (lparen_level != 0) goto fail; /* copy the format string, save for convenience */ ((tpl_root_data *) (root->data))->fmt = tpl_hook.malloc (strlen (fmt) + 1); if (((tpl_root_data *) (root->data))->fmt == NULL) fatal_oom (); memcpy (((tpl_root_data *) (root->data))->fmt, fmt, strlen (fmt) + 1); return root; fail: tpl_hook.oops ("failed to parse %s\n", fmt); tpl_free (root); return NULL; } static int tpl_unmap_file (tpl_mmap_rec *mr) { if (munmap (mr->text, mr->text_sz) == -1) { tpl_hook.oops ("Failed to munmap: %s\n", strerror (errno)); } close (mr->fd); mr->text = NULL; mr->text_sz = 0; return 0; } static void tpl_free_keep_map (tpl_node *r) { int mmap_bits = (TPL_RDONLY | TPL_FILE); int ufree_bits = (TPL_MEM | TPL_UFREE); tpl_node *nxtc, *c; int find_next_node = 0, looking, i; size_t sz; /* For mmap'd files, or for 'ufree' memory images , do appropriate release */ if ((((tpl_root_data *) (r->data))->flags & mmap_bits) == mmap_bits) { tpl_unmap_file (&((tpl_root_data *) (r->data))->mmap); } else if ((((tpl_root_data *) (r->data))->flags & ufree_bits) == ufree_bits) { tpl_hook.free (((tpl_root_data *) (r->data))->mmap.text); } c = r->children; if (c) { while (c->type != TPL_TYPE_ROOT) { /* loop until we come back to root node */ switch (c->type) { case TPL_TYPE_BIN: /* free any binary buffer hanging from tpl_bin */ if (*((tpl_bin **) (c->data))) { if ((*((tpl_bin **) (c->data)))->addr) { tpl_hook.free ((*((tpl_bin **) (c->data)))->addr); } *((tpl_bin **) c->data) = NULL; /* reset tpl_bin */ } find_next_node = 1; break; case TPL_TYPE_STR: /* free any packed (copied) string */ for (i = 0; i < c->num; i++) { char *str = ((char **) c->data)[i]; if (str) { tpl_hook.free (str); ((char **) c->data)[i] = NULL; } } find_next_node = 1; break; case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: case TPL_TYPE_POUND: find_next_node = 1; break; case TPL_TYPE_ARY: c->ser_osz = 0; /* zero out the serialization output size */ sz = ((tpl_atyp *) (c->data))->sz; /* save sz to use below */ tpl_free_atyp (c, c->data); /* make new atyp */ c->data = (tpl_atyp *) tpl_hook.malloc (sizeof (tpl_atyp)); if (!c->data) fatal_oom (); ((tpl_atyp *) (c->data))->num = 0; ((tpl_atyp *) (c->data))->sz = sz; /* restore bb datum sz */ ((tpl_atyp *) (c->data))->bb = NULL; ((tpl_atyp *) (c->data))->bbtail = NULL; ((tpl_atyp *) (c->data))->cur = NULL; c = c->children; break; default: tpl_hook.fatal ("unsupported format character\n"); break; } if (find_next_node) { find_next_node = 0; looking = 1; while (looking) { if (c->next) { nxtc = c->next; c = nxtc; looking = 0; } else { if (c->type == TPL_TYPE_ROOT) break; /* root node */ else { nxtc = c->parent; c = nxtc; } } } } } } ((tpl_root_data *) (r->data))->flags = 0; /* reset flags */ } TPL_API void tpl_free (tpl_node *r) { int mmap_bits = (TPL_RDONLY | TPL_FILE); int ufree_bits = (TPL_MEM | TPL_UFREE); tpl_node *nxtc, *c; int find_next_node = 0, looking, num, i; tpl_pidx *pidx, *pidx_nxt; /* For mmap'd files, or for 'ufree' memory images , do appropriate release */ if ((((tpl_root_data *) (r->data))->flags & mmap_bits) == mmap_bits) { tpl_unmap_file (&((tpl_root_data *) (r->data))->mmap); } else if ((((tpl_root_data *) (r->data))->flags & ufree_bits) == ufree_bits) { tpl_hook.free (((tpl_root_data *) (r->data))->mmap.text); } c = r->children; if (c) { while (c->type != TPL_TYPE_ROOT) { /* loop until we come back to root node */ switch (c->type) { case TPL_TYPE_BIN: /* free any binary buffer hanging from tpl_bin */ if (*((tpl_bin **) (c->data))) { if ((*((tpl_bin **) (c->data)))->sz != 0) { tpl_hook.free ((*((tpl_bin **) (c->data)))->addr); } tpl_hook.free (*((tpl_bin **) c->data)); /* free tpl_bin */ } tpl_hook.free (c->data); /* free tpl_bin* */ find_next_node = 1; break; case TPL_TYPE_STR: /* free any packed (copied) string */ num = 1; nxtc = c->next; while (nxtc) { if (nxtc->type == TPL_TYPE_POUND) { num = nxtc->num; } nxtc = nxtc->next; } for (i = 0; i < c->num * num; i++) { char *str = ((char **) c->data)[i]; if (str) { tpl_hook.free (str); ((char **) c->data)[i] = NULL; } } tpl_hook.free (c->data); find_next_node = 1; break; case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: case TPL_TYPE_POUND: tpl_hook.free (c->data); find_next_node = 1; break; case TPL_TYPE_ARY: tpl_free_atyp (c, c->data); if (c->children) c = c->children; /* normal case */ else find_next_node = 1; /* edge case, handle bad format A() */ break; default: tpl_hook.fatal ("unsupported format character\n"); break; } if (find_next_node) { find_next_node = 0; looking = 1; while (looking) { if (c->next) { nxtc = c->next; tpl_hook.free (c); c = nxtc; looking = 0; } else { if (c->type == TPL_TYPE_ROOT) break; /* root node */ else { nxtc = c->parent; tpl_hook.free (c); c = nxtc; } } } } } } /* free root */ for (pidx = ((tpl_root_data *) (r->data))->pidx; pidx; pidx = pidx_nxt) { pidx_nxt = pidx->next; tpl_hook.free (pidx); } tpl_hook.free (((tpl_root_data *) (r->data))->fmt); if (((tpl_root_data *) (r->data))->num_fxlens > 0) { tpl_hook.free (((tpl_root_data *) (r->data))->fxlens); } tpl_hook.free (r->data); /* tpl_root_data */ tpl_hook.free (r); } /* Find the i'th packable ('A' node) */ static tpl_node * tpl_find_i (tpl_node *n, int i) { int j = 0; tpl_pidx *pidx; if (n->type != TPL_TYPE_ROOT) return NULL; if (i == 0) return n; /* packable 0 is root */ for (pidx = ((tpl_root_data *) (n->data))->pidx; pidx; pidx = pidx->next) { if (++j == i) return pidx->node; } return NULL; } static void * tpl_cpv (void *datav, const void *data, size_t sz) { if (sz > 0) memcpy (datav, data, sz); return (void *) ((uintptr_t) datav + sz); } static void * tpl_extend_backbone (tpl_node *n) { tpl_backbone *bb; bb = (tpl_backbone *) tpl_hook.malloc (sizeof (tpl_backbone) + ((tpl_atyp *) (n->data))->sz); /* datum hangs on coattails of bb */ if (!bb) fatal_oom (); #if __STDC_VERSION__ < 199901 bb->data = (char *) ((uintptr_t) bb + sizeof (tpl_backbone)); #endif memset (bb->data, 0, ((tpl_atyp *) (n->data))->sz); bb->next = NULL; /* Add the new backbone to the tail, also setting head if necessary */ if (((tpl_atyp *) (n->data))->bb == NULL) { ((tpl_atyp *) (n->data))->bb = bb; ((tpl_atyp *) (n->data))->bbtail = bb; } else { ((tpl_atyp *) (n->data))->bbtail->next = bb; ((tpl_atyp *) (n->data))->bbtail = bb; } ((tpl_atyp *) (n->data))->num++; return bb->data; } /* Get the format string corresponding to a given tpl (root node) */ static char * tpl_fmt (tpl_node *r) { return ((tpl_root_data *) (r->data))->fmt; } /* Get the fmt # lengths as a contiguous buffer of ints (length num_fxlens) */ static int * tpl_fxlens (tpl_node *r, int *num_fxlens) { *num_fxlens = ((tpl_root_data *) (r->data))->num_fxlens; return ((tpl_root_data *) (r->data))->fxlens; } /* called when serializing an 'A' type node into a buffer which has * already been set up with the proper space. The backbone is walked * which was obtained from the tpl_atyp header passed in. */ static void * tpl_dump_atyp (tpl_node *n, tpl_atyp *at, void *dv) { tpl_backbone *bb; tpl_node *c; void *datav; uint32_t slen; tpl_bin *binp; char *strp; tpl_atyp *atypp; tpl_pound_data *pd; int i; size_t itermax; /* handle 'A' nodes */ dv = tpl_cpv (dv, &at->num, sizeof (uint32_t)); /* array len */ for (bb = at->bb; bb; bb = bb->next) { datav = bb->data; c = n->children; while (c) { switch (c->type) { case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: dv = tpl_cpv (dv, datav, tpl_types[c->type].sz * c->num); datav = (void *) ((uintptr_t) datav + tpl_types[c->type].sz * c->num); break; case TPL_TYPE_BIN: /* dump the buffer length followed by the buffer */ memcpy (&binp, datav, sizeof (tpl_bin *)); /* cp to aligned */ slen = binp->sz; dv = tpl_cpv (dv, &slen, sizeof (uint32_t)); dv = tpl_cpv (dv, binp->addr, slen); datav = (void *) ((uintptr_t) datav + sizeof (tpl_bin *)); break; case TPL_TYPE_STR: /* dump the string length followed by the string */ for (i = 0; i < c->num; i++) { memcpy (&strp, datav, sizeof (char *)); /* cp to aligned */ slen = strp ? (strlen (strp) + 1) : 0; dv = tpl_cpv (dv, &slen, sizeof (uint32_t)); if (slen > 1) dv = tpl_cpv (dv, strp, slen - 1); datav = (void *) ((uintptr_t) datav + sizeof (char *)); } break; case TPL_TYPE_ARY: memcpy (&atypp, datav, sizeof (tpl_atyp *)); /* cp to aligned */ dv = tpl_dump_atyp (c, atypp, dv); datav = (void *) ((uintptr_t) datav + sizeof (void *)); break; case TPL_TYPE_POUND: /* iterate over the preceding nodes */ pd = (tpl_pound_data *) c->data; itermax = c->num; if (++(pd->iternum) < itermax) { c = pd->iter_start_node; continue; } else { /* loop complete. */ pd->iternum = 0; } break; default: tpl_hook.fatal ("unsupported format character\n"); break; } c = c->next; } } return dv; } /* figure the serialization output size needed for tpl whose root is n*/ static size_t tpl_ser_osz (tpl_node *n) { tpl_node *c, *np; size_t sz, itermax; tpl_bin *binp; char *strp; tpl_pound_data *pd; int i; /* handle the root node ONLY (subtree's ser_osz have been bubbled-up) */ if (n->type != TPL_TYPE_ROOT) { tpl_hook.fatal ("internal error: tpl_ser_osz on non-root node\n"); } sz = n->ser_osz; /* start with fixed overhead, already stored */ c = n->children; while (c) { switch (c->type) { case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: sz += tpl_types[c->type].sz * c->num; break; case TPL_TYPE_BIN: sz += sizeof (uint32_t); /* binary buf len */ memcpy (&binp, c->data, sizeof (tpl_bin *)); /* cp to aligned */ sz += binp->sz; break; case TPL_TYPE_STR: for (i = 0; i < c->num; i++) { sz += sizeof (uint32_t); /* string len */ memcpy (&strp, &((char **) c->data)[i], sizeof (char *)); /* cp to aligned */ sz += strp ? strlen (strp) : 0; } break; case TPL_TYPE_ARY: sz += sizeof (uint32_t); /* array len */ sz += c->ser_osz; /* bubbled-up child array ser_osz */ break; case TPL_TYPE_POUND: /* iterate over the preceding nodes */ itermax = c->num; pd = (tpl_pound_data *) c->data; if (++(pd->iternum) < itermax) { for (np = pd->iter_start_node; np != c; np = np->next) { np->data = (char *) (np->data) + (tpl_types[np->type].sz * np->num); } c = pd->iter_start_node; continue; } else { /* loop complete. */ pd->iternum = 0; for (np = pd->iter_start_node; np != c; np = np->next) { np->data = (char *) (np->data) - ((itermax - 1) * tpl_types[np->type].sz * np->num); } } break; default: tpl_hook.fatal ("unsupported format character\n"); break; } c = c->next; } return sz; } TPL_API int tpl_dump (tpl_node *r, int mode, ...) { va_list ap; char *filename, *bufv; void **addr_out, *buf, *pa_addr; int fd, rc = 0; size_t sz, *sz_out, pa_sz; struct stat sbuf; if (((tpl_root_data *) (r->data))->flags & TPL_RDONLY) { /* unusual */ tpl_hook.oops ("error: tpl_dump called for a loaded tpl\n"); return -1; } sz = tpl_ser_osz (r); /* compute the size needed to serialize */ va_start (ap, mode); if (mode & TPL_FILE) { filename = va_arg (ap, char *); fd = tpl_mmap_output_file (filename, sz, &buf); if (fd == -1) rc = -1; else { rc = tpl_dump_to_mem (r, buf, sz); if (msync (buf, sz, MS_SYNC) == -1) { tpl_hook.oops ("msync failed on fd %d: %s\n", fd, strerror (errno)); } if (munmap (buf, sz) == -1) { tpl_hook.oops ("munmap failed on fd %d: %s\n", fd, strerror (errno)); } close (fd); } } else if (mode & TPL_FD) { fd = va_arg (ap, int); if ((buf = tpl_hook.malloc (sz)) == NULL) fatal_oom (); tpl_dump_to_mem (r, buf, sz); bufv = buf; do { rc = write (fd, bufv, sz); if (rc > 0) { sz -= rc; bufv += rc; } else if (rc == -1) { if (errno == EINTR || errno == EAGAIN) continue; tpl_hook.oops ("error writing to fd %d: %s\n", fd, strerror (errno)); /* attempt to rewind partial write to a regular file */ if (fstat (fd, &sbuf) == 0 && S_ISREG (sbuf.st_mode)) { if (ftruncate (fd, sbuf.st_size - (bufv - (char *) buf)) == -1) { tpl_hook.oops ("can't rewind: %s\n", strerror (errno)); } } free (buf); va_end (ap); return -1; } } while (sz > 0); free (buf); rc = 0; } else if (mode & TPL_MEM) { if (mode & TPL_PREALLOCD) { /* caller allocated */ pa_addr = (void *) va_arg (ap, void *); pa_sz = va_arg (ap, size_t); if (pa_sz < sz) { tpl_hook.oops ("tpl_dump: buffer too small, need %zu bytes\n", sz); va_end (ap); return -1; } rc = tpl_dump_to_mem (r, pa_addr, sz); } else { /* we allocate */ addr_out = (void **) va_arg (ap, void *); sz_out = va_arg (ap, size_t *); if ((buf = tpl_hook.malloc (sz)) == NULL) fatal_oom (); *sz_out = sz; *addr_out = buf; rc = tpl_dump_to_mem (r, buf, sz); } } else if (mode & TPL_GETSIZE) { sz_out = va_arg (ap, size_t *); *sz_out = sz; } else { tpl_hook.oops ("unsupported tpl_dump mode %d\n", mode); rc = -1; } va_end (ap); return rc; } /* This function expects the caller to have set up a memory buffer of * adequate size to hold the serialized tpl. The sz parameter must be * the result of tpl_ser_osz(r). */ static int tpl_dump_to_mem (tpl_node *r, void *addr, size_t sz) { uint32_t slen, sz32; int *fxlens, num_fxlens, i; void *dv; char *fmt, flags; tpl_node *c, *np; tpl_pound_data *pd; size_t itermax; fmt = tpl_fmt (r); flags = 0; if (tpl_cpu_bigendian ()) flags |= TPL_FL_BIGENDIAN; if (strchr (fmt, 's')) flags |= TPL_FL_NULLSTRINGS; sz32 = sz; dv = addr; dv = tpl_cpv (dv, TPL_MAGIC, 3); /* copy tpl magic prefix */ dv = tpl_cpv (dv, &flags, 1); /* copy flags byte */ dv = tpl_cpv (dv, &sz32, sizeof (uint32_t)); /* overall length (inclusive) */ dv = tpl_cpv (dv, fmt, strlen (fmt) + 1); /* copy format with NUL-term */ fxlens = tpl_fxlens (r, &num_fxlens); dv = tpl_cpv (dv, fxlens, num_fxlens * sizeof (uint32_t)); /* fmt # lengths */ /* serialize the tpl content, iterating over direct children of root */ c = r->children; while (c) { switch (c->type) { case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: dv = tpl_cpv (dv, c->data, tpl_types[c->type].sz * c->num); break; case TPL_TYPE_BIN: slen = (*(tpl_bin **) (c->data))->sz; dv = tpl_cpv (dv, &slen, sizeof (uint32_t)); /* buffer len */ dv = tpl_cpv (dv, (*(tpl_bin **) (c->data))->addr, slen); /* buf */ break; case TPL_TYPE_STR: for (i = 0; i < c->num; i++) { char *str = ((char **) c->data)[i]; slen = str ? strlen (str) + 1 : 0; dv = tpl_cpv (dv, &slen, sizeof (uint32_t)); /* string len */ if (slen > 1) dv = tpl_cpv (dv, str, slen - 1); /*string */ } break; case TPL_TYPE_ARY: dv = tpl_dump_atyp (c, (tpl_atyp *) c->data, dv); break; case TPL_TYPE_POUND: pd = (tpl_pound_data *) c->data; itermax = c->num; if (++(pd->iternum) < itermax) { /* in start or midst of loop. advance data pointers. */ for (np = pd->iter_start_node; np != c; np = np->next) { np->data = (char *) (np->data) + (tpl_types[np->type].sz * np->num); } /* do next iteration */ c = pd->iter_start_node; continue; } else { /* loop complete. */ /* reset iteration index and addr/data pointers. */ pd->iternum = 0; for (np = pd->iter_start_node; np != c; np = np->next) { np->data = (char *) (np->data) - ((itermax - 1) * tpl_types[np->type].sz * np->num); } } break; default: tpl_hook.fatal ("unsupported format character\n"); break; } c = c->next; } return 0; } static int tpl_cpu_bigendian (void) { unsigned i = 1; char *c; c = (char *) &i; return (c[0] == 1 ? 0 : 1); } /* * algorithm for sanity-checking a tpl image: * scan the tpl whilst not exceeding the buffer size (bufsz) , * formulating a calculated (expected) size of the tpl based * on walking its data. When calcsize has been calculated it * should exactly match the buffer size (bufsz) and the internal * recorded size (intlsz) */ static int tpl_sanity (tpl_node *r, int excess_ok) { uint32_t intlsz; int found_nul = 0, rc, octothorpes = 0, num_fxlens, *fxlens, flen; void *d, *dv; char intlflags, *fmt, c, *mapfmt; size_t bufsz, serlen; d = ((tpl_root_data *) (r->data))->mmap.text; bufsz = ((tpl_root_data *) (r->data))->mmap.text_sz; dv = d; if (bufsz < (4 + sizeof (uint32_t) + 1)) return ERR_NOT_MINSIZE; /* min sz: magic+flags+len+nul */ if (memcmp (dv, TPL_MAGIC, 3) != 0) return ERR_MAGIC_MISMATCH; /* missing tpl magic prefix */ if (tpl_needs_endian_swap (dv)) ((tpl_root_data *) (r->data))->flags |= TPL_XENDIAN; dv = (void *) ((uintptr_t) dv + 3); memcpy (&intlflags, dv, sizeof (char)); /* extract flags */ if (intlflags & ~TPL_SUPPORTED_BITFLAGS) return ERR_UNSUPPORTED_FLAGS; /* TPL1.3 stores strings with a "length+1" prefix to discern NULL strings from empty strings from non-empty strings; TPL1.2 only handled the latter two. So we need to be mindful of which string format we're reading from. */ if (!(intlflags & TPL_FL_NULLSTRINGS)) { ((tpl_root_data *) (r->data))->flags |= TPL_OLD_STRING_FMT; } dv = (void *) ((uintptr_t) dv + 1); memcpy (&intlsz, dv, sizeof (uint32_t)); /* extract internal size */ if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&intlsz, sizeof (uint32_t)); if (!excess_ok && (intlsz != bufsz)) return ERR_INCONSISTENT_SZ; /* inconsistent buffer/internal size */ dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); /* dv points to the start of the format string. Look for nul w/in buf sz */ fmt = (char *) dv; while ((uintptr_t) dv - (uintptr_t) d < bufsz && !found_nul) { if ((c = *(char *) dv) != '\0') { if (strchr (tpl_fmt_chars, c) == NULL) return ERR_FMT_INVALID; /* invalid char in format string */ if ((c = *(char *) dv) == '#') octothorpes++; dv = (void *) ((uintptr_t) dv + 1); } else found_nul = 1; } if (!found_nul) return ERR_FMT_MISSING_NUL; /* runaway format string */ dv = (void *) ((uintptr_t) dv + 1); /* advance to octothorpe lengths buffer */ /* compare the map format to the format of this tpl image */ mapfmt = tpl_fmt (r); rc = strcmp (mapfmt, fmt); if (rc != 0) return ERR_FMT_MISMATCH; /* compare octothorpe lengths in image to the mapped values */ if ((((uintptr_t) dv + (octothorpes * 4)) - (uintptr_t) d) > bufsz) return ERR_INCONSISTENT_SZ4; fxlens = tpl_fxlens (r, &num_fxlens); /* mapped fxlens */ while (num_fxlens--) { memcpy (&flen, dv, sizeof (uint32_t)); /* stored flen */ if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&flen, sizeof (uint32_t)); if (flen != *fxlens) return ERR_FLEN_MISMATCH; dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); fxlens++; } /* dv now points to beginning of data */ rc = tpl_serlen (r, r, dv, &serlen); /* get computed serlen of data part */ if (rc == -1) return ERR_INCONSISTENT_SZ2; /* internal inconsistency in tpl image */ serlen += ((uintptr_t) dv - (uintptr_t) d); /* add back serlen of preamble part */ if (excess_ok && (bufsz < serlen)) return ERR_INCONSISTENT_SZ3; if (!excess_ok && (serlen != bufsz)) return ERR_INCONSISTENT_SZ3; /* buffer/internal sz exceeds serlen */ return 0; } static void * tpl_find_data_start (void *d) { int octothorpes = 0; d = (void *) ((uintptr_t) d + 4); /* skip TPL_MAGIC and flags byte */ d = (void *) ((uintptr_t) d + 4); /* skip int32 overall len */ while (*(char *) d != '\0') { if (*(char *) d == '#') octothorpes++; d = (void *) ((uintptr_t) d + 1); } d = (void *) ((uintptr_t) d + 1); /* skip NUL */ d = (void *) ((uintptr_t) d + (octothorpes * sizeof (uint32_t))); /* skip # array lens */ return d; } static int tpl_needs_endian_swap (void *d) { char *c; int cpu_is_bigendian; c = (char *) d; cpu_is_bigendian = tpl_cpu_bigendian (); return ((c[3] & TPL_FL_BIGENDIAN) == cpu_is_bigendian) ? 0 : 1; } static size_t tpl_size_for (char c) { uint32_t i; for (i = 0; i < sizeof (tpl_types) / sizeof (tpl_types[0]); i++) { if (tpl_types[i].c == c) return tpl_types[i].sz; } return 0; } TPL_API char * tpl_peek (int mode, ...) { va_list ap; int xendian = 0, found_nul = 0, old_string_format = 0; char *filename = NULL, *datapeek_f = NULL, *datapeek_c, *datapeek_s; void *addr = NULL, *dv, *datapeek_p = NULL; size_t sz = 0, fmt_len, first_atom, num_fxlens = 0; uint32_t datapeek_ssz, datapeek_csz, datapeek_flen; tpl_mmap_rec mr = { 0, NULL, 0 }; char *fmt, *fmt_cpy = NULL, c; uint32_t intlsz, **fxlens = NULL, *num_fxlens_out = NULL, *fxlensv; va_start (ap, mode); if ((mode & TPL_FXLENS) && (mode & TPL_DATAPEEK)) { tpl_hook.oops ("TPL_FXLENS and TPL_DATAPEEK mutually exclusive\n"); goto fail; } if (mode & TPL_FILE) filename = va_arg (ap, char *); else if (mode & TPL_MEM) { addr = va_arg (ap, void *); sz = va_arg (ap, size_t); } else { tpl_hook.oops ("unsupported tpl_peek mode %d\n", mode); goto fail; } if (mode & TPL_DATAPEEK) { datapeek_f = va_arg (ap, char *); } if (mode & TPL_FXLENS) { num_fxlens_out = va_arg (ap, uint32_t *); fxlens = va_arg (ap, uint32_t **); *num_fxlens_out = 0; *fxlens = NULL; } if (mode & TPL_FILE) { if (tpl_mmap_file (filename, &mr) != 0) { tpl_hook.oops ("tpl_peek failed for file %s\n", filename); goto fail; } addr = mr.text; sz = mr.text_sz; } dv = addr; if (sz < (4 + sizeof (uint32_t) + 1)) goto fail; /* min sz */ if (memcmp (dv, TPL_MAGIC, 3) != 0) goto fail; /* missing tpl magic prefix */ if (tpl_needs_endian_swap (dv)) xendian = 1; if ((((char *) dv)[3] & TPL_FL_NULLSTRINGS) == 0) old_string_format = 1; dv = (void *) ((uintptr_t) dv + 4); memcpy (&intlsz, dv, sizeof (uint32_t)); /* extract internal size */ if (xendian) tpl_byteswap (&intlsz, sizeof (uint32_t)); if (intlsz != sz) goto fail; /* inconsistent buffer/internal size */ dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); /* dv points to the start of the format string. Look for nul w/in buf sz */ fmt = (char *) dv; while ((uintptr_t) dv - (uintptr_t) addr < sz && !found_nul) { if ((c = *(char *) dv) == '\0') { found_nul = 1; } else if (c == '#') { num_fxlens++; } dv = (void *) ((uintptr_t) dv + 1); } if (!found_nul) goto fail; /* runaway format string */ fmt_len = (char *) dv - fmt; /* include space for \0 */ fmt_cpy = tpl_hook.malloc (fmt_len); if (fmt_cpy == NULL) { fatal_oom (); } memcpy (fmt_cpy, fmt, fmt_len); /* retrieve the octothorpic lengths if requested */ if (num_fxlens > 0) { if (sz < ((uintptr_t) dv + (num_fxlens * sizeof (uint32_t)) - (uintptr_t) addr)) { goto fail; } } if ((mode & TPL_FXLENS) && (num_fxlens > 0)) { *fxlens = tpl_hook.malloc (num_fxlens * sizeof (uint32_t)); if (*fxlens == NULL) tpl_hook.fatal ("out of memory"); *num_fxlens_out = num_fxlens; fxlensv = *fxlens; while (num_fxlens--) { memcpy (fxlensv, dv, sizeof (uint32_t)); if (xendian) tpl_byteswap (fxlensv, sizeof (uint32_t)); dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); fxlensv++; } } /* if caller requested, peek into the specified data elements */ if (mode & TPL_DATAPEEK) { first_atom = strspn (fmt, "S()"); /* skip any leading S() */ datapeek_flen = strlen (datapeek_f); if (strspn (datapeek_f, tpl_datapeek_ok_chars) < datapeek_flen) { tpl_hook.oops ("invalid TPL_DATAPEEK format: %s\n", datapeek_f); tpl_hook.free (fmt_cpy); fmt_cpy = NULL; /* fail */ goto fail; } if (strncmp (&fmt[first_atom], datapeek_f, datapeek_flen) != 0) { tpl_hook.oops ("TPL_DATAPEEK format mismatches tpl image\n"); tpl_hook.free (fmt_cpy); fmt_cpy = NULL; /* fail */ goto fail; } /* advance to data start, then copy out requested elements */ dv = (void *) ((uintptr_t) dv + (num_fxlens * sizeof (uint32_t))); for (datapeek_c = datapeek_f; *datapeek_c != '\0'; datapeek_c++) { datapeek_p = va_arg (ap, void *); if (*datapeek_c == 's') { /* special handling for strings */ if ((uintptr_t) dv - (uintptr_t) addr + sizeof (uint32_t) > sz) { tpl_hook.oops ("tpl_peek: tpl has insufficient length\n"); tpl_hook.free (fmt_cpy); fmt_cpy = NULL; /* fail */ goto fail; } memcpy (&datapeek_ssz, dv, sizeof (uint32_t)); /* get slen */ if (xendian) tpl_byteswap (&datapeek_ssz, sizeof (uint32_t)); if (old_string_format) datapeek_ssz++; dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); /* adv. to str */ if (datapeek_ssz == 0) datapeek_s = NULL; else { if ((uintptr_t) dv - (uintptr_t) addr + datapeek_ssz - 1 > sz) { tpl_hook.oops ("tpl_peek: tpl has insufficient length\n"); tpl_hook.free (fmt_cpy); fmt_cpy = NULL; /* fail */ goto fail; } datapeek_s = tpl_hook.malloc (datapeek_ssz); if (datapeek_s == NULL) fatal_oom (); memcpy (datapeek_s, dv, datapeek_ssz - 1); datapeek_s[datapeek_ssz - 1] = '\0'; dv = (void *) ((uintptr_t) dv + datapeek_ssz - 1); } *(char **) datapeek_p = datapeek_s; } else { datapeek_csz = tpl_size_for (*datapeek_c); if ((uintptr_t) dv - (uintptr_t) addr + datapeek_csz > sz) { tpl_hook.oops ("tpl_peek: tpl has insufficient length\n"); tpl_hook.free (fmt_cpy); fmt_cpy = NULL; /* fail */ goto fail; } memcpy (datapeek_p, dv, datapeek_csz); if (xendian) tpl_byteswap (datapeek_p, datapeek_csz); dv = (void *) ((uintptr_t) dv + datapeek_csz); } } } fail: va_end (ap); if ((mode & TPL_FILE) && mr.text != NULL) tpl_unmap_file (&mr); return fmt_cpy; } /* tpl_jot(TPL_FILE, "file.tpl", "si", &s, &i); */ /* tpl_jot(TPL_MEM, &buf, &sz, "si", &s, &i); */ /* tpl_jot(TPL_FD, fd, "si", &s, &i); */ TPL_API int tpl_jot (int mode, ...) { va_list ap; char *filename, *fmt; size_t *sz; int fd, rc = 0; void **buf; tpl_node *tn; va_start (ap, mode); if (mode & TPL_FILE) { filename = va_arg (ap, char *); fmt = va_arg (ap, char *); tn = tpl_map_va (fmt, ap); if (tn == NULL) { rc = -1; goto fail; } tpl_pack (tn, 0); rc = tpl_dump (tn, TPL_FILE, filename); tpl_free (tn); } else if (mode & TPL_MEM) { buf = va_arg (ap, void *); sz = va_arg (ap, size_t *); fmt = va_arg (ap, char *); tn = tpl_map_va (fmt, ap); if (tn == NULL) { rc = -1; goto fail; } tpl_pack (tn, 0); rc = tpl_dump (tn, TPL_MEM, buf, sz); tpl_free (tn); } else if (mode & TPL_FD) { fd = va_arg (ap, int); fmt = va_arg (ap, char *); tn = tpl_map_va (fmt, ap); if (tn == NULL) { rc = -1; goto fail; } tpl_pack (tn, 0); rc = tpl_dump (tn, TPL_FD, fd); tpl_free (tn); } else { tpl_hook.fatal ("invalid tpl_jot mode\n"); } fail: va_end (ap); return rc; } TPL_API int tpl_load (tpl_node *r, int mode, ...) { va_list ap; int rc = 0, fd = 0; char *filename = NULL; void *addr; size_t sz; va_start (ap, mode); if (mode & TPL_FILE) filename = va_arg (ap, char *); else if (mode & TPL_MEM) { addr = va_arg (ap, void *); sz = va_arg (ap, size_t); } else if (mode & TPL_FD) { fd = va_arg (ap, int); } else { tpl_hook.oops ("unsupported tpl_load mode %d\n", mode); va_end (ap); return -1; } va_end (ap); if (r->type != TPL_TYPE_ROOT) { tpl_hook.oops ("error: tpl_load to non-root node\n"); return -1; } if (((tpl_root_data *) (r->data))->flags & (TPL_WRONLY | TPL_RDONLY)) { /* already packed or loaded, so reset it as if newly mapped */ tpl_free_keep_map (r); } if (mode & TPL_FILE) { if (tpl_mmap_file (filename, &((tpl_root_data *) (r->data))->mmap) != 0) { tpl_hook.oops ("tpl_load failed for file %s\n", filename); return -1; } if ((rc = tpl_sanity (r, (mode & TPL_EXCESS_OK))) != 0) { if (rc == ERR_FMT_MISMATCH) { tpl_hook.oops ("%s: format signature mismatch\n", filename); } else if (rc == ERR_FLEN_MISMATCH) { tpl_hook.oops ("%s: array lengths mismatch\n", filename); } else { tpl_hook.oops ("%s: not a valid tpl file\n", filename); } tpl_unmap_file (&((tpl_root_data *) (r->data))->mmap); return -1; } ((tpl_root_data *) (r->data))->flags = (TPL_FILE | TPL_RDONLY); } else if (mode & TPL_MEM) { ((tpl_root_data *) (r->data))->mmap.text = addr; ((tpl_root_data *) (r->data))->mmap.text_sz = sz; if ((rc = tpl_sanity (r, (mode & TPL_EXCESS_OK))) != 0) { if (rc == ERR_FMT_MISMATCH) { tpl_hook.oops ("format signature mismatch\n"); } else { tpl_hook.oops ("not a valid tpl file\n"); } return -1; } ((tpl_root_data *) (r->data))->flags = (TPL_MEM | TPL_RDONLY); if (mode & TPL_UFREE) ((tpl_root_data *) (r->data))->flags |= TPL_UFREE; } else if (mode & TPL_FD) { /* if fd read succeeds, resulting mem img is used for load */ if (tpl_gather (TPL_GATHER_BLOCKING, fd, &addr, &sz) > 0) { return tpl_load (r, TPL_MEM | TPL_UFREE, addr, sz); } else return -1; } else { tpl_hook.oops ("invalid tpl_load mode %d\n", mode); return -1; } /* this applies to TPL_MEM or TPL_FILE */ if (tpl_needs_endian_swap (((tpl_root_data *) (r->data))->mmap.text)) ((tpl_root_data *) (r->data))->flags |= TPL_XENDIAN; tpl_unpackA0 (r); /* prepare root A nodes for use */ return 0; } TPL_API int tpl_Alen (tpl_node *r, int i) { tpl_node *n; n = tpl_find_i (r, i); if (n == NULL) { tpl_hook.oops ("invalid index %d to tpl_unpack\n", i); return -1; } if (n->type != TPL_TYPE_ARY) return -1; return ((tpl_atyp *) (n->data))->num; } static void tpl_free_atyp (tpl_node *n, tpl_atyp *atyp) { tpl_backbone *bb, *bbnxt; tpl_node *c; void *dv; tpl_bin *binp; tpl_atyp *atypp; char *strp; size_t itermax; tpl_pound_data *pd; int i; bb = atyp->bb; while (bb) { bbnxt = bb->next; dv = bb->data; c = n->children; while (c) { switch (c->type) { case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: dv = (void *) ((uintptr_t) dv + tpl_types[c->type].sz * c->num); break; case TPL_TYPE_BIN: memcpy (&binp, dv, sizeof (tpl_bin *)); /* cp to aligned */ if (binp->addr) tpl_hook.free (binp->addr); /* free buf */ tpl_hook.free (binp); /* free tpl_bin */ dv = (void *) ((uintptr_t) dv + sizeof (tpl_bin *)); break; case TPL_TYPE_STR: for (i = 0; i < c->num; i++) { memcpy (&strp, dv, sizeof (char *)); /* cp to aligned */ if (strp) tpl_hook.free (strp); /* free string */ dv = (void *) ((uintptr_t) dv + sizeof (char *)); } break; case TPL_TYPE_POUND: /* iterate over the preceding nodes */ itermax = c->num; pd = (tpl_pound_data *) c->data; if (++(pd->iternum) < itermax) { c = pd->iter_start_node; continue; } else { /* loop complete. */ pd->iternum = 0; } break; case TPL_TYPE_ARY: memcpy (&atypp, dv, sizeof (tpl_atyp *)); /* cp to aligned */ tpl_free_atyp (c, atypp); /* free atyp */ dv = (void *) ((uintptr_t) dv + sizeof (void *)); break; default: tpl_hook.fatal ("unsupported format character\n"); break; } c = c->next; } tpl_hook.free (bb); bb = bbnxt; } tpl_hook.free (atyp); } /* determine (by walking) byte length of serialized r/A node at address dv * returns 0 on success, or -1 if the tpl isn't trustworthy (fails consistency) */ static int tpl_serlen (tpl_node *r, tpl_node *n, void *dv, size_t *serlen) { uint32_t slen; int num = 0, fidx; tpl_node *c; size_t len = 0, alen, buf_past, itermax; tpl_pound_data *pd; buf_past = ((uintptr_t) ((tpl_root_data *) (r->data))->mmap.text + ((tpl_root_data *) (r->data))->mmap.text_sz); if (n->type == TPL_TYPE_ROOT) num = 1; else if (n->type == TPL_TYPE_ARY) { if ((uintptr_t) dv + sizeof (uint32_t) > buf_past) return -1; memcpy (&num, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&num, sizeof (uint32_t)); dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); len += sizeof (uint32_t); } else tpl_hook.fatal ("internal error in tpl_serlen\n"); while (num-- > 0) { c = n->children; while (c) { switch (c->type) { case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: for (fidx = 0; fidx < c->num; fidx++) { /* octothorpe support */ if ((uintptr_t) dv + tpl_types[c->type].sz > buf_past) return -1; dv = (void *) ((uintptr_t) dv + tpl_types[c->type].sz); len += tpl_types[c->type].sz; } break; case TPL_TYPE_BIN: len += sizeof (uint32_t); if ((uintptr_t) dv + sizeof (uint32_t) > buf_past) return -1; memcpy (&slen, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&slen, sizeof (uint32_t)); len += slen; dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); if ((uintptr_t) dv + slen > buf_past) return -1; dv = (void *) ((uintptr_t) dv + slen); break; case TPL_TYPE_STR: for (fidx = 0; fidx < c->num; fidx++) { /* octothorpe support */ len += sizeof (uint32_t); if ((uintptr_t) dv + sizeof (uint32_t) > buf_past) return -1; memcpy (&slen, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&slen, sizeof (uint32_t)); if (!(((tpl_root_data *) (r->data))->flags & TPL_OLD_STRING_FMT)) slen = (slen > 1) ? (slen - 1) : 0; len += slen; dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); if ((uintptr_t) dv + slen > buf_past) return -1; dv = (void *) ((uintptr_t) dv + slen); } break; case TPL_TYPE_ARY: if (tpl_serlen (r, c, dv, &alen) == -1) return -1; dv = (void *) ((uintptr_t) dv + alen); len += alen; break; case TPL_TYPE_POUND: /* iterate over the preceding nodes */ itermax = c->num; pd = (tpl_pound_data *) c->data; if (++(pd->iternum) < itermax) { c = pd->iter_start_node; continue; } else { /* loop complete. */ pd->iternum = 0; } break; default: tpl_hook.fatal ("unsupported format character\n"); break; } c = c->next; } } *serlen = len; return 0; } static int tpl_mmap_output_file (char *filename, size_t sz, void **text_out) { void *text; int fd, perms; #ifndef _WIN32 perms = S_IRUSR | S_IWUSR | S_IWGRP | S_IRGRP | S_IROTH; /* ug+w o+r */ fd = open (filename, O_CREAT | O_TRUNC | O_RDWR, perms); #else perms = _S_IWRITE; fd = _open (filename, _O_CREAT | _O_TRUNC | _O_RDWR, perms); #endif if (fd == -1) { tpl_hook.oops ("Couldn't open file %s: %s\n", filename, strerror (errno)); return -1; } text = mmap (0, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (text == MAP_FAILED) { tpl_hook.oops ("Failed to mmap %s: %s\n", filename, strerror (errno)); close (fd); return -1; } if (ftruncate (fd, sz) == -1) { tpl_hook.oops ("ftruncate failed: %s\n", strerror (errno)); munmap (text, sz); close (fd); return -1; } *text_out = text; return fd; } static int tpl_mmap_file (char *filename, tpl_mmap_rec *mr) { struct stat stat_buf; if ((mr->fd = open (filename, O_RDONLY)) == -1) { tpl_hook.oops ("Couldn't open file %s: %s\n", filename, strerror (errno)); return -1; } if (fstat (mr->fd, &stat_buf) == -1) { close (mr->fd); tpl_hook.oops ("Couldn't stat file %s: %s\n", filename, strerror (errno)); return -1; } mr->text_sz = (size_t) stat_buf.st_size; mr->text = mmap (0, stat_buf.st_size, PROT_READ, MAP_PRIVATE, mr->fd, 0); if (mr->text == MAP_FAILED) { close (mr->fd); tpl_hook.oops ("Failed to mmap %s: %s\n", filename, strerror (errno)); return -1; } return 0; } TPL_API int tpl_pack (tpl_node *r, int i) { tpl_node *n, *child, *np; void *datav = NULL; size_t sz, itermax; uint32_t slen; char *str; tpl_bin *bin; tpl_pound_data *pd; int fidx; n = tpl_find_i (r, i); if (n == NULL) { tpl_hook.oops ("invalid index %d to tpl_pack\n", i); return -1; } if (((tpl_root_data *) (r->data))->flags & TPL_RDONLY) { /* convert to an writeable tpl, initially empty */ tpl_free_keep_map (r); } ((tpl_root_data *) (r->data))->flags |= TPL_WRONLY; if (n->type == TPL_TYPE_ARY) datav = tpl_extend_backbone (n); child = n->children; while (child) { switch (child->type) { case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: /* no need to use fidx iteration here; we can copy multiple values in one memcpy */ memcpy (child->data, child->addr, tpl_types[child->type].sz * child->num); if (datav) datav = tpl_cpv (datav, child->data, tpl_types[child->type].sz * child->num); if (n->type == TPL_TYPE_ARY) n->ser_osz += tpl_types[child->type].sz * child->num; break; case TPL_TYPE_BIN: /* copy the buffer to be packed */ slen = ((tpl_bin *) child->addr)->sz; if (slen > 0) { str = tpl_hook.malloc (slen); if (!str) fatal_oom (); memcpy (str, ((tpl_bin *) child->addr)->addr, slen); } else str = NULL; /* and make a tpl_bin to point to it */ bin = tpl_hook.malloc (sizeof (tpl_bin)); if (!bin) fatal_oom (); bin->addr = str; bin->sz = slen; /* now pack its pointer, first deep freeing any pre-existing bin */ if (*(tpl_bin **) (child->data) != NULL) { if ((*(tpl_bin **) (child->data))->sz != 0) { tpl_hook.free ((*(tpl_bin **) (child->data))->addr); } tpl_hook.free (*(tpl_bin **) (child->data)); } memcpy (child->data, &bin, sizeof (tpl_bin *)); if (datav) { datav = tpl_cpv (datav, &bin, sizeof (tpl_bin *)); *(tpl_bin **) (child->data) = NULL; } if (n->type == TPL_TYPE_ARY) { n->ser_osz += sizeof (uint32_t); /* binary buf len word */ n->ser_osz += bin->sz; /* binary buf */ } break; case TPL_TYPE_STR: for (fidx = 0; fidx < child->num; fidx++) { /* copy the string to be packed. slen includes \0. this block also works if the string pointer is NULL. */ char *caddr = ((char **) child->addr)[fidx]; char **cdata = &((char **) child->data)[fidx]; slen = caddr ? (strlen (caddr) + 1) : 0; if (slen) { str = tpl_hook.malloc (slen); if (!str) fatal_oom (); memcpy (str, caddr, slen); /* include \0 */ } else { str = NULL; } /* now pack its pointer, first freeing any pre-existing string */ if (*cdata != NULL) { tpl_hook.free (*cdata); } memcpy (cdata, &str, sizeof (char *)); if (datav) { datav = tpl_cpv (datav, &str, sizeof (char *)); *cdata = NULL; } if (n->type == TPL_TYPE_ARY) { n->ser_osz += sizeof (uint32_t); /* string len word */ if (slen > 1) n->ser_osz += slen - 1; /* string (without nul) */ } } break; case TPL_TYPE_ARY: /* copy the child's tpl_atype* and reset it to empty */ if (datav) { sz = ((tpl_atyp *) (child->data))->sz; datav = tpl_cpv (datav, &child->data, sizeof (void *)); child->data = tpl_hook.malloc (sizeof (tpl_atyp)); if (!child->data) fatal_oom (); ((tpl_atyp *) (child->data))->num = 0; ((tpl_atyp *) (child->data))->sz = sz; ((tpl_atyp *) (child->data))->bb = NULL; ((tpl_atyp *) (child->data))->bbtail = NULL; } /* parent is array? then bubble up child array's ser_osz */ if (n->type == TPL_TYPE_ARY) { n->ser_osz += sizeof (uint32_t); /* array len word */ n->ser_osz += child->ser_osz; /* child array ser_osz */ child->ser_osz = 0; /* reset child array ser_osz */ } break; case TPL_TYPE_POUND: /* we need to iterate n times over preceding nodes in S(...). * we may be in the midst of an iteration each time or starting. */ pd = (tpl_pound_data *) child->data; itermax = child->num; /* itermax is total num of iterations needed */ /* pd->iternum is current iteration index */ /* pd->inter_elt_len is element-to-element len of contiguous structs */ /* pd->iter_start_node is where we jump to at each iteration. */ if (++(pd->iternum) < itermax) { /* in start or midst of loop. advance addr/data pointers. */ for (np = pd->iter_start_node; np != child; np = np->next) { np->data = (char *) (np->data) + (tpl_types[np->type].sz * np->num); np->addr = (char *) (np->addr) + pd->inter_elt_len; } /* do next iteration */ child = pd->iter_start_node; continue; } else { /* loop complete. */ /* reset iteration index and addr/data pointers. */ pd->iternum = 0; for (np = pd->iter_start_node; np != child; np = np->next) { np->data = (char *) (np->data) - ((itermax - 1) * tpl_types[np->type].sz * np->num); np->addr = (char *) (np->addr) - ((itermax - 1) * pd->inter_elt_len); } } break; default: tpl_hook.fatal ("unsupported format character\n"); break; } child = child->next; } return 0; } TPL_API int tpl_unpack (tpl_node *r, int i) { tpl_node *n, *c, *np; uint32_t slen; int rc = 1, fidx; char *str; void *dv = NULL, *caddr; size_t A_bytes, itermax; tpl_pound_data *pd; void *img; size_t sz; /* handle unusual case of tpl_pack,tpl_unpack without an * intervening tpl_dump. do a dump/load implicitly. */ if (((tpl_root_data *) (r->data))->flags & TPL_WRONLY) { if (tpl_dump (r, TPL_MEM, &img, &sz) != 0) return -1; if (tpl_load (r, TPL_MEM | TPL_UFREE, img, sz) != 0) { tpl_hook.free (img); return -1; }; } n = tpl_find_i (r, i); if (n == NULL) { tpl_hook.oops ("invalid index %d to tpl_unpack\n", i); return -1; } /* either root node or an A node */ if (n->type == TPL_TYPE_ROOT) { dv = tpl_find_data_start (((tpl_root_data *) (n->data))->mmap.text); } else if (n->type == TPL_TYPE_ARY) { if (((tpl_atyp *) (n->data))->num <= 0) return 0; /* array consumed */ else rc = ((tpl_atyp *) (n->data))->num--; dv = ((tpl_atyp *) (n->data))->cur; if (!dv) tpl_hook.fatal ("must unpack parent of node before node itself\n"); } c = n->children; while (c) { switch (c->type) { case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: /* unpack elements of cross-endian octothorpic array individually */ if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) { for (fidx = 0; fidx < c->num; fidx++) { caddr = (void *) ((uintptr_t) c->addr + (fidx * tpl_types[c->type].sz)); memcpy (caddr, dv, tpl_types[c->type].sz); tpl_byteswap (caddr, tpl_types[c->type].sz); dv = (void *) ((uintptr_t) dv + tpl_types[c->type].sz); } } else { /* bulk unpack ok if not cross-endian */ memcpy (c->addr, dv, tpl_types[c->type].sz * c->num); dv = (void *) ((uintptr_t) dv + tpl_types[c->type].sz * c->num); } break; case TPL_TYPE_BIN: memcpy (&slen, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&slen, sizeof (uint32_t)); if (slen > 0) { str = (char *) tpl_hook.malloc (slen); if (!str) fatal_oom (); } else str = NULL; dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); if (slen > 0) memcpy (str, dv, slen); memcpy (&(((tpl_bin *) c->addr)->addr), &str, sizeof (void *)); memcpy (&(((tpl_bin *) c->addr)->sz), &slen, sizeof (uint32_t)); dv = (void *) ((uintptr_t) dv + slen); break; case TPL_TYPE_STR: for (fidx = 0; fidx < c->num; fidx++) { memcpy (&slen, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&slen, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_OLD_STRING_FMT) slen += 1; dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); if (slen) { /* slen includes \0 */ str = (char *) tpl_hook.malloc (slen); if (!str) fatal_oom (); if (slen > 1) memcpy (str, dv, slen - 1); str[slen - 1] = '\0'; /* nul terminate */ dv = (void *) ((uintptr_t) dv + slen - 1); } else str = NULL; memcpy (&((char **) c->addr)[fidx], &str, sizeof (char *)); } break; case TPL_TYPE_POUND: /* iterate over preceding nodes */ pd = (tpl_pound_data *) c->data; itermax = c->num; if (++(pd->iternum) < itermax) { /* in start or midst of loop. advance addr/data pointers. */ for (np = pd->iter_start_node; np != c; np = np->next) { np->addr = (char *) (np->addr) + pd->inter_elt_len; } /* do next iteration */ c = pd->iter_start_node; continue; } else { /* loop complete. */ /* reset iteration index and addr/data pointers. */ pd->iternum = 0; for (np = pd->iter_start_node; np != c; np = np->next) { np->addr = (char *) (np->addr) - ((itermax - 1) * pd->inter_elt_len); } } break; case TPL_TYPE_ARY: if (tpl_serlen (r, c, dv, &A_bytes) == -1) tpl_hook.fatal ("internal error in unpack\n"); memcpy (&((tpl_atyp *) (c->data))->num, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&((tpl_atyp *) (c->data))->num, sizeof (uint32_t)); ((tpl_atyp *) (c->data))->cur = (void *) ((uintptr_t) dv + sizeof (uint32_t)); dv = (void *) ((uintptr_t) dv + A_bytes); break; default: tpl_hook.fatal ("unsupported format character\n"); break; } c = c->next; } if (n->type == TPL_TYPE_ARY) ((tpl_atyp *) (n->data))->cur = dv; /* next element */ return rc; } /* Specialized function that unpacks only the root's A nodes, after tpl_load */ static int tpl_unpackA0 (tpl_node *r) { tpl_node *n, *c; uint32_t slen; int rc = 1, fidx, i; void *dv; size_t A_bytes, itermax; tpl_pound_data *pd; n = r; dv = tpl_find_data_start (((tpl_root_data *) (r->data))->mmap.text); c = n->children; while (c) { switch (c->type) { case TPL_TYPE_BYTE: case TPL_TYPE_DOUBLE: case TPL_TYPE_INT32: case TPL_TYPE_UINT32: case TPL_TYPE_INT64: case TPL_TYPE_UINT64: case TPL_TYPE_INT16: case TPL_TYPE_UINT16: for (fidx = 0; fidx < c->num; fidx++) { dv = (void *) ((uintptr_t) dv + tpl_types[c->type].sz); } break; case TPL_TYPE_BIN: memcpy (&slen, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&slen, sizeof (uint32_t)); dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); dv = (void *) ((uintptr_t) dv + slen); break; case TPL_TYPE_STR: for (i = 0; i < c->num; i++) { memcpy (&slen, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&slen, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_OLD_STRING_FMT) slen += 1; dv = (void *) ((uintptr_t) dv + sizeof (uint32_t)); if (slen > 1) dv = (void *) ((uintptr_t) dv + slen - 1); } break; case TPL_TYPE_POUND: /* iterate over the preceding nodes */ itermax = c->num; pd = (tpl_pound_data *) c->data; if (++(pd->iternum) < itermax) { c = pd->iter_start_node; continue; } else { /* loop complete. */ pd->iternum = 0; } break; case TPL_TYPE_ARY: if (tpl_serlen (r, c, dv, &A_bytes) == -1) tpl_hook.fatal ("internal error in unpackA0\n"); memcpy (&((tpl_atyp *) (c->data))->num, dv, sizeof (uint32_t)); if (((tpl_root_data *) (r->data))->flags & TPL_XENDIAN) tpl_byteswap (&((tpl_atyp *) (c->data))->num, sizeof (uint32_t)); ((tpl_atyp *) (c->data))->cur = (void *) ((uintptr_t) dv + sizeof (uint32_t)); dv = (void *) ((uintptr_t) dv + A_bytes); break; default: tpl_hook.fatal ("unsupported format character\n"); break; } c = c->next; } return rc; } /* In-place byte order swapping of a word of length "len" bytes */ static void tpl_byteswap (void *word, int len) { int i; char c, *w; w = (char *) word; for (i = 0; i < len / 2; i++) { c = w[i]; w[i] = w[len - 1 - i]; w[len - 1 - i] = c; } } static void tpl_fatal (const char *fmt, ...) { va_list ap; char exit_msg[100]; va_start (ap, fmt); vsnprintf (exit_msg, 100, fmt, ap); va_end (ap); tpl_hook.oops ("%s", exit_msg); exit (-1); } TPL_API int tpl_gather (int mode, ...) { va_list ap; int fd, rc = 0; size_t *szp, sz; void **img, *addr, *data; tpl_gather_t **gs; tpl_gather_cb *cb; va_start (ap, mode); switch (mode) { case TPL_GATHER_BLOCKING: fd = va_arg (ap, int); img = va_arg (ap, void *); szp = va_arg (ap, size_t *); rc = tpl_gather_blocking (fd, img, szp); break; case TPL_GATHER_NONBLOCKING: fd = va_arg (ap, int); gs = (tpl_gather_t **) va_arg (ap, void *); cb = (tpl_gather_cb *) va_arg (ap, tpl_gather_cb *); data = va_arg (ap, void *); rc = tpl_gather_nonblocking (fd, gs, cb, data); break; case TPL_GATHER_MEM: addr = va_arg (ap, void *); sz = va_arg (ap, size_t); gs = (tpl_gather_t **) va_arg (ap, void *); cb = (tpl_gather_cb *) va_arg (ap, tpl_gather_cb *); data = va_arg (ap, void *); rc = tpl_gather_mem (addr, sz, gs, cb, data); break; default: tpl_hook.fatal ("unsupported tpl_gather mode %d\n", mode); break; } va_end (ap); return rc; } /* dequeue a tpl by reading until one full tpl image is obtained. * We take care not to read past the end of the tpl. * This is intended as a blocking call i.e. for use with a blocking fd. * It can be given a non-blocking fd, but the read spins if we have to wait. */ static int tpl_gather_blocking (int fd, void **img, size_t *sz) { char preamble[8]; int rc; uint32_t i = 0, tpllen; do { rc = read (fd, &preamble[i], 8 - i); i += (rc > 0) ? rc : 0; } while ((rc == -1 && (errno == EINTR || errno == EAGAIN)) || (rc > 0 && i < 8)); if (rc < 0) { tpl_hook.oops ("tpl_gather_fd_blocking failed: %s\n", strerror (errno)); return -1; } else if (rc == 0) { /* tpl_hook.oops("tpl_gather_fd_blocking: eof\n"); */ return 0; } else if (i != 8) { tpl_hook.oops ("internal error\n"); return -1; } if (preamble[0] == 't' && preamble[1] == 'p' && preamble[2] == 'l') { memcpy (&tpllen, &preamble[4], 4); if (tpl_needs_endian_swap (preamble)) tpl_byteswap (&tpllen, 4); } else { tpl_hook.oops ("tpl_gather_fd_blocking: non-tpl input\n"); return -1; } /* malloc space for remainder of tpl image (overall length tpllen) * and read it in */ if (tpl_hook.gather_max > 0 && tpllen > tpl_hook.gather_max) { tpl_hook.oops ("tpl exceeds max length %zu\n", tpl_hook.gather_max); return -2; } *sz = tpllen; if ((*img = tpl_hook.malloc (tpllen)) == NULL) { fatal_oom (); } memcpy (*img, preamble, 8); /* copy preamble to output buffer */ i = 8; do { rc = read (fd, &((*(char **) img)[i]), tpllen - i); i += (rc > 0) ? rc : 0; } while ((rc == -1 && (errno == EINTR || errno == EAGAIN)) || (rc > 0 && i < tpllen)); if (rc < 0) { tpl_hook.oops ("tpl_gather_fd_blocking failed: %s\n", strerror (errno)); tpl_hook.free (*img); return -1; } else if (rc == 0) { /* tpl_hook.oops("tpl_gather_fd_blocking: eof\n"); */ tpl_hook.free (*img); return 0; } else if (i != tpllen) { tpl_hook.oops ("internal error\n"); tpl_hook.free (*img); return -1; } return 1; } /* Used by select()-driven apps which want to gather tpl images piecemeal */ /* the file descriptor must be non-blocking for this function to work. */ static int tpl_gather_nonblocking (int fd, tpl_gather_t **gs, tpl_gather_cb *cb, void *data) { char buf[TPL_GATHER_BUFLEN], *img, *tpl; int rc, keep_looping, cbrc = 0; size_t catlen; uint32_t tpllen; while (1) { rc = read (fd, buf, TPL_GATHER_BUFLEN); if (rc == -1) { if (errno == EINTR) continue; /* got signal during read, ignore */ if (errno == EAGAIN) return 1; /* nothing to read right now */ else { tpl_hook.oops ("tpl_gather failed: %s\n", strerror (errno)); if (*gs) { tpl_hook.free ((*gs)->img); tpl_hook.free (*gs); *gs = NULL; } return -1; /* error, caller should close fd */ } } else if (rc == 0) { if (*gs) { tpl_hook.oops ("tpl_gather: partial tpl image precedes EOF\n"); tpl_hook.free ((*gs)->img); tpl_hook.free (*gs); *gs = NULL; } return 0; /* EOF, caller should close fd */ } else { /* concatenate any partial tpl from last read with new buffer */ if (*gs) { catlen = (*gs)->len + rc; if (tpl_hook.gather_max > 0 && catlen > tpl_hook.gather_max) { tpl_hook.free ((*gs)->img); tpl_hook.free ((*gs)); *gs = NULL; tpl_hook.oops ("tpl exceeds max length %zu\n", tpl_hook.gather_max); return -2; /* error, caller should close fd */ } if ((img = tpl_hook.realloc ((*gs)->img, catlen)) == NULL) { fatal_oom (); } memcpy (img + (*gs)->len, buf, rc); tpl_hook.free (*gs); *gs = NULL; } else { img = buf; catlen = rc; } /* isolate any full tpl(s) in img and invoke cb for each */ tpl = img; keep_looping = (tpl + 8 < img + catlen) ? 1 : 0; while (keep_looping) { if (strncmp ("tpl", tpl, 3) != 0) { tpl_hook.oops ("tpl prefix invalid\n"); if (img != buf) tpl_hook.free (img); tpl_hook.free (*gs); *gs = NULL; return -3; /* error, caller should close fd */ } memcpy (&tpllen, &tpl[4], 4); if (tpl_needs_endian_swap (tpl)) tpl_byteswap (&tpllen, 4); if (tpl + tpllen <= img + catlen) { cbrc = (cb) (tpl, tpllen, data); /* invoke cb for tpl image */ tpl += tpllen; /* point to next tpl image */ if (cbrc < 0) keep_looping = 0; else keep_looping = (tpl + 8 < img + catlen) ? 1 : 0; } else keep_looping = 0; } /* check if app callback requested closure of tpl source */ if (cbrc < 0) { tpl_hook.oops ("tpl_fd_gather aborted by app callback\n"); if (img != buf) tpl_hook.free (img); if (*gs) tpl_hook.free (*gs); *gs = NULL; return -4; } /* store any leftover, partial tpl fragment for next read */ if (tpl == img && img != buf) { /* consumed nothing from img!=buf */ if ((*gs = tpl_hook.malloc (sizeof (tpl_gather_t))) == NULL) { fatal_oom (); } (*gs)->img = tpl; (*gs)->len = catlen; } else if (tpl < img + catlen) { /* consumed 1+ tpl(s) from img!=buf or 0 from img==buf */ if ((*gs = tpl_hook.malloc (sizeof (tpl_gather_t))) == NULL) { fatal_oom (); } if (((*gs)->img = tpl_hook.malloc (img + catlen - tpl)) == NULL) { fatal_oom (); } (*gs)->len = img + catlen - tpl; memcpy ((*gs)->img, tpl, img + catlen - tpl); /* free partially consumed concat buffer if used */ if (img != buf) tpl_hook.free (img); } else { /* tpl(s) fully consumed */ /* free consumed concat buffer if used */ if (img != buf) tpl_hook.free (img); } } } } /* gather tpl piecemeal from memory buffer (not fd) e.g., from a lower-level api */ static int tpl_gather_mem (char *buf, size_t len, tpl_gather_t **gs, tpl_gather_cb *cb, void *data) { char *img, *tpl; int keep_looping, cbrc = 0; size_t catlen; uint32_t tpllen; /* concatenate any partial tpl from last read with new buffer */ if (*gs) { catlen = (*gs)->len + len; if (tpl_hook.gather_max > 0 && catlen > tpl_hook.gather_max) { tpl_hook.free ((*gs)->img); tpl_hook.free ((*gs)); *gs = NULL; tpl_hook.oops ("tpl exceeds max length %zu\n", tpl_hook.gather_max); return -2; /* error, caller should stop accepting input from source */ } if ((img = tpl_hook.realloc ((*gs)->img, catlen)) == NULL) { fatal_oom (); } memcpy (img + (*gs)->len, buf, len); tpl_hook.free (*gs); *gs = NULL; } else { img = buf; catlen = len; } /* isolate any full tpl(s) in img and invoke cb for each */ tpl = img; keep_looping = (tpl + 8 < img + catlen) ? 1 : 0; while (keep_looping) { if (strncmp ("tpl", tpl, 3) != 0) { tpl_hook.oops ("tpl prefix invalid\n"); if (img != buf) tpl_hook.free (img); tpl_hook.free (*gs); *gs = NULL; return -3; /* error, caller should stop accepting input from source */ } memcpy (&tpllen, &tpl[4], 4); if (tpl_needs_endian_swap (tpl)) tpl_byteswap (&tpllen, 4); if (tpl + tpllen <= img + catlen) { cbrc = (cb) (tpl, tpllen, data); /* invoke cb for tpl image */ tpl += tpllen; /* point to next tpl image */ if (cbrc < 0) keep_looping = 0; else keep_looping = (tpl + 8 < img + catlen) ? 1 : 0; } else keep_looping = 0; } /* check if app callback requested closure of tpl source */ if (cbrc < 0) { tpl_hook.oops ("tpl_mem_gather aborted by app callback\n"); if (img != buf) tpl_hook.free (img); if (*gs) tpl_hook.free (*gs); *gs = NULL; return -4; } /* store any leftover, partial tpl fragment for next read */ if (tpl == img && img != buf) { /* consumed nothing from img!=buf */ if ((*gs = tpl_hook.malloc (sizeof (tpl_gather_t))) == NULL) { fatal_oom (); } (*gs)->img = tpl; (*gs)->len = catlen; } else if (tpl < img + catlen) { /* consumed 1+ tpl(s) from img!=buf or 0 from img==buf */ if ((*gs = tpl_hook.malloc (sizeof (tpl_gather_t))) == NULL) { fatal_oom (); } if (((*gs)->img = tpl_hook.malloc (img + catlen - tpl)) == NULL) { fatal_oom (); } (*gs)->len = img + catlen - tpl; memcpy ((*gs)->img, tpl, img + catlen - tpl); /* free partially consumed concat buffer if used */ if (img != buf) tpl_hook.free (img); } else { /* tpl(s) fully consumed */ /* free consumed concat buffer if used */ if (img != buf) tpl_hook.free (img); } return 1; } ������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/settings.c�����������������������������������������������������������������������0000644�0001750�0001730�00000065546�14624731651�011616� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * settings.c -- goaccess configuration * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include "settings.h" #include "error.h" #include "gkhash.h" #include "labels.h" #include "pdjson.h" #include "util.h" #include "xmalloc.h" static char **nargv; static int nargc = 0; /* *INDENT-OFF* */ static const GEnum LOGTYPE[] = { {"COMBINED" , COMBINED} , {"VCOMBINED" , VCOMBINED} , {"COMMON" , COMMON} , {"VCOMMON" , VCOMMON} , {"W3C" , W3C} , {"CLOUDFRONT" , CLOUDFRONT} , {"CLOUDSTORAGE" , CLOUDSTORAGE} , {"AWSELB" , AWSELB} , {"SQUID" , SQUID} , {"AWSS3" , AWSS3} , {"CADDY" , CADDY} , {"AWSALB" , AWSALB} , {"TRAEFIKCLF" , TRAEFIKCLF} , }; static const GPreConfLog logs = { "%h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\"", /* NCSA */ "%v:%^ %h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\"", /* NCSA + VHost */ "%h %^[%d:%t %^] \"%r\" %s %b", /* CLF */ "%v:%^ %h %^[%d:%t %^] \"%r\" %s %b", /* CLF+VHost */ "%d %t %^ %m %U %q %^ %^ %h %u %R %s %^ %^ %L", /* W3C */ "%d\\t%t\\t%^\\t%b\\t%h\\t%m\\t%v\\t%U\\t%s\\t%R\\t%u\\t%q\\t%^\\t%C\\t%^\\t%^\\t%^\\t%^\\t%T\\t%^\\t%K\\t%k\\t%^\\t%H\\t%^", /* CloudFront */ "\"%x\",\"%h\",%^,%^,\"%m\",\"%U\",\"%s\",%^,\"%b\",\"%D\",%^,\"%R\",\"%u\"", /* Cloud Storage */ "%^ %dT%t.%^ %^ %h:%^ %^ %^ %T %^ %s %^ %^ %b \"%r\" \"%u\" %k %K %^ \"%^\" \"%v\"", /* AWS Elastic Load Balancing */ "%^ %^ %^ %v %^: %x.%^ %~%L %h %^/%s %b %m %U", /* Squid Native */ "%^ %v [%d:%t %^] %h %^\"%r\" %s %^ %b %^ %L %^ \"%R\" \"%u\"", /* Amazon S3 */ /* Caddy JSON */ "{ \"ts\": \"%x.%^\", \"request\": { \"client_ip\": \"%h\", \"proto\":" "\"%H\", \"method\": \"%m\", \"host\": \"%v\", \"uri\": \"%U\", \"headers\": {" "\"User-Agent\": [\"%u\"], \"Referer\": [\"%R\"] }, \"tls\": { \"cipher_suite\":" "\"%k\", \"proto\": \"%K\" } }, \"duration\": \"%T\", \"size\": \"%b\"," "\"status\": \"%s\", \"resp_headers\": { \"Content-Type\": [\"%M\"] } }", "%^ %dT%t.%^ %v %h:%^ %^ %^ %T %^ %s %^ %^ %b \"%r\" \"%u\" %k %K %^", /* Amazon ALB */ "%h - %e [%d:%t %^] \"%r\" %s %b \"%R\" \"%u\" %^ \"%v\" \"%U\" %Lms" /* Traefik's CLF flavor with header */ }; static const GPreConfTime times = { "%H:%M:%S", "%f", /* Cloud Storage (usec) */ "%s", /* Squid (sec) */ }; static const GPreConfDate dates = { "%d/%b/%Y", /* Apache */ "%Y-%m-%d", /* W3C */ "%f", /* Cloud Storage (usec) */ "%s", /* Squid (sec) */ }; /* *INDENT-ON* */ /* Ignore the following options */ static const char *const ignore_cmd_opts[] = { "help", "storage", "version", }; /* Determine if the given command line option needs to be ignored. * * If needs to be ignored, 1 is returned. * If not within the list of ignored command line options, 0 is returned. */ static int in_ignore_cmd_opts (const char *val) { size_t i; for (i = 0; i < ARRAY_SIZE (ignore_cmd_opts); i++) { if (strstr (val, ignore_cmd_opts[i]) != NULL) return 1; } return 0; } /* Get the location of the configuration file. * * By default, it attempts to read it from the user supplied path, else it will * try to open the global config file path (sysconfdir) or from the HOME * environment variable (~/.goaccessrc). * * On success, the path to the configuration file is returned. */ char * get_config_file_path (void) { char *upath = NULL, *gpath = NULL, *rpath = NULL; /* determine which config file to open, default or custom */ if (conf.iconfigfile != NULL) { rpath = realpath (conf.iconfigfile, NULL); if (rpath == NULL) FATAL ("Unable to open the specified config file. %s", strerror (errno)); return rpath; } /* first attempt to use the user's config file, e.g., ~/.goaccessrc */ upath = get_user_config (); /* failure, e.g. if the file does not exist */ if ((rpath = realpath (upath, NULL)) != NULL) { free (upath); return rpath; } LOG_DEBUG (("Unable to find user's config file %s %s", upath, strerror (errno))); free (upath); /* otherwise, fallback to global config file, e.g.,%sysconfdir%/goaccess.conf */ gpath = get_global_config (); if ((rpath = realpath (gpath, NULL)) != NULL && conf.load_global_config) { free (gpath); return rpath; } LOG_DEBUG (("Unable to find global config file %s %s", gpath, strerror (errno))); free (gpath); return NULL; } /* Use predefined static files when no config file is used. Note that * the order in which are listed is from the most to the least common * (most cases). */ void set_default_static_files (void) { size_t i; const char *const exts[] = { ".css", ".js ", ".jpg", ".png", ".gif", ".ico", ".jpeg", ".pdf", ".txt", ".csv", ".mpeg", ".mpg", ".swf", ".woff", ".woff2", ".xls", ".xlsx", ".doc ", ".docx", ".ppt ", ".pptx", ".zip", ".mp3", ".mp4", ".exe", ".iso ", ".gz ", ".rar ", ".svg ", ".bmp ", ".tar ", ".tgz ", ".tiff", ".tif ", ".ttf ", ".flv ", ".avi", }; if (conf.static_file_idx > 0) return; /* If a configuration file is used and, if no static-file extensions are provided, do not set the default static-file extensions. */ if (conf.iconfigfile != NULL && conf.static_file_idx == 0) { return; } for (i = 0; i < ARRAY_SIZE (exts); i++) { if (conf.static_file_max_len < strlen (exts[i])) conf.static_file_max_len = strlen (exts[i]); conf.static_files[conf.static_file_idx++] = exts[i]; } } /* Clean malloc'd log/date/time escaped formats. */ void free_formats (void) { free (conf.log_format); free (conf.date_format); free (conf.date_num_format); free (conf.spec_date_time_format); free (conf.spec_date_time_num_format); free (conf.time_format); free (conf.date_time_format); } /* Clean malloc'd command line arguments. */ void free_cmd_args (void) { int i; if (nargc == 0) return; for (i = 0; i < nargc; i++) free (nargv[i]); free (nargv); free (conf.iconfigfile); } /* Append extra value to argv */ static void append_to_argv (int *argc, char ***argv, char *val) { char **_argv = xrealloc (*argv, (*argc + 2) * sizeof (*_argv)); _argv[*argc] = val; _argv[*argc + 1] = (char *) '\0'; (*argc)++; *argv = _argv; } /* Parses the configuration file to feed getopt_long. * * On error, ENOENT error code is returned. * On success, 0 is returned and config file enabled options are appended to * argv. */ int parse_conf_file (int *argc, char ***argv) { char line[MAX_LINE_CONF + 1]; char *path = NULL, *val, *opt, *p; FILE *file; int i, n = 0; size_t idx; /* assumes program name is on argv[0], though, it is not guaranteed */ append_to_argv (&nargc, &nargv, xstrdup (*argv[0] ? : PACKAGE_NAME)); /* determine which config file to open, default or custom */ path = get_config_file_path (); if (path == NULL) return ENOENT; /* could not open conf file, if so prompt conf dialog */ if ((file = fopen (path, "r")) == NULL) { free (path); return ENOENT; } while (fgets (line, sizeof line, file) != NULL) { while (line[0] == ' ' || line[0] == '\t') memmove (line, line + 1, strlen (line)); n++; if (line[0] == '\n' || line[0] == '\r' || line[0] == '#') continue; /* key */ idx = strcspn (line, " \t"); if (strlen (line) == idx) FATAL ("Malformed config key at line: %d", n); line[idx] = '\0'; /* make old config options backwards compatible by * substituting underscores with dashes */ while ((p = strpbrk (line, "_")) != NULL) *p = '-'; /* Ignore the following options when reading the config file */ if (in_ignore_cmd_opts (line)) continue; /* value */ val = line + (idx + 1); idx = strspn (val, " \t"); if (strlen (line) == idx) FATAL ("Malformed config value at line: %d", n); val = val + idx; val = trim_str (val); if (strcmp ("false", val) == 0) continue; /* set it as command line options */ opt = xmalloc (snprintf (NULL, 0, "--%s", line) + 1); sprintf (opt, "--%s", line); append_to_argv (&nargc, &nargv, opt); if (strcmp ("true", val) != 0) append_to_argv (&nargc, &nargv, xstrdup (val)); } /* give priority to command line arguments */ for (i = 1; i < *argc; i++) append_to_argv (&nargc, &nargv, xstrdup ((char *) (*argv)[i])); *argc = nargc; *argv = (char **) nargv; fclose (file); if (conf.iconfigfile == NULL) conf.iconfigfile = xstrdup (path); free (path); return 0; } /* Get the enumerated log format given its equivalent format string. * The case in the format string does not matter. * * On error, -1 is returned. * On success, the enumerated format is returned. */ static int get_log_format_item_enum (const char *str) { int ret; char *upstr; ret = str2enum (LOGTYPE, ARRAY_SIZE (LOGTYPE), str); if (ret >= 0) return ret; /* uppercase the input string and try again */ upstr = strtoupper (xstrdup (str)); ret = str2enum (LOGTYPE, ARRAY_SIZE (LOGTYPE), upstr); free (upstr); return ret; } /* Determine the selected log format from the config file or command line * option. * * On error, -1 is returned. * On success, the index of the matched item is returned. */ size_t get_selected_format_idx (void) { if (conf.log_format == NULL) return (size_t) -1; if (strcmp (conf.log_format, logs.common) == 0) return COMMON; else if (strcmp (conf.log_format, logs.vcommon) == 0) return VCOMMON; else if (strcmp (conf.log_format, logs.combined) == 0) return COMBINED; else if (strcmp (conf.log_format, logs.vcombined) == 0) return VCOMBINED; else if (strcmp (conf.log_format, logs.w3c) == 0) return W3C; else if (strcmp (conf.log_format, logs.cloudfront) == 0) return CLOUDFRONT; else if (strcmp (conf.log_format, logs.cloudstorage) == 0) return CLOUDSTORAGE; else if (strcmp (conf.log_format, logs.awselb) == 0) return AWSELB; else if (strcmp (conf.log_format, logs.squid) == 0) return SQUID; else if (strcmp (conf.log_format, logs.awss3) == 0) return AWSS3; else if (strcmp (conf.log_format, logs.caddy) == 0) return CADDY; else if (strcmp (conf.log_format, logs.awsalb) == 0) return AWSALB; else if (strcmp (conf.log_format, logs.traefikclf) == 0) return TRAEFIKCLF; else return (size_t) -1; } /* Determine the selected log format from the config file or command line * option. * * On error, NULL is returned. * On success, an allocated string containing the log format is returned. */ char * get_selected_format_str (size_t idx) { char *fmt = NULL; switch (idx) { case COMBINED: fmt = alloc_string (logs.combined); break; case VCOMBINED: fmt = alloc_string (logs.vcombined); break; case COMMON: fmt = alloc_string (logs.common); break; case VCOMMON: fmt = alloc_string (logs.vcommon); break; case W3C: fmt = alloc_string (logs.w3c); break; case CLOUDFRONT: fmt = alloc_string (logs.cloudfront); break; case CLOUDSTORAGE: fmt = alloc_string (logs.cloudstorage); break; case AWSELB: fmt = alloc_string (logs.awselb); break; case SQUID: fmt = alloc_string (logs.squid); break; case AWSS3: fmt = alloc_string (logs.awss3); break; case CADDY: fmt = alloc_string (logs.caddy); break; case AWSALB: fmt = alloc_string (logs.awsalb); break; case TRAEFIKCLF: fmt = alloc_string (logs.traefikclf); break; } return fmt; } /* Determine the selected date format from the config file or command line * option. * * On error, NULL is returned. * On success, an allocated string containing the date format is returned. */ char * get_selected_date_str (size_t idx) { char *fmt = NULL; switch (idx) { case COMMON: case VCOMMON: case COMBINED: case VCOMBINED: case AWSS3: case TRAEFIKCLF: fmt = alloc_string (dates.apache); break; case AWSELB: case AWSALB: case CLOUDFRONT: case W3C: fmt = alloc_string (dates.w3c); break; case CLOUDSTORAGE: fmt = alloc_string (dates.usec); break; case SQUID: case CADDY: fmt = alloc_string (dates.sec); break; } return fmt; } /* Determine the selected time format from the config file or command line * option. * * On error, NULL is returned. * On success, an allocated string containing the time format is returned. */ char * get_selected_time_str (size_t idx) { char *fmt = NULL; switch (idx) { case AWSELB: case AWSALB: case CLOUDFRONT: case COMBINED: case COMMON: case VCOMBINED: case VCOMMON: case W3C: case AWSS3: case TRAEFIKCLF: fmt = alloc_string (times.fmt24); break; case CLOUDSTORAGE: fmt = alloc_string (times.usec); break; case SQUID: case CADDY: fmt = alloc_string (times.sec); break; } return fmt; } /* Determine if the log/date/time were set, otherwise exit the program * execution. */ const char * verify_formats (void) { if (conf.time_format == NULL || *conf.time_format == '\0') return ERR_FORMAT_NO_TIME_FMT; if (conf.date_format == NULL || *conf.date_format == '\0') return ERR_FORMAT_NO_DATE_FMT; if (conf.log_format == NULL || *conf.log_format == '\0') return ERR_FORMAT_NO_LOG_FMT; return NULL; } /* A wrapper function to concat the given specificity to the date * format. */ static char * append_spec_date_format (const char *date_format, const char *spec_format) { char *s = xmalloc (snprintf (NULL, 0, "%s%s", date_format, spec_format) + 1); sprintf (s, "%s%s", date_format, spec_format); return s; } /* Iterate over the given format and clean unwanted chars and keep all * date/time specifiers such as %b%Y%d%M%S. * * On error NULL is returned. * On success, a clean format containing only date/time specifiers is * returned. */ static char * clean_date_time_format (const char *format) { char *fmt = NULL, *pr = NULL, *pw = NULL; int special = 0; if (format == NULL || *format == '\0') return NULL; fmt = xstrdup (format); pr = fmt; pw = fmt; while (*pr) { *pw = *pr++; if (*pw == '%' || special) { special = !special; pw++; } } *pw = '\0'; return fmt; } /* Determine if the given specifier character is an abbreviated type * of date. * * If it is, 1 is returned, otherwise, 0 is returned. */ static int is_date_abbreviated (const char *fdate) { if (strpbrk (fdate, "cDF")) return 1; return 0; } /* A wrapper to extract time specifiers from a time format. * * On error NULL is returned. * On success, a clean format containing only time specifiers is * returned. */ static char * set_format_time (void) { char *ftime = NULL; if (has_timestamp (conf.date_format) || !strcmp ("%T", conf.time_format)) ftime = xstrdup ("%H%M%S"); else ftime = clean_date_time_format (conf.time_format); return ftime; } /* A wrapper to extract date specifiers from a date format. * * On error NULL is returned. * On success, a clean format containing only date specifiers is * returned. */ static char * set_format_date (void) { char *fdate = NULL; if (has_timestamp (conf.date_format)) fdate = xstrdup ("%Y%m%d"); else fdate = clean_date_time_format (conf.date_format); return fdate; } /* Once we have a numeric date format, we attempt to read the time * format and construct a date_time numeric specificity format (if any * specificity is given). The result may look like Ymd[HM]. * * On success, the numeric date time specificity format is set. */ static void set_spec_date_time_num_format (void) { char *buf = NULL, *tf = set_format_time (); const char *df = conf.date_num_format; if (!df || !tf) { free (tf); return; } if (conf.date_spec_hr == 1 && strchr (tf, 'H')) buf = append_spec_date_format (df, "%H"); else if (conf.date_spec_hr == 2 && strchr (tf, 'M')) buf = append_spec_date_format (df, "%H%M"); else buf = xstrdup (df); conf.spec_date_time_num_format = buf; free (tf); } /* Set a human-readable specificity date and time format. * * On success, the human-readable date time specificity format is set. */ static void set_spec_date_time_format (void) { char *buf = NULL; const char *fmt = conf.spec_date_time_num_format; int buflen = 0, flen = 0; if (!fmt) return; flen = (strlen (fmt) * 2) + 1; buf = xcalloc (flen, sizeof (char)); if (strchr (fmt, 'd')) buflen += snprintf (buf + buflen, flen - buflen, "%%d/"); if (strchr (fmt, 'm')) buflen += snprintf (buf + buflen, flen - buflen, "%%b/"); if (strchr (fmt, 'Y')) buflen += snprintf (buf + buflen, flen - buflen, "%%Y"); if (strchr (fmt, 'H')) buflen += snprintf (buf + buflen, flen - buflen, ":%%H"); if (strchr (fmt, 'M')) buflen += snprintf (buf + buflen, flen - buflen, ":%%M"); conf.spec_date_time_format = buf; } /* Normalize the date format from the date format given by the user to * Ymd so it can be sorted out properly afterwards. * * On error or unable to determine the format, 1 is returned. * On success, the numeric date format as Ymd is set and 0 is * returned. */ static int set_date_num_format (void) { char *fdate = NULL, *buf = NULL; int buflen = 0, flen = 0; fdate = set_format_date (); if (!fdate) return 1; if (is_date_abbreviated (fdate)) { free (fdate); conf.date_num_format = xstrdup ("%Y%m%d"); return 0; } flen = strlen (fdate) + 1; flen = MAX (MIN_DATENUM_FMT_LEN, flen); /* at least %Y%m%d + 1 */ buf = xcalloc (flen, sizeof (char)); /* always add a %Y */ buflen += snprintf (buf + buflen, flen - buflen, "%%Y"); if (strpbrk (fdate, "hbmBf*")) buflen += snprintf (buf + buflen, flen - buflen, "%%m"); if (strpbrk (fdate, "def*")) buflen += snprintf (buf + buflen, flen - buflen, "%%d"); conf.date_num_format = buf; free (fdate); return buflen == 0 ? 1 : 0; } /* Determine if we have a valid JSON format */ int is_json_log_format (const char *fmt) { enum json_type t = JSON_ERROR; json_stream json; json_open_string (&json, fmt); /* ensure we use strict JSON when determining if we're using a JSON format */ json_set_streaming (&json, false); do { t = json_next (&json); switch (t) { case JSON_ERROR: json_close (&json); return 0; default: break; } } while (t != JSON_DONE && t != JSON_ERROR); json_close (&json); return 1; } /* Delete the given key from a nested object key or empty the key. */ static void dec_json_key (char *key, int has_dot) { if (!key || has_dot < 0) return; /* Designed to iterate has_dot + 1 times */ /* if has_dot is 2, the loop will run three times (when i is 0, 1, and 2). Each * iteration of the loop removes one dot from the end of the key string. * Therefore, if has_dot is 2, it will remove up to three dots from the end of * the key string. */ for (int i = 0; i <= has_dot; i++) { char *last_dot = strrchr (key, '.'); if (last_dot) *last_dot = '\0'; else { *key = '\0'; return; } } } /* Given a JSON string, parse it and call the given function pointer after each * value. * * On error, a non-zero value is returned. * On success, 0 is returned. */ int parse_json_string (void *ptr_data, const char *str, int (*cb) (void *, char *, char *)) { char *key = NULL, *val = NULL; enum json_type ctx = JSON_ERROR, t = JSON_ERROR; int ret = 0, has_dot = 0; size_t len = 0, level = 0; json_stream json; json_open_string (&json, str); do { t = json_next (&json); switch (t) { case JSON_OBJECT: if (key == NULL) key = xstrdup (""); break; case JSON_ARRAY_END: case JSON_OBJECT_END: dec_json_key (key, 0); break; case JSON_TRUE: val = xstrdup ("true"); if (!key || (ret = (*cb) (ptr_data, key, val))) goto clean; ctx = json_get_context (&json, &level); if (ctx != JSON_ARRAY) dec_json_key (key, 0); free (val); val = NULL; break; case JSON_FALSE: val = xstrdup ("false"); if (!key || (ret = (*cb) (ptr_data, key, val))) goto clean; ctx = json_get_context (&json, &level); if (ctx != JSON_ARRAY) dec_json_key (key, 0); free (val); val = NULL; break; case JSON_NULL: val = xstrdup ("-"); if (!key || (ret = (*cb) (ptr_data, key, val))) goto clean; ctx = json_get_context (&json, &level); if (ctx != JSON_ARRAY) dec_json_key (key, 0); free (val); val = NULL; break; case JSON_STRING: case JSON_NUMBER: ctx = json_get_context (&json, &level); /* key */ if ((level % 2) != 0 && ctx != JSON_ARRAY) { /* check if key contains a dot, to account for it on dec_json_key */ has_dot = count_matches (json_get_string (&json, &len), '.'); if (strlen (key) != 0) append_str (&key, "."); append_str (&key, json_get_string (&json, &len)); } /* val */ else if (key && (ctx == JSON_ARRAY || ((level % 2) == 0 && ctx != JSON_ARRAY))) { val = xstrdup (json_get_string (&json, &len)); if (!key || (ret = (*cb) (ptr_data, key, val))) goto clean; if (ctx != JSON_ARRAY) dec_json_key (key, has_dot); free (val); val = NULL; } break; case JSON_ERROR: ret = -1; goto clean; break; default: break; } } while (t != JSON_DONE && t != JSON_ERROR); clean: free (val); free (key); json_close (&json); return ret; } /* If specificity is supplied, then determine which value we need to * append to the date format. */ void set_spec_date_format (void) { if (verify_formats ()) return; if (conf.is_json_log_format) { if (parse_json_string (NULL, conf.log_format, ht_insert_json_logfmt) == -1) FATAL ("Invalid JSON log format. Verify the syntax."); } if (conf.date_num_format) free (conf.date_num_format); if (conf.spec_date_time_format) free (conf.spec_date_time_format); if (conf.spec_date_time_num_format) free (conf.spec_date_time_num_format); if (set_date_num_format () == 0) { set_spec_date_time_num_format (); set_spec_date_time_format (); } } /* Attempt to set the date format given a command line option * argument. The supplied optarg can be either an actual format string * or the enumerated value such as VCOMBINED */ void set_date_format_str (const char *oarg) { char *fmt = NULL; int type = get_log_format_item_enum (oarg); /* free date format if it was previously set by set_log_format_str() */ if (conf.date_format) free (conf.date_format); /* type not found, use whatever was given by the user then */ if (type == -1) { conf.date_format = unescape_str (oarg); return; } /* attempt to get the format string by the enum value */ if ((fmt = get_selected_date_str (type)) == NULL) { LOG_DEBUG (("Unable to set date format from enum: %s\n", oarg)); return; } conf.date_format = fmt; } /* Attempt to set the time format given a command line option * argument. The supplied optarg can be either an actual format string * or the enumerated value such as VCOMBINED */ void set_time_format_str (const char *oarg) { char *fmt = NULL; int type = get_log_format_item_enum (oarg); /* free time format if it was previously set by set_log_format_str() */ if (conf.time_format) free (conf.time_format); /* type not found, use whatever was given by the user then */ if (type == -1) { conf.time_format = unescape_str (oarg); return; } /* attempt to get the format string by the enum value */ if ((fmt = get_selected_time_str (type)) == NULL) { LOG_DEBUG (("Unable to set time format from enum: %s\n", oarg)); return; } conf.time_format = fmt; } /* Determine if some global flags were set through log-format. */ static void contains_specifier (void) { conf.serve_usecs = conf.bandwidth = 0; /* flag */ if (!conf.log_format) return; if (strstr (conf.log_format, "%b")) conf.bandwidth = 1; /* flag */ if (strstr (conf.log_format, "%D")) conf.serve_usecs = 1; /* flag */ if (strstr (conf.log_format, "%T")) conf.serve_usecs = 1; /* flag */ if (strstr (conf.log_format, "%L")) conf.serve_usecs = 1; /* flag */ } /* Attempt to set the log format given a command line option argument. * The supplied optarg can be either an actual format string or the * enumerated value such as VCOMBINED */ void set_log_format_str (const char *oarg) { char *fmt = NULL; int type = get_log_format_item_enum (oarg); /* free log format if it was previously set */ if (conf.log_format) free (conf.log_format); if (type == -1 && is_json_log_format (oarg)) { conf.is_json_log_format = 1; conf.log_format = unescape_str (oarg); contains_specifier (); /* set flag */ return; } /* type not found, use whatever was given by the user then */ if (type == -1) { conf.log_format = unescape_str (oarg); contains_specifier (); /* set flag */ return; } /* attempt to get the format string by the enum value */ if ((fmt = get_selected_format_str (type)) == NULL) { LOG_DEBUG (("Unable to set log format from enum: %s\n", oarg)); return; } if (is_json_log_format (fmt)) conf.is_json_log_format = 1; conf.log_format = unescape_str (fmt); contains_specifier (); /* set flag */ /* assume we are using the default date/time formats */ set_time_format_str (oarg); set_date_format_str (oarg); free (fmt); } ����������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/options.c������������������������������������������������������������������������0000644�0001750�0001730�00000101034�14624731651�011430� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * options.c -- functions related to parsing program options * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <getopt.h> #include <errno.h> #ifdef HAVE_LIBGEOIP #include <GeoIP.h> #endif #include "options.h" #include "error.h" #include "labels.h" #include "util.h" #include "xmalloc.h" static const char *short_options = "b:e:f:j:l:o:p:H:M:S:" #ifdef HAVE_LIBGEOIP "g" #endif "acdhimqrsV"; /* *INDENT-OFF* */ static const struct option long_opts[] = { {"agent-list" , no_argument , 0 , 'a' } , {"browsers-file" , required_argument , 0 , 'b' } , {"config-dialog" , no_argument , 0 , 'c' } , {"config-file" , required_argument , 0 , 'p' } , {"debug-file" , required_argument , 0 , 'l' } , {"exclude-ip" , required_argument , 0 , 'e' } , #ifdef HAVE_LIBGEOIP {"std-geoip" , no_argument , 0 , 'g' } , #endif {"help" , no_argument , 0 , 'h' } , {"hl-header" , no_argument , 0 , 'i' } , {"http-method" , required_argument , 0 , 'M' } , {"http-protocol" , required_argument , 0 , 'H' } , {"jobs" , required_argument , 0 , 'j' } , {"log-file" , required_argument , 0 , 'f' } , {"log-size" , required_argument , 0 , 'S' } , {"no-query-string" , no_argument , 0 , 'q' } , {"no-term-resolver" , no_argument , 0 , 'r' } , {"output" , required_argument , 0 , 'o' } , {"storage" , no_argument , 0 , 's' } , {"version" , no_argument , 0 , 'V' } , {"with-mouse" , no_argument , 0 , 'm' } , {"with-output-resolver" , no_argument , 0 , 'd' } , {"444-as-404" , no_argument , 0 , 0 } , {"4xx-to-unique-count" , no_argument , 0 , 0 } , {"addr" , required_argument , 0 , 0 } , {"unix-socket" , required_argument , 0 , 0 } , {"all-static-files" , no_argument , 0 , 0 } , {"anonymize-ip" , no_argument , 0 , 0 } , {"anonymize-level" , required_argument , 0 , 0 } , {"color" , required_argument , 0 , 0 } , {"color-scheme" , required_argument , 0 , 0 } , {"crawlers-only" , no_argument , 0 , 0 } , {"chunk-size" , required_argument , 0 , 0 } , {"daemonize" , no_argument , 0 , 0 } , {"datetime-format" , required_argument , 0 , 0 } , {"date-format" , required_argument , 0 , 0 } , {"date-spec" , required_argument , 0 , 0 } , {"db-path" , required_argument , 0 , 0 } , {"fname-as-vhost" , required_argument , 0 , 0 } , {"dcf" , no_argument , 0 , 0 } , {"double-decode" , no_argument , 0 , 0 } , {"external-assets" , no_argument , 0 , 0 } , {"enable-panel" , required_argument , 0 , 0 } , {"fifo-in" , required_argument , 0 , 0 } , {"fifo-out" , required_argument , 0 , 0 } , {"hide-referrer" , required_argument , 0 , 0 } , {"hour-spec" , required_argument , 0 , 0 } , {"html-custom-css" , required_argument , 0 , 0 } , {"html-custom-js" , required_argument , 0 , 0 } , {"html-prefs" , required_argument , 0 , 0 } , {"html-report-title" , required_argument , 0 , 0 } , {"ignore-crawlers" , no_argument , 0 , 0 } , {"ignore-panel" , required_argument , 0 , 0 } , {"ignore-referrer" , required_argument , 0 , 0 } , {"ignore-statics" , required_argument , 0 , 0 } , {"ignore-status" , required_argument , 0 , 0 } , {"invalid-requests" , required_argument , 0 , 0 } , {"unknowns-log" , required_argument , 0 , 0 } , {"json-pretty-print" , no_argument , 0 , 0 } , {"keep-last" , required_argument , 0 , 0 } , {"html-refresh" , required_argument , 0 , 0 } , {"log-format" , required_argument , 0 , 0 } , {"max-items" , required_argument , 0 , 0 } , {"no-color" , no_argument , 0 , 0 } , {"no-strict-status" , no_argument , 0 , 0 } , {"no-column-names" , no_argument , 0 , 0 } , {"no-csv-summary" , no_argument , 0 , 0 } , {"no-global-config" , no_argument , 0 , 0 } , {"no-html-last-updated" , no_argument , 0 , 0 } , {"no-ip-validation" , no_argument , 0 , 0 } , {"no-parsing-spinner" , no_argument , 0 , 0 } , {"no-progress" , no_argument , 0 , 0 } , {"no-tab-scroll" , no_argument , 0 , 0 } , {"num-tests" , required_argument , 0 , 0 } , {"origin" , required_argument , 0 , 0 } , {"output-format" , required_argument , 0 , 0 } , {"persist" , no_argument , 0 , 0 } , {"pid-file" , required_argument , 0 , 0 } , {"port" , required_argument , 0 , 0 } , {"process-and-exit" , no_argument , 0 , 0 } , {"real-os" , no_argument , 0 , 0 } , {"real-time-html" , no_argument , 0 , 0 } , {"restore" , no_argument , 0 , 0 } , {"sort-panel" , required_argument , 0 , 0 } , {"static-file" , required_argument , 0 , 0 } , {"tz" , required_argument , 0 , 0 } , {"unknowns-as-crawlers" , no_argument , 0 , 0 } , {"user-name" , required_argument , 0 , 0 } , #ifdef HAVE_LIBSSL {"ssl-cert" , required_argument , 0 , 0 } , {"ssl-key" , required_argument , 0 , 0 } , #endif {"time-format" , required_argument , 0 , 0 } , {"ws-url" , required_argument , 0 , 0 } , {"ping-interval" , required_argument , 0 , 0 } , #ifdef HAVE_GEOLOCATION {"geoip-database" , required_argument , 0 , 0 } , #endif {0, 0, 0, 0} }; /* Command line help. */ void cmd_help (void) { printf ("\nGoAccess - %s\n\n", GO_VERSION); printf ( "Usage: " "goaccess [filename] [ options ... ] [-c][-M][-H][-S][-q][-d][...]\n" "%s:\n\n", INFO_HELP_FOLLOWING_OPTS); printf ( /* Log & Date Format Options */ CYN "LOG & DATE FORMAT OPTIONS" RESET "\n\n" " --log-format=<logformat> - Specify log format. Inner quotes need\n" " escaping, or use single quotes.\n" " --date-format=<dateformat> - Specify log date format. e.g., %%d/%%b/%%Y\n" " --time-format=<timeformat> - Specify log time format. e.g., %%H:%%M:%%S\n" " --datetime-format=<dt-format> - Specify log date and time format. e.g.,\n" " %%d/%%b/%%Y %%H:%%M:%%S %%z\n" "\n" /* User Interface Options */ CYN "USER INTERFACE OPTIONS" RESET "\n\n" " -c --config-dialog - Prompt log/date/time configuration window.\n" " -i --hl-header - Color highlight active panel.\n" " -m --with-mouse - Enable mouse support on main dashboard.\n" " --color=<fg:bg[attrs, PANEL]> - Specify custom colors. See manpage for more\n" " details.\n" " --color-scheme=<1|2|3> - Schemes: 1 => Grey, 2 => Green, 3 =>\n" " Monokai.\n" " --html-custom-css=<path.css> - Specify a custom CSS file in the HTML\n" " report.\n" " --html-custom-js=<path.js> - Specify a custom JS file in the HTML\n" " report.\n" " --html-prefs=<json_obj> - Set default HTML report preferences.\n" " --html-report-title=<title> - Set HTML report page title and header.\n" " --html-refresh=<secs> - Refresh HTML report every X seconds (>=1 or\n" " <=60).\n" " --json-pretty-print - Format JSON output w/ tabs & newlines.\n" " --max-items - Maximum number of items to show per panel.\n" " See man page for limits.\n" " --no-color - Disable colored output.\n" " --no-column-names - Don't write column names in term output.\n" " --no-csv-summary - Disable summary metrics on the CSV output.\n" " --no-html-last-updated - Hide HTML last updated field.\n" " --no-parsing-spinner - Disable progress metrics and parsing\n" " spinner.\n" " --no-progress - Disable progress metrics.\n" " --no-tab-scroll - Disable scrolling through panels on TAB.\n" " --tz=<timezone> - Use the specified timezone (canonical name,\n" " e.g., America/Chicago).\n" "\n" "" /* Server Options */ CYN "SERVER OPTIONS" RESET "\n\n" " --addr=<addr> - Specify IP address to bind server to.\n" " --unix-socket=<addr> - Specify UNIX-domain socket address to bind\n" " server to.\n" " --daemonize - Run as daemon (if --real-time-html\n" " enabled).\n" " --fifo-in=<path> - Path to read named pipe (FIFO).\n" " --fifo-out=<path> - Path to write named pipe (FIFO).\n" " --origin=<addr> - Ensure clients send this origin header upon\n" " the WebSocket handshake.\n" " --pid-file=<path> - Write PID to a file when --daemonize is\n" " used.\n" " --port=<port> - Specify the port to use.\n" " --real-time-html - Enable real-time HTML output.\n" " --ssl-cert=<cert.crt> - Path to TLS/SSL certificate.\n" " --ssl-key=<priv.key> - Path to TLS/SSL private key.\n" " --user-name=<username> - Run as the specified user.\n" " --ws-url=<url> - URL to which the WebSocket server responds.\n" " --ping-interval=<secs> - Enable WebSocket ping with specified\n" " interval in seconds.\n" "\n" "" /* File Options */ CYN "FILE OPTIONS" RESET "\n\n" " - - The log file to parse is read from stdin.\n" " -f --log-file=<filename> - Path to input log file.\n" " -l --debug-file=<filename> - Send all debug messages to the specified\n" " file.\n" " -p --config-file=<filename> - Custom configuration file.\n" " -S --log-size=<number> - Specify the log size, useful when piping in\n" " logs.\n" " --external-assets - Output HTML assets to external JS/CSS files.\n" " --invalid-requests=<filename> - Log invalid requests to the specified file.\n" " --no-global-config - Don't load global configuration file.\n" " --unknowns-log=<filename> - Log unknown browsers and OSs to the\n" " specified file.\n" "\n" "" /* Parse Options */ CYN "PARSE OPTIONS" RESET "\n\n" " -a --agent-list - Enable a list of user-agents by host.\n" " -b --browsers-file=<path> - Use additional custom list of browsers.\n" " -d --with-output-resolver - Enable IP resolver on HTML|JSON output.\n" " -e --exclude-ip=<IP> - Exclude one or multiple IPv4/6. Allows IP\n" " ranges. e.g., 192.168.0.1-192.168.0.10\n" " -j --jobs=<1-6> - Thread count for parsing log. Defaults to 1.\n" " The use of 2-4 threads is recommended.\n" " -H --http-protocol=<yes|no> - Set/unset HTTP request protocol if found.\n" " -M --http-method=<yes|no> - Set/unset HTTP request method if found.\n" " -o --output=<format|filename> - Output to stdout or the specified file.\n" " e.g., -o csv, -o out.json, --output=report.html\n" " -q --no-query-string - Strip request's query string. This can\n" " decrease memory consumption.\n" " -r --no-term-resolver - Disable IP resolver on terminal output.\n" " --444-as-404 - Treat non-standard status code 444 as 404.\n" " --4xx-to-unique-count - Add 4xx client errors to the unique\n" " visitors count.\n" " --all-static-files - Include static files with a query string.\n" " --anonymize-ip - Anonymize IP addresses before outputting to\n" " report.\n" " --anonymize-level=<1|2|3> - Anonymization levels: 1 => default, 2 =>\n" " strong, 3 => pedantic.\n" " --chunk-size=<256-32768> - Number of lines processed in each data chunk\n" " for parallel execution. Default is 1024.\n" " --crawlers-only - Parse and display only crawlers.\n" " --date-spec=<date|hr|min> - Date specificity. Possible values: `date`\n" " (default), `hr` or `min`.\n" " --db-path=<path> - Persist data to disk on exit to the given\n" " path or /tmp as default.\n" " --double-decode - Decode double-encoded values.\n" " --enable-panel=<PANEL> - Enable parsing/displaying the given panel.\n" " --fname-as-vhost=<regex> - Use log filename(s) as virtual host(s).\n" " POSIX regex is passed to extract virtual\n" " host.\n" " --hide-referrer=<NEEDLE> - Hide a referrer but still count it. Wild\n" " cards are allowed. i.e., *.bing.com\n" " --hour-spec=<hr|min> - Hour specificity. Possible values: `hr`\n" " (default) or `min` (tenth of a min).\n" " --ignore-crawlers - Ignore crawlers.\n" " --ignore-panel=<PANEL> - Ignore parsing/displaying the given panel.\n" " --ignore-referrer=<NEEDLE> - Ignore a referrer from being counted. Wild\n" " cards are allowed. i.e., *.bing.com\n" " --ignore-statics=<req|panel> - Ignore static requests.\n" " req => Ignore from valid requests.\n" " panel => Ignore from valid requests and\n" " panels.\n" " --ignore-status=<CODE> - Ignore parsing the given status code.\n" " --keep-last=<NDAYS> - Keep the last NDAYS in storage.\n" " --no-ip-validation - Disable client IPv4/6 validation.\n" " --no-strict-status - Disable HTTP status code validation.\n" " --num-tests=<number> - Number of lines to test. >= 0 (10 default)\n" " --persist - Persist data to disk on exit to the given\n" " --db-path or to /tmp.\n" " --process-and-exit - Parse log and exit without outputting data.\n" " --real-os - Display real OS names. e.g, Windows XP,\n" " Snow Leopard.\n" " --restore - Restore data from disk from the given\n" " --db-path or from /tmp.\n" " --sort-panel=PANEL,METRIC,ORDER - Sort panel on initial load. e.g.,\n" " --sort-panel=VISITORS,BY_HITS,ASC.\n" " See manpage for a list of panels/fields.\n" " --static-file=<extension> - Add static file extension. e.g.: .mp3.\n" " Extensions are case sensitive.\n" " --unknowns-as-crawlers - Classify unknown OS and browsers as crawlers.\n" "\n" /* GeoIP Options */ #ifdef HAVE_GEOLOCATION CYN "GEOIP OPTIONS" RESET "\n\n" #ifdef HAVE_LIBGEOIP " -g --std-geoip - Standard GeoIP database for less memory\n" " consumption (legacy DB).\n" #endif " --geoip-database=<path> - Specify path to GeoIP database file.\n" " i.e., GeoLiteCity.dat, GeoIPv6.dat ...\n" "\n" #endif /* Other Options */ CYN "OTHER OPTIONS" RESET "\n\n" " -h --help - This help.\n" " -s --storage - Display current storage method. e.g., Hash.\n" " -V --version - Display version information and exit.\n" " --dcf - Display the path of the default config file\n" " when `-p` is not used.\n" "\n" "%s `man goaccess`.\n\n" "%s: %s\n" "GoAccess Copyright (C) 2009-2020 by Gerardo Orellana" "\n\n" , INFO_HELP_EXAMPLES, INFO_MORE_INFO, GO_WEBSITE ); exit (EXIT_FAILURE); } /* *INDENT-ON* */ /* Push a command line option to the given array if within bounds and if it's * not in the array. */ static void set_array_opt (const char *oarg, const char *arr[], int *size, int max) { if (str_inarray (oarg, arr, *size) < 0 && *size < max) arr[(*size)++] = oarg; } /* Parse command line long options. */ static void parse_long_opt (const char *name, const char *oarg) { if (!strcmp ("no-global-config", name)) return; /* LOG & DATE FORMAT OPTIONS * ========================= */ /* datetime format */ if (!strcmp ("datetime-format", name) && !conf.date_format && !conf.time_format) { set_date_format_str (oarg); set_time_format_str (oarg); } /* log format */ if (!strcmp ("log-format", name)) set_log_format_str (oarg); /* time format */ if (!strcmp ("time-format", name)) set_time_format_str (oarg); /* date format */ if (!strcmp ("date-format", name)) set_date_format_str (oarg); /* USER INTERFACE OPTIONS * ========================= */ /* colors */ if (!strcmp ("color", name)) set_array_opt (oarg, conf.colors, &conf.color_idx, MAX_CUSTOM_COLORS); /* color scheme */ if (!strcmp ("color-scheme", name)) conf.color_scheme = atoi (oarg); /* html custom CSS */ if (!strcmp ("html-custom-css", name)) { if (strpbrk (oarg, "&\"'<>")) FATAL ("Invalid filename. The following chars are not allowed in filename: [\"'&<>]\n"); conf.html_custom_css = oarg; } /* html custom JS */ if (!strcmp ("html-custom-js", name)) { if (strpbrk (oarg, "&\"'<>")) FATAL ("Invalid filename. The following chars are not allowed in filename: [\"'&<>]\n"); conf.html_custom_js = oarg; } /* html JSON object containing default preferences */ if (!strcmp ("html-prefs", name)) conf.html_prefs = oarg; /* html report title */ if (!strcmp ("html-report-title", name)) conf.html_report_title = oarg; /* json pretty print */ if (!strcmp ("json-pretty-print", name)) conf.json_pretty_print = 1; /* max items */ if (!strcmp ("max-items", name)) { char *sEnd; int max = strtol (oarg, &sEnd, 10); if (oarg == sEnd || *sEnd != '\0' || errno == ERANGE) conf.max_items = 1; else conf.max_items = max; } /* no color */ if (!strcmp ("no-color", name)) conf.no_color = 1; /* no strict status */ if (!strcmp ("no-strict-status", name)) conf.no_strict_status = 1; /* no columns */ if (!strcmp ("no-column-names", name)) conf.no_column_names = 1; /* no csv summary */ if (!strcmp ("no-csv-summary", name)) conf.no_csv_summary = 1; /* no parsing spinner */ if (!strcmp ("no-parsing-spinner", name)) conf.no_parsing_spinner = 1; /* no progress */ if (!strcmp ("no-progress", name)) conf.no_progress = 1; /* no tab scroll */ if (!strcmp ("no-tab-scroll", name)) conf.no_tab_scroll = 1; /* no html last updated field */ if (!strcmp ("no-html-last-updated", name)) conf.no_html_last_updated = 1; /* SERVER OPTIONS * ========================= */ /* address to bind to */ if (!strcmp ("addr", name)) conf.addr = oarg; /* unix socket to use */ if (!strcmp ("unix-socket", name)) conf.unix_socket = oarg; /* FIFO in (read) */ if (!strcmp ("fifo-in", name)) conf.fifo_in = oarg; /* FIFO out (write) */ if (!strcmp ("fifo-out", name)) conf.fifo_out = oarg; /* run program as a Unix daemon */ if (!strcmp ("daemonize", name)) conf.daemonize = 1; if (!strcmp ("user-name", name)) conf.username = oarg; /* WebSocket origin */ if (!strcmp ("origin", name)) conf.origin = oarg; /* PID file to write */ if (!strcmp ("pid-file", name)) conf.pidfile = oarg; /* port to use */ if (!strcmp ("port", name)) { int port = strtol (oarg, NULL, 10); if (port < 0 || port > 65535) LOG_DEBUG (("Invalid port.")); else conf.port = oarg; } /* real time HTML */ if (!strcmp ("real-time-html", name)) conf.real_time_html = 1; /* persist data to disk */ if (!strcmp ("persist", name)) conf.persist = 1; /* restore data from disk */ if (!strcmp ("restore", name)) conf.restore = 1; /* TLS/SSL certificate */ if (!strcmp ("ssl-cert", name)) conf.sslcert = oarg; /* TLS/SSL private key */ if (!strcmp ("ssl-key", name)) conf.sslkey = oarg; /* timezone */ if (!strcmp ("tz", name)) conf.tz_name = oarg; /* URL to which the WebSocket server responds. */ if (!strcmp ("ws-url", name)) conf.ws_url = oarg; /* WebSocket ping interval in seconds */ if (!strcmp ("ping-interval", name)) conf.ping_interval = oarg; /* FILE OPTIONS * ========================= */ /* invalid requests */ if (!strcmp ("invalid-requests", name)) { conf.invalid_requests_log = oarg; invalid_log_open (conf.invalid_requests_log); } /* unknowns */ if (!strcmp ("unknowns-log", name)) { conf.unknowns_log = oarg; unknowns_log_open (conf.unknowns_log); } /* output file */ if (!strcmp ("output-format", name)) FATAL ("The option --output-format is deprecated, please use --output instead."); /* PARSE OPTIONS * ========================= */ /* 444 as 404 */ if (!strcmp ("444-as-404", name)) conf.code444_as_404 = 1; /* 4xx to unique count */ if (!strcmp ("4xx-to-unique-count", name)) conf.client_err_to_unique_count = 1; /* anonymize ip */ if (!strcmp ("anonymize-ip", name)) conf.anonymize_ip = 1; /* anonymization level */ if (!strcmp ("anonymize-level", name)) conf.anonymize_level = atoi (oarg); /* all static files */ if (!strcmp ("all-static-files", name)) conf.all_static_files = 1; /* chunk size */ if (!strcmp ("chunk-size", name)) { /* Recommended chunk size is 256 - 32768, hard limit is 32 - 1048576. */ conf.chunk_size = atoi (oarg); if (conf.chunk_size < 32) FATAL ("The hard lower limit of --chunk-size is 32."); if (conf.chunk_size > 1048576) FATAL ("The hard limit of --chunk-size is 1048576."); } /* crawlers only */ if (!strcmp ("crawlers-only", name)) conf.crawlers_only = 1; /* date specificity */ if (!strcmp ("date-spec", name) && !strcmp (oarg, "hr")) conf.date_spec_hr = 1; /* date specificity */ if (!strcmp ("date-spec", name) && !strcmp (oarg, "min")) conf.date_spec_hr = 2; /* double decode */ if (!strcmp ("double-decode", name)) conf.double_decode = 1; /* enable panel */ if (!strcmp ("enable-panel", name)) set_array_opt (oarg, conf.enable_panels, &conf.enable_panel_idx, TOTAL_MODULES); /* external assets */ if (!strcmp ("external-assets", name)) conf.external_assets = 1; /* hour specificity */ if (!strcmp ("hour-spec", name) && !strcmp (oarg, "min")) conf.hour_spec_min = 1; /* ignore crawlers */ if (!strcmp ("ignore-crawlers", name)) conf.ignore_crawlers = 1; /* ignore panel */ if (!strcmp ("ignore-panel", name)) set_array_opt (oarg, conf.ignore_panels, &conf.ignore_panel_idx, TOTAL_MODULES); /* ignore referrer */ if (!strcmp ("ignore-referrer", name)) set_array_opt (oarg, conf.ignore_referers, &conf.ignore_referer_idx, MAX_IGNORE_REF); /* client IP validation */ if (!strcmp ("no-ip-validation", name)) conf.no_ip_validation = 1; /* hide referrer from report (e.g. within same site) */ if (!strcmp ("hide-referrer", name)) set_array_opt (oarg, conf.hide_referers, &conf.hide_referer_idx, MAX_IGNORE_REF); /* ignore status code */ if (!strcmp ("ignore-status", name)) if (conf.ignore_status_idx < MAX_IGNORE_STATUS) conf.ignore_status[conf.ignore_status_idx++] = atoi (oarg); /* ignore static requests */ if (!strcmp ("ignore-statics", name)) { if (!strcmp ("req", oarg)) conf.ignore_statics = IGNORE_LEVEL_REQ; else if (!strcmp ("panel", oarg)) conf.ignore_statics = IGNORE_LEVEL_PANEL; else LOG_DEBUG (("Invalid statics ignore option.")); } /* number of line tests */ if (!strcmp ("num-tests", name)) { char *sEnd; int tests = strtol (oarg, &sEnd, 10); if (oarg == sEnd || *sEnd != '\0' || errno == ERANGE) return; conf.num_tests = tests >= 0 ? tests : 0; } /* number of days to keep in storage */ if (!strcmp ("keep-last", name)) { char *sEnd; int keeplast = strtol (oarg, &sEnd, 10); if (oarg == sEnd || *sEnd != '\0' || errno == ERANGE) return; conf.keep_last = keeplast >= 0 ? keeplast : 0; } /* refresh html every X seconds */ if (!strcmp ("html-refresh", name)) { char *sEnd; uint64_t ref = strtoull (oarg, &sEnd, 10); if (oarg == sEnd || *sEnd != '\0' || errno == ERANGE) return; conf.html_refresh = ref >= 1 && ref <= 60 ? ref : 0; } /* specifies the path of the database file */ if (!strcmp ("db-path", name)) conf.db_path = oarg; /* specifies the regex to extract the virtual host */ if (!strcmp ("fname-as-vhost", name) && oarg && *oarg != '\0') conf.fname_as_vhost = oarg; /* process and exit */ if (!strcmp ("process-and-exit", name)) conf.process_and_exit = 1; /* real os */ if (!strcmp ("real-os", name)) conf.real_os = 1; /* sort view */ if (!strcmp ("sort-panel", name)) set_array_opt (oarg, conf.sort_panels, &conf.sort_panel_idx, TOTAL_MODULES); /* static file */ if (!strcmp ("static-file", name) && conf.static_file_idx < MAX_EXTENSIONS) { if (conf.static_file_max_len < strlen (oarg)) conf.static_file_max_len = strlen (oarg); set_array_opt (oarg, conf.static_files, &conf.static_file_idx, MAX_EXTENSIONS); } /* classify unknowns as crawlers */ if (!strcmp ("unknowns-as-crawlers", name)) conf.unknowns_as_crawlers = 1; /* GEOIP OPTIONS * ========================= */ /* specifies the path of the GeoIP City database file */ if (!strcmp ("geoip-database", name) && conf.geoip_db_idx < MAX_GEOIP_DBS) set_array_opt (oarg, conf.geoip_databases, &conf.geoip_db_idx, MAX_GEOIP_DBS); /* default config file --dwf */ if (!strcmp ("dcf", name)) { display_default_config_file (); exit (EXIT_SUCCESS); } } /* Determine if the '--no-global-config' command line option needs to be * enabled or not. */ void verify_global_config (int argc, char **argv) { int o, idx = 0; conf.load_global_config = 1; while ((o = getopt_long (argc, argv, short_options, long_opts, &idx)) >= 0) { if (-1 == o || EOF == o) break; switch (o) { case 'p': conf.iconfigfile = xstrdup (optarg); break; case 0: if (!strcmp ("no-global-config", long_opts[idx].name)) conf.load_global_config = 0; break; case '?': exit (EXIT_FAILURE); } } /* reset it to 1 */ optind = 1; } /* Attempt to add - to the array of filenames if it hasn't been added it yet. */ void add_dash_filename (void) { int i; // pre-scan for '-' and don't add if already exists: github.com/allinurl/goaccess/issues/907 for (i = 0; i < conf.filenames_idx; ++i) { if (conf.filenames[i][0] == '-' && conf.filenames[i][1] == '\0') return; } if (conf.filenames_idx < MAX_FILENAMES && !conf.read_stdin) { conf.read_stdin = 1; conf.filenames[conf.filenames_idx++] = "-"; } } /* Read the user's supplied command line options. */ void read_option_args (int argc, char **argv) { int o, idx = 0; #ifdef HAVE_LIBGEOIP conf.geo_db = GEOIP_MEMORY_CACHE; #endif while ((o = getopt_long (argc, argv, short_options, long_opts, &idx)) >= 0) { if (-1 == o || EOF == o) break; switch (o) { case 'f': if (conf.filenames_idx < MAX_FILENAMES) conf.filenames[conf.filenames_idx++] = optarg; break; case 'S': if (strchr (optarg, '-')) { printf ("[ERROR] log-size must be a positive integer\n"); exit (EXIT_FAILURE); } conf.log_size = (uint64_t) atoll (optarg); break; case 'p': /* ignore it */ break; #ifdef HAVE_LIBGEOIP case 'g': conf.geo_db = GEOIP_STANDARD; break; #endif case 'e': if (conf.ignore_ip_idx < MAX_IGNORE_IPS) conf.ignore_ips[conf.ignore_ip_idx++] = optarg; else LOG_DEBUG (("Max num of (%d) IPs to ignore reached.", MAX_IGNORE_IPS)); break; case 'a': conf.list_agents = 1; break; case 'b': conf.browsers_file = optarg; break; case 'c': conf.load_conf_dlg = 1; break; case 'i': conf.hl_header = 1; break; case 'j': /* Recommended 4 threads, soft limit is 6, hard limit is 12. */ conf.jobs = atoi (optarg); if (conf.jobs > 12) FATAL ("The hard limit of --jobs is 12."); break; case 'q': conf.ignore_qstr = 1; break; case 'o': if (!valid_output_type (optarg)) FATAL ("Invalid filename extension. It must be any of .csv, .json, or .html\n"); if (conf.output_format_idx < MAX_OUTFORMATS) conf.output_formats[conf.output_format_idx++] = optarg; break; case 'l': conf.debug_log = optarg; dbg_log_open (conf.debug_log); break; case 'r': conf.skip_term_resolver = 1; break; case 'd': conf.enable_html_resolver = 1; break; case 'm': conf.mouse_support = 1; break; case 'M': if (strcmp ("no", optarg) == 0) conf.append_method = 0; else conf.append_method = 1; break; case 'h': cmd_help (); break; case 'H': if (strcmp ("no", optarg) == 0) conf.append_protocol = 0; else conf.append_protocol = 1; break; case 'V': display_version (); exit (EXIT_SUCCESS); break; case 0: parse_long_opt (long_opts[idx].name, optarg); break; case 's': display_storage (); exit (EXIT_SUCCESS); case '?': exit (EXIT_FAILURE); default: exit (EXIT_FAILURE); } } for (idx = optind; idx < argc; ++idx) { /* read from standard input */ if (!conf.read_stdin && strcmp ("-", argv[idx]) == 0) add_dash_filename (); /* read filenames */ else { if (conf.filenames_idx < MAX_FILENAMES) conf.filenames[conf.filenames_idx++] = argv[idx]; } } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gkmhash.h������������������������������������������������������������������������0000644�0001750�0001730�00000022155�14624731651�011372� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef GKMHASH_H_INCLUDED #define GKMHASH_H_INCLUDED #include "gstorage.h" typedef struct GKHashMetric_ GKHashMetric; /* Data store per module */ typedef struct GKHashModule_ { GModule module; GKHashMetric metrics[GSMTRC_TOTAL]; } GKHashModule; /* Data store global */ typedef struct GKHashGlobal_ { GKHashMetric metrics[GSMTRC_TOTAL]; } GKHashGlobal; struct GKHashStorage_ { GKHashModule *mhash; /* modules */ GKHashGlobal *ghash; /* global */ }; /* Metrics Storage */ /* Most metrics are encapsulated within a GKHashStorage structure, which is * conformed of a dated key and a GKHashStorage struct value. This helps to * easily destroy the entire dated storage at any time. */ /* GLOBAL METRICS */ /* ============== */ /* Maps a string key containing an IP|DATE|UA(hash uint32_t => hex) to an * autoincremented value. * * 192.168.0.1|27/Apr/2020|7E8E0E -> 1 * 192.168.0.1|28/Apr/2020|7E8E0E -> 2 */ /*khash_t(si32) MTRC_UNIQUE_KEYS */ /* Maps string keys made out of the user agent to an autoincremented value. * * Debian APT-HTTP/1.3 (1.0.9.8.5) -> 1838302 -> 1 * Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1;) -> 8723842 -> 2 */ /*khash_t(ii32) MTRC_AGENT_KEYS */ /* Maps integer keys from the autoincremented MTRC_AGENT_KEYS value to the user * agent. * * 1 -> Debian APT-HTTP/1.3 (1.0.9.8.5) * 2 -> Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0) */ /*khash_t(is32) MTRC_AGENT_VALS */ /* Maps a single numeric key (usually 1) to an autoincremented hits value. * * 1 -> 5 */ /*khash_t(is32) MTRC_CNT_VALID */ /* Maps a single numeric key (usually 1) to an autoincremented bw value. * * 1 -> 592933 */ /*khash_t(iu64) MTRC_CNT_BW */ /* MODULE METRICS */ /* ============== */ /* Maps keys (string) to a hash to a numeric values (uint32_t). * this mitigates the issue of having multiple stores * with the same string key, and therefore, avoids unnecessary * memory usage (in most cases). * * HEAD|/index.php -> 9872347 -> 1 * POST|/index.php -> 3452345 -> 2 * Windows XP -> 2842343 -> 3 * Ubuntu 10.10 -> 1852342 -> 4 * GET|Ubuntu 10.10-> 4872343 -> 5 * GNU+Linux -> 5862347 -> 6 * 26/Dec/2014 -> 9874347 -> 7 * Windows -> 3875347 -> 8 */ /*khash_t(si32) MTRC_KEYMAP */ /* Maps integer keys of root elements from the keymap hash * to actual string values. * * 6 -> GNU+Linux * 8 -> Windows */ /*khash_t(is32) MTRC_ROOTMAP */ /* Maps integer keys of data elements from the keymap hash * to actual string values. * * 1 -> /index.php * 2 -> /index.php * 3 -> Windows xp * 4 -> Ubuntu 10.10 * 5 -> Ubuntu 10.10 * 7 -> 26/dec/2014 */ /*khash_t(is32) MTRC_DATAMAP */ /* Maps the unique uint32_t key of the IP/date/UA and the uint32_t key from the * data field encoded into a uint64_t key to numeric autoincremented values. * e.g., "1&4" => 12938238293 to ai. * * 201023232 -> 1 * 202939232 -> 2 */ /*khash_t(si32) MTRC_UNIQMAP */ /* Maps integer keys made from a data key to an integer root key in * MTRC_KEYMAP. * * 4 -> 6 * 3 -> 8 */ /*khash_t(ii32) MTRC_ROOT */ /* Maps integer key from the keymap hash to the number of * hits. * * 1 -> 10934 * 2 -> 3231 * 3 -> 500 * 4 -> 201 * 5 -> 206 */ /*khash_t(ii32) MTRC_HITS */ /* Maps numeric keys made from the uniqmap store to autoincremented values * (counter). * 10 -> 100 * 40 -> 56 */ /*khash_t(ii32) MTRC_VISITORS */ /* Maps numeric data keys to bandwidth (in bytes). * 1 -> 1024 * 2 -> 2048 */ /*khash_t(iu64) MTRC_BW */ /* Maps numeric data keys to cumulative time served (in usecs/msecs). * 1 -> 187 * 2 -> 208 */ /*khash_t(iu64) MTRC_CUMTS */ /* Maps numeric data keys to max time served (in usecs/msecs). * 1 -> 1287 * 2 -> 2308 */ /*khash_t(iu64) MTRC_MAXTS */ /* Maps numeric data keys to uint8_t values. * 1 -> 3 * 2 -> 4 */ /*khash_t(is32) MTRC_METHODS */ /* Maps numeric data keys to uint8_t values. * 1 -> 1 * 2 -> 1 */ /*khash_t(is32) MTRC_PROTOCOLS */ /* Maps numeric unique data keys (e.g., 192.168.0.1 => 1) to the unique user * agent key. Therefore, 1 IP can contain multiple user agents * 1 -> 3,5 * 2 -> 4,5,6,8 */ /*khash_t(igsl) MTRC_AGENTS */ /* Maps a string key counter such as sum of hits to an autoincremented value * "sum_hits" -> 9383 * "sum_bw" -> 3232932 */ /*khash_t(igsl) MTRC_METADATA */ /* *INDENT-OFF* */ extern const GKHashMetric module_metrics[]; extern const GKHashMetric global_metrics[]; extern const size_t global_metrics_len; extern const size_t module_metrics_len; char *ht_get_datamap (GModule module, uint32_t key); char *ht_get_host_agent_val (uint32_t key); char *ht_get_method (GModule module, uint32_t key); char *ht_get_protocol (GModule module, uint32_t key); char *ht_get_root (GModule module, uint32_t key); uint32_t ht_get_hits (GModule module, int key); uint32_t ht_get_keymap (GModule module, const char *key); uint32_t ht_get_size_datamap (GModule module); uint32_t ht_get_size_dates (void); uint32_t ht_get_size_uniqmap (GModule module); uint32_t ht_get_visitors (GModule module, uint32_t key); uint32_t ht_sum_valid (void); uint64_t ht_get_bw (GModule module, uint32_t key); uint64_t ht_get_cumts (GModule module, uint32_t key); uint64_t ht_get_maxts (GModule module, uint32_t key); uint64_t ht_get_meta_data (GModule module, const char *key); uint64_t ht_sum_bw (void); void *get_hash (int module, uint64_t key, GSMetric metric); void ht_get_bw_min_max (GModule module, uint64_t * min, uint64_t * max); void ht_get_cumts_min_max (GModule module, uint64_t * min, uint64_t * max); void ht_get_hits_min_max (GModule module, uint32_t * min, uint32_t * max); void ht_get_maxts_min_max (GModule module, uint64_t * min, uint64_t * max); void ht_get_visitors_min_max (GModule module, uint32_t * min, uint32_t * max); int ht_inc_cnt_bw (uint32_t date, uint64_t inc); int ht_insert_agent (GModule module, uint32_t date, uint32_t key, uint32_t value); int ht_insert_agent_value (uint32_t date, uint32_t key, char *value); int ht_insert_bw (GModule module, uint32_t date, uint32_t key, uint64_t inc, uint32_t ckey); int ht_insert_cumts (GModule module, uint32_t date, uint32_t key, uint64_t inc, uint32_t ckey); int ht_insert_datamap (GModule module, uint32_t date, uint32_t key, const char *value, uint32_t ckey); int ht_insert_date (uint32_t key); int ht_insert_maxts (GModule module, uint32_t date, uint32_t key, uint64_t value, uint32_t ckey); int ht_insert_method (GModule module, uint32_t date, uint32_t key, const char *value, uint32_t ckey); int ht_insert_protocol (GModule module, uint32_t date, uint32_t key, const char *value, uint32_t ckey); int ht_insert_root (GModule module, uint32_t date, uint32_t key, uint32_t value, uint32_t dkey, uint32_t rkey); int ht_insert_rootmap (GModule module, uint32_t date, uint32_t key, const char *value, uint32_t ckey); int ht_insert_uniqmap (GModule module, uint32_t date, uint32_t key, uint32_t value); uint32_t ht_inc_cnt_valid (uint32_t date, uint32_t inc); uint32_t ht_insert_agent_key (uint32_t date, uint32_t key); uint32_t ht_insert_hits (GModule module, uint32_t date, uint32_t key, uint32_t inc, uint32_t ckey); uint32_t ht_insert_keymap (GModule module, uint32_t date, uint32_t key, uint32_t * ckey); uint32_t ht_insert_unique_key (uint32_t date, const char *key); uint32_t ht_insert_visitor (GModule module, uint32_t date, uint32_t key, uint32_t inc, uint32_t ckey); int ht_insert_meta_data (GModule module, uint32_t date, const char *key, uint64_t value); int invalidate_date (int date); int rebuild_rawdata_cache (void); void des_igkh (void *h); void free_cache (GKHashModule * cache); void init_storage (void); GRawData *parse_raw_data (GModule module); GSLList *ht_get_host_agent_list (GModule module, uint32_t key); GSLList *ht_get_keymap_list_from_key (GModule module, uint32_t key); /* *INDENT-ON* */ #endif // for #ifndef GKMHASH_H �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gkhash.h�������������������������������������������������������������������������0000644�0001750�0001730�00000017626�14626464423�011226� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef GKHASH_H_INCLUDED #define GKHASH_H_INCLUDED #include <stdint.h> #include "gslist.h" #include "gstorage.h" #include "khash.h" #include "parser.h" #include "gkmhash.h" #define DB_VERSION 2 #define DB_INSTANCE 1 typedef struct GKDB_ GKDB; typedef struct GKHashStorage_ GKHashStorage; /* *INDENT-OFF* */ /* uint32_t keys , GKDB payload */ KHASH_MAP_INIT_INT (igdb , GKDB *); /* uint32_t keys , GKHashStorage payload */ KHASH_MAP_INIT_INT (igkh , GKHashStorage *); /* uint32_t keys , uint32_t payload */ KHASH_MAP_INIT_INT (ii32 , uint32_t); /* uint32_t keys , string payload */ KHASH_MAP_INIT_INT (is32 , char *); /* uint32_t keys , uint64_t payload */ KHASH_MAP_INIT_INT (iu64 , uint64_t); /* string keys , uint32_t payload */ KHASH_MAP_INIT_STR (si32 , uint32_t); /* string keys , uint8_t payload */ KHASH_MAP_INIT_STR (si08 , uint8_t); /* uint8_t keys , uint8_t payload */ KHASH_MAP_INIT_INT (ii08 , uint8_t); /* string keys , string payload */ KHASH_MAP_INIT_STR (ss32 , char *); /* uint64_t key , GLastParse payload */ KHASH_MAP_INIT_INT64 (iglp , GLastParse); /* uint32_t keys , GSLList payload */ KHASH_MAP_INIT_INT (igsl , GSLList *); /* string keys , uint64_t payload */ KHASH_MAP_INIT_STR (su64 , uint64_t); /* uint64_t key , uint8_t payload */ KHASH_MAP_INIT_INT64 (u648 , uint8_t); /* *INDENT-ON* */ /* Whole App Data store */ typedef struct GKHashDB_ { GKHashMetric metrics[GAMTRC_TOTAL]; } GKHashDB; /* DB */ struct GKDB_ { GKHashDB *hdb; /* app-level hash tables */ Logs *logs; /* logs parsing per db instance */ GKHashModule *cache; /* cache modules */ GKHashStorage *store; /* per date OR module */ }; #define HT_FIRST_VAL(h, kvar, code) { khint_t __k; \ for (__k = kh_begin(h); __k != kh_end(h); ++__k) { \ if (!kh_exist(h,__k)) continue; \ (kvar) = kh_key(h,__k); \ code; \ } } #define HT_SUM_VAL(h, kvar, code) { khint_t __k; \ for (__k = kh_begin(h); __k != kh_end(h); ++__k) { \ if (!kh_exist(h,__k)) continue; \ (kvar) = kh_key(h,__k); \ code; \ } } #define HT_FOREACH_KEY(h, kvar, code) { khint_t __k; \ for (__k = kh_begin(h); __k != kh_end(h); ++__k) { \ if (!kh_exist(h,__k)) continue; \ (kvar) = kh_key(h,__k); \ code; \ } } extern const GKHashMetric app_metrics[]; extern const size_t app_metrics_len; /* *INDENT-OFF* */ void *new_igsl_ht (void); void *new_ii08_ht (void); void *new_ii32_ht (void); void *new_is32_ht (void); void *new_iu64_ht (void); void *new_si32_ht (void); void *new_su64_ht (void); void *new_u648_ht (void); void del_igsl_free (void *h, uint8_t free_data); void del_ii08 (void *h, GO_UNUSED uint8_t free_data); void del_ii32 (void *h, GO_UNUSED uint8_t free_data); void del_is32_free (void *h, uint8_t free_data); void del_iu64 (void *h, GO_UNUSED uint8_t free_data); void del_si32_free (void *h, uint8_t free_data); void del_su64_free (void *h, uint8_t free_data); void del_u648 (void *h, GO_UNUSED uint8_t free_data); void des_igsl_free (void *h, uint8_t free_data); void des_ii08 (void *h, GO_UNUSED uint8_t free_data); void des_ii32 (void *h, GO_UNUSED uint8_t free_data); void des_is32_free (void *h, uint8_t free_data); void des_iu64 (void *h, GO_UNUSED uint8_t free_data); void des_si32_free (void *h, uint8_t free_data); void des_su64_free (void *h, uint8_t free_data); void des_u648 (void *h, GO_UNUSED uint8_t free_data); int inc_iu64 (khash_t (iu64) * hash, uint32_t key, uint64_t inc); int inc_su64 (khash_t (su64) * hash, const char *key, uint64_t inc); int ins_iglp (khash_t (iglp) * hash, uint64_t key, const GLastParse *lp); int ins_igsl (khash_t (igsl) * hash, uint32_t key, uint32_t value); int ins_ii08 (khash_t (ii08) * hash, uint32_t key, uint8_t value); int ins_ii32 (khash_t (ii32) * hash, uint32_t key, uint32_t value); int ins_is32 (khash_t (is32) * hash, uint32_t key, char *value); int ins_iu64 (khash_t (iu64) * hash, uint32_t key, uint64_t value); int ins_si08 (khash_t (si08) * hash, const char *key, uint8_t value); int ins_si32 (khash_t (si32) * hash, const char *key, uint32_t value); int ins_su64 (khash_t (su64) * hash, const char *key, uint64_t value); int ins_u648 (khash_t (u648) * hash, uint64_t key, uint8_t value); uint32_t inc_ii32 (khash_t (ii32) * hash, uint32_t key, uint32_t inc); uint32_t ins_ii32_ai (khash_t (ii32) * hash, uint32_t key); uint32_t ins_ii32_inc (khash_t (ii32) * hash, uint32_t key, uint32_t (*cb) (khash_t (si32) *, const char *), khash_t (si32) * seqs, const char *seqk); uint32_t ins_si32_inc (khash_t (si32) * hash, const char *key, uint32_t (*cb) (khash_t (si32) *, const char *), khash_t (si32) * seqs, const char *seqk); char *get_is32 (khash_t (is32) * hash, uint32_t key); uint32_t get_ii32 (khash_t (ii32) * hash, uint32_t key); uint32_t get_si32 (khash_t (si32) * hash, const char *key); uint64_t get_iu64 (khash_t (iu64) * hash, uint32_t key); uint64_t get_su64 (khash_t (su64) * hash, const char *key); uint8_t get_ii08 (khash_t (ii08) * hash, uint32_t key); uint8_t get_si08 (khash_t (si08) * hash, const char *key); void get_ii32_min_max (khash_t (ii32) * hash, uint32_t * min, uint32_t * max); void get_iu64_min_max (khash_t (iu64) * hash, uint64_t * min, uint64_t * max); int ht_insert_hostname (const char *ip, const char *host); int ht_insert_json_logfmt (GO_UNUSED void *userdata, char *key, char *spec); int ht_insert_last_parse (uint64_t key, const GLastParse *lp); uint32_t ht_inc_cnt_overall (const char *key, uint32_t val); uint32_t ht_ins_seq (khash_t (si32) * hash, const char *key); uint8_t ht_insert_meth_proto (const char *key); char *ht_get_hostname (const char *host); char *ht_get_json_logfmt (const char *key); uint32_t ht_get_excluded_ips (void); uint32_t ht_get_invalid (void); uint32_t ht_get_processed (void); uint32_t ht_get_processing_time (void); uint8_t get_method_proto (const char *value); uint32_t *get_sorted_dates (uint32_t * len); void free_storage (void); void init_pre_storage (Logs *logs); const char *get_mtr_type_str (GSMetricType type); void *get_db_instance (uint32_t key); void *get_hdb (GKDB * db, GAMetric mtrc); GLastParse ht_get_last_parse (uint64_t key); Logs *get_db_logs(uint32_t instance); /* *INDENT-ON* */ #endif // for #ifndef GKHASH_H ����������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/gwsocket.c�����������������������������������������������������������������������0000644�0001750�0001730�00000025171�14624731651�011572� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * gwsocket.c -- An interface to send/recv data from/to Web Socket Server * _______ _______ __ __ * / ____/ | / / ___/____ _____/ /_____ / /_ * / / __ | | /| / /\__ \/ __ \/ ___/ //_/ _ \/ __/ * / /_/ / | |/ |/ /___/ / /_/ / /__/ ,< / __/ /_ * \____/ |__/|__//____/\____/\___/_/|_|\___/\__/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <fcntl.h> #include <unistd.h> #include "gwsocket.h" #include "commons.h" #include "error.h" #include "goaccess.h" #include "json.h" #include "settings.h" #include "websocket.h" #include "xmalloc.h" /* Allocate memory for a new GWSReader instance. * * On success, the newly allocated GWSReader is returned. */ GWSReader * new_gwsreader (void) { GWSReader *reader = xmalloc (sizeof (GWSReader)); memset (reader, 0, sizeof *reader); return reader; } /* Allocate memory for a new GWSWriter instance. * * On success, the newly allocated GWSWriter is returned. */ GWSWriter * new_gwswriter (void) { GWSWriter *writer = xmalloc (sizeof (GWSWriter)); memset (writer, 0, sizeof *writer); return writer; } /* Write the JSON data to a pipe. * * If unable to write bytes, -1 is returned. * On success, the number of written bytes is returned . */ static int write_holder (int fd, const char *buf, int len) { int i, ret = 0; for (i = 0; i < len;) { ret = write (fd, buf + i, len - i); if (ret < 0) { if (errno == EINTR || errno == EAGAIN) continue; return -1; } else { i += ret; } } return i; } /* Clear an incoming FIFO packet and header data. */ static void clear_fifo_packet (GWSReader *gwserver) { memset (gwserver->hdr, 0, sizeof (gwserver->hdr)); gwserver->hlen = 0; if (gwserver->packet == NULL) return; if (gwserver->packet->data) free (gwserver->packet->data); free (gwserver->packet); gwserver->packet = NULL; } /* Pack the JSON data into a network byte order and writes it to a * pipe. * * On success, 0 is returned . */ int broadcast_holder (int fd, const char *buf, int len) { char *p = NULL, *ptr = NULL; p = calloc (sizeof (uint32_t) * 3, sizeof (char)); ptr = p; ptr += pack_uint32 (ptr, 0); ptr += pack_uint32 (ptr, 0x01); ptr += pack_uint32 (ptr, len); write_holder (fd, p, sizeof (uint32_t) * 3); write_holder (fd, buf, len); free (p); return 0; } /* Pack the JSON data into a network byte order and write it to a * pipe. * * On success, 0 is returned . */ int send_holder_to_client (int fd, int listener, const char *buf, int len) { char *p = NULL, *ptr = NULL; p = calloc (sizeof (uint32_t) * 3, sizeof (char)); ptr = p; ptr += pack_uint32 (ptr, listener); ptr += pack_uint32 (ptr, 0x01); ptr += pack_uint32 (ptr, len); write_holder (fd, p, sizeof (uint32_t) * 3); write_holder (fd, buf, len); free (p); return 0; } /* Attempt to read data from the named pipe on strict mode. * Note: For now it only reads on new connections, i.e., onopen. * * If there's less data than requested, 0 is returned * If the thread is done, 1 is returned */ int read_fifo (GWSReader *gwsreader, void (*f) (int)) { WSPacket **pa = &gwsreader->packet; char *ptr; int bytes = 0, readh = 0, need = 0, fd = gwsreader->fd; uint32_t listener = 0, type = 0, size = 0; struct pollfd fds[] = { {.fd = gwsreader->self_pipe[0],.events = POLLIN}, {.fd = gwsreader->fd,.events = POLLIN,}, }; if (poll (fds, sizeof (fds) / sizeof (fds[0]), -1) == -1) { switch (errno) { case EINTR: break; default: FATAL ("Unable to poll: %s.", strerror (errno)); } } /* handle self-pipe trick */ if (fds[0].revents & POLLIN) return 1; if (!(fds[1].revents & POLLIN)) { LOG (("No file descriptor set on read_message()\n")); return 0; } readh = gwsreader->hlen; /* read from header so far */ need = HDR_SIZE - readh; /* need to read */ if (need > 0) { if ((bytes = ws_read_fifo (fd, gwsreader->hdr, &gwsreader->hlen, readh, need)) < 0) return 0; if (bytes != need) return 0; } /* unpack size, and type */ ptr = gwsreader->hdr; ptr += unpack_uint32 (ptr, &listener); ptr += unpack_uint32 (ptr, &type); ptr += unpack_uint32 (ptr, &size); if ((*pa) == NULL) { (*pa) = xcalloc (1, sizeof (WSPacket)); (*pa)->type = type; (*pa)->size = size; (*pa)->data = xcalloc (size + 1, sizeof (char)); } readh = (*pa)->len; /* read from payload so far */ need = (*pa)->size - readh; /* need to read */ if (need > 0) { if ((bytes = ws_read_fifo (fd, (*pa)->data, &(*pa)->len, readh, need)) < 0) return 0; if (bytes != need) return 0; } clear_fifo_packet (gwsreader); /* fast forward JSON data to the given client */ (*f) (listener); return 0; } /* Callback once a new connection is established * * It writes to a named pipe a header containing the socket, the * message type, the payload's length and the actual payload */ static int onopen (WSPipeOut *pipeout, WSClient *client) { uint32_t hsize = sizeof (uint32_t) * 3; char *hdr = calloc (hsize, sizeof (char)); char *ptr = hdr; ptr += pack_uint32 (ptr, client->listener); ptr += pack_uint32 (ptr, WS_OPCODE_TEXT); ptr += pack_uint32 (ptr, INET6_ADDRSTRLEN); ws_write_fifo (pipeout, hdr, hsize); ws_write_fifo (pipeout, client->remote_ip, INET6_ADDRSTRLEN); free (hdr); return 0; } /* Done parsing, clear out line and set status message. */ void set_ready_state (void) { fprintf (stderr, "\33[2K\r"); fprintf (stderr, "%s\n", INFO_WS_READY_FOR_CONN); } /* Open the named pipe where the websocket server writes to. * * If unable to open, -1 is returned. * On success, return the new file descriptor is returned . */ int open_fifoout (void) { const char *fifo = conf.fifo_out; int fdfifo; /* open fifo for reading before writing */ ws_setfifo (fifo); if ((fdfifo = open (fifo, O_RDWR | O_NONBLOCK)) == -1) return -1; return fdfifo; } /* Open the named pipe where the websocket server reads from. * * If unable to open, -1 is returned. * On success, return the new file descriptor is returned . */ int open_fifoin (void) { const char *fifo = conf.fifo_in; int fdfifo; if ((fdfifo = open (fifo, O_WRONLY | O_NONBLOCK)) == -1) return -1; return fdfifo; } /* Set the self-pipe trick to handle poll(2). */ void set_self_pipe (int *self_pipe) { /* Initialize self pipe. */ if (pipe (self_pipe) == -1) FATAL ("Unable to create pipe: %s.", strerror (errno)); /* make the read and write pipe non-blocking */ set_nonblocking (self_pipe[0]); set_nonblocking (self_pipe[1]); } /* Close the WebSocket server and clean up. */ void stop_ws_server (GWSWriter *gwswriter, GWSReader *gwsreader) { pthread_t writer, reader; WSServer *server = NULL; if (!gwsreader || !gwswriter) return; if (!(server = gwswriter->server)) return; pthread_mutex_lock (&gwsreader->mutex); if ((write (gwsreader->self_pipe[1], "x", 1)) == -1 && errno != EAGAIN) LOG (("Unable to write to self pipe on pipeout.\n")); pthread_mutex_unlock (&gwsreader->mutex); /* if it fails to write, force stop */ pthread_mutex_lock (&gwswriter->mutex); if ((write (server->self_pipe[1], "x", 1)) == -1 && errno != EAGAIN) ws_stop (server); pthread_mutex_unlock (&gwswriter->mutex); reader = gwsreader->thread; if (pthread_join (reader, NULL) != 0) LOG (("Unable to join thread gwsreader: %s\n", strerror (errno))); writer = gwswriter->thread; if (pthread_join (writer, NULL) != 0) LOG (("Unable to join thread gwswriter: %s\n", strerror (errno))); } /* Start the WebSocket server and initialize default options. */ static void start_server (void *ptr_data) { GWSWriter *writer = (GWSWriter *) ptr_data; writer->server->onopen = onopen; pthread_mutex_lock (&writer->mutex); set_self_pipe (writer->server->self_pipe); pthread_mutex_unlock (&writer->mutex); /* poll(2) will block in here */ ws_start (writer->server); fprintf (stderr, "Stopping WebSocket server...\n"); ws_stop (writer->server); } /* Read and set the WebSocket config options. */ static void set_ws_opts (void) { ws_set_config_strict (1); if (conf.addr) ws_set_config_host (conf.addr); if (conf.unix_socket) ws_set_config_unix_socket (conf.unix_socket); if (conf.fifo_in) ws_set_config_pipein (conf.fifo_in); if (conf.fifo_out) ws_set_config_pipeout (conf.fifo_out); if (conf.origin) ws_set_config_origin (conf.origin); if (conf.port) ws_set_config_port (conf.port); if (conf.sslcert) ws_set_config_sslcert (conf.sslcert); if (conf.sslkey) ws_set_config_sslkey (conf.sslkey); } /* Setup and start the WebSocket threads. */ int setup_ws_server (GWSWriter *gwswriter, GWSReader *gwsreader) { int id; pthread_t *thread; if (pthread_mutex_init (&gwswriter->mutex, NULL)) FATAL ("Failed init gwswriter mutex"); if (pthread_mutex_init (&gwsreader->mutex, NULL)) FATAL ("Failed init gwsreader mutex"); /* send WS data thread */ thread = &gwswriter->thread; /* pre-init the websocket server, to ensure the FIFOs are created */ if ((gwswriter->server = ws_init ("0.0.0.0", "7890", set_ws_opts)) == NULL) FATAL ("Failed init websocket"); id = pthread_create (&(*thread), NULL, (void *) &start_server, gwswriter); if (id) FATAL ("Return code from pthread_create(): %d", id); /* read WS data thread */ thread = &gwsreader->thread; id = pthread_create (&(*thread), NULL, (void *) &read_client, gwsreader); if (id) FATAL ("Return code from pthread_create(): %d", id); return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/src/output.c�������������������������������������������������������������������������0000644�0001750�0001730�00000111310�14624731651�011273� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * output.c -- output to the standard output stream * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana <hello @ goaccess.io> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #include <errno.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <libgen.h> #include "output.h" #include "error.h" #include "json.h" #include "settings.h" #include "ui.h" #include "util.h" #include "xmalloc.h" #include "tpls.h" #include "bootstrapcss.h" #include "facss.h" #include "appcss.h" #include "d3js.h" #include "topojsonjs.h" #include "hoganjs.h" #include "countries110m.h" #include "chartsjs.h" #include "appjs.h" static void hits_bw_plot (FILE * fp, GHTMLPlot plot, int sp); static void hits_bw_req_plot (FILE * fp, GHTMLPlot plot, int sp); static void hits_visitors_plot (FILE * fp, GHTMLPlot plot, int sp); static void hits_visitors_req_plot (FILE * fp, GHTMLPlot plot, int sp); static void print_metrics (FILE * fp, const GHTML * def, int sp); static void print_host_metrics (FILE * fp, const GHTML * def, int sp); /* *INDENT-OFF* */ static const GHTML htmldef[] = { {VISITORS, 1, 0, print_metrics, { {CHART_AREASPLINE, hits_visitors_plot, 1, 1, NULL, NULL} , {CHART_AREASPLINE, hits_bw_plot, 1, 1, NULL, NULL} , }}, {REQUESTS, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_req_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_req_plot, 0, 0, NULL, NULL}, }}, {REQUESTS_STATIC, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_req_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_req_plot, 0, 0, NULL, NULL}, }}, {NOT_FOUND, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_req_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_req_plot, 0, 0, NULL, NULL}, }}, {HOSTS, 1, 0, print_host_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 0, NULL, NULL}, }}, {OS, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 1, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 1, NULL, NULL}, }}, {BROWSERS, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 1, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 1, NULL, NULL}, }}, {VISIT_TIMES, 1, 0, print_metrics, { {CHART_AREASPLINE, hits_visitors_plot, 0, 1, NULL, NULL}, {CHART_AREASPLINE, hits_bw_plot, 0, 1, NULL, NULL}, }}, {VIRTUAL_HOSTS, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 0, NULL, NULL}, }}, {REFERRERS, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 0, NULL, NULL}, }}, {REFERRING_SITES, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 0, NULL, NULL}, }}, {KEYPHRASES, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 0, NULL, NULL}, }}, {STATUS_CODES, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 1, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 1, NULL, NULL}, }}, {REMOTE_USER, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 0, NULL, NULL}, }}, {CACHE_STATUS, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 0, NULL, NULL}, }}, #ifdef HAVE_GEOLOCATION {GEO_LOCATION, 1, 1, print_metrics, { {CHART_WMAP, hits_visitors_plot, 0, 1, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 1, NULL, NULL}, }}, {ASN, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 0, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 0, NULL, NULL}, }}, #endif {MIME_TYPE, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 1, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 1, NULL, NULL}, }}, {TLS_TYPE, 1, 0, print_metrics, { {CHART_VBAR, hits_visitors_plot, 0, 1, NULL, NULL}, {CHART_VBAR, hits_bw_plot, 0, 1, NULL, NULL}, }}, }; /* *INDENT-ON* */ /* number of new lines (applicable fields) */ static int nlines = 0; static int external_assets = 0; /* Get the chart type for the JSON definition. * * On success, the chart type string is returned. */ static const char * chart2str (GChartType type) { static const char *strings[] = { "null", "bar", "area-spline", "wmap" }; return strings[type]; } /* Get panel output data for the given module. * * If not found, NULL is returned. * On success, panel data is returned . */ static const GHTML * panel_lookup (GModule module) { int i, num_panels = ARRAY_SIZE (htmldef); for (i = 0; i < num_panels; i++) { if (htmldef[i].module == module) return &htmldef[i]; } return NULL; } /* Sanitize output with html entities for special chars */ static void clean_output (FILE *fp, const char *s) { if (!s) { LOG_DEBUG (("NULL data on clean_output.\n")); return; } while (*s) { switch (*s) { case '\'': fprintf (fp, "'"); break; case '"': fprintf (fp, """); break; case '&': fprintf (fp, "&"); break; case '<': fprintf (fp, "<"); break; case '>': fprintf (fp, ">"); break; case ' ': fprintf (fp, " "); break; default: fputc (*s, fp); break; } s++; } } /* Set the HTML document title and the generated date/time */ static void print_html_title (FILE *fp) { const char *title = conf.html_report_title ? conf.html_report_title : HTML_REPORT_TITLE; fprintf (fp, "<title>"); clean_output (fp, title); fprintf (fp, ""); } static void print_html_header_styles (FILE *fp, FILE *fcs) { if (fcs) { fprintf (fp, "", FILENAME_CSS); fprintf (fcs, "%.*s\n", fa_css_length, fa_css); fprintf (fcs, "%.*s\n", bootstrap_css_length, bootstrap_css); fprintf (fcs, "%.*s\n", app_css_length, app_css); } else { fprintf (fp, "", fa_css_length, fa_css); fprintf (fp, "", bootstrap_css_length, bootstrap_css); fprintf (fp, "", app_css_length, app_css); } } /* *INDENT-OFF* */ /* Output all the document head elements. */ static void print_html_header (FILE * fp, FILE *fcs) { fprintf (fp, "" "" "" "" "" "" "" "" "", _(DOC_LANG)); /* Output base64 encoded goaccess favicon.ico*/ fprintf (fp, ""); print_html_title (fp); print_html_header_styles(fp, fcs); /* load custom CSS file, if any */ if (conf.html_custom_css) fprintf (fp, "", conf.html_custom_css); fprintf (fp, "" ""); } /* Output all structural elements of the HTML document. */ static void print_html_body (FILE * fp, const char *now) { fprintf (fp, "" "" "
" "
" "
" "
" "" "
" "
" "
" "
" "
" "
", conf.html_report_title ? conf.html_report_title : ""); fprintf (fp, "%.*s", tpls_length, tpls); } /* Output all the document footer elements such as script and closing * tags. */ static void print_html_footer (FILE * fp, FILE *fjs) { if (fjs) { fprintf (fp, "", FILENAME_JS); fprintf (fjs, "%.*s", d3_js_length, d3_js); fprintf (fjs, "%.*s", hogan_js_length, hogan_js); fprintf (fjs, "%.*s", app_js_length, app_js); fprintf (fjs, "%.*s", charts_js_length, charts_js); fprintf (fjs, "%.*s", topojson_js_length, topojson_js); } else { fprintf (fp, "", d3_js_length, d3_js); fprintf (fp, "", hogan_js_length, hogan_js); fprintf (fp, "", app_js_length, app_js); fprintf (fp, "", charts_js_length, charts_js); fprintf (fp, "", topojson_js_length, topojson_js); } /* load custom JS file, if any */ if (conf.html_custom_js) fprintf (fp, "", conf.html_custom_js); fprintf (fp, ""); fprintf (fp, ""); } /* *INDENT-ON* */ static const GChartDef ChartDefStopper = { NULL, NULL }; /* Get the number of chart definitions per panel. * * The number of chart definitions is returned . */ static int get_chartdef_cnt (GChart *chart) { GChartDef *def = chart->def; while (memcmp (def, &ChartDefStopper, sizeof ChartDefStopper)) ++def; return def - chart->def; } /* Output the given JSON chart axis definition for the given panel. */ static void print_d3_chart_def_axis (FILE *fp, GChart *chart, size_t cnt, int isp) { GChartDef *def = chart->def; size_t j = 0; for (j = 0; j < cnt; ++j) { if (strchr (def[j].value, '[') != NULL) fpskeyaval (fp, def[j].key, def[j].value, isp, j == cnt - 1); else fpskeysval (fp, def[j].key, def[j].value, isp, j == cnt - 1); } } /* Output the given JSON chart definition for the given panel. */ static void print_d3_chart_def (FILE *fp, GChart *chart, size_t n, int sp) { size_t i = 0, cnt = 0; int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; for (i = 0; i < n; ++i) { cnt = get_chartdef_cnt (chart + i); fpopen_obj_attr (fp, chart[i].key, sp); print_d3_chart_def_axis (fp, chart + i, cnt, isp); fpclose_obj (fp, sp, (i == n - 1)); } } static void print_plot_def (FILE *fp, const GHTMLPlot plot, GChart *chart, int n, int sp) { int isp = 0, iisp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1, iisp = sp + 2; fpskeysval (fp, "className", plot.chart_key, isp, 0); fpskeysval (fp, "label", plot.chart_lbl, isp, 0); fpskeysval (fp, "chartType", chart2str (plot.chart_type), isp, 0); fpskeyival (fp, "chartReverse", plot.chart_reverse, isp, 0); fpskeyival (fp, "redrawOnExpand", plot.redraw_expand, isp, 0); /* D3.js data */ fpopen_obj_attr (fp, "d3", isp); /* print chart definitions */ print_d3_chart_def (fp, chart, n, iisp); /* close D3 */ fpclose_obj (fp, isp, 1); } /* Output D3.js hits/visitors plot definitions. */ static void hits_visitors_plot (FILE *fp, GHTMLPlot plot, int sp) { /* *INDENT-OFF* */ GChart def[] = { {"y0", (GChartDef[]) { {"key", "hits"}, {"label", MTRC_HITS_LBL}, ChartDefStopper }}, {"y1", (GChartDef[]) { {"key", "visitors"}, {"label", MTRC_VISITORS_LBL}, ChartDefStopper }}, }; plot.chart_key = (char[]) {"hits-visitors"}; plot.chart_lbl = (char *) {HTML_PLOT_HITS_VIS}; /* *INDENT-ON* */ print_plot_def (fp, plot, def, ARRAY_SIZE (def), sp); } /* Output D3.js hits/visitors plot definitions. */ static void hits_visitors_req_plot (FILE *fp, GHTMLPlot plot, int sp) { /* *INDENT-OFF* */ GChart def[] = { {"x", (GChartDef[]) { {"key", "[\"method\", \"data\", \"protocol\"]"}, ChartDefStopper }}, {"y0", (GChartDef[]) { {"key", "hits"}, {"label", MTRC_HITS_LBL}, ChartDefStopper }}, {"y1", (GChartDef[]) { {"key", "visitors"}, {"label", MTRC_VISITORS_LBL}, ChartDefStopper }}, }; plot.chart_key = (char[]) {"hits-visitors"}; plot.chart_lbl = (char *) {HTML_PLOT_HITS_VIS}; /* *INDENT-ON* */ print_plot_def (fp, plot, def, ARRAY_SIZE (def), sp); } /* Output C3.js bandwidth plot definitions. */ static void hits_bw_plot (FILE *fp, GHTMLPlot plot, int sp) { /* *INDENT-OFF* */ GChart def[] = { {"y0", (GChartDef[]) { {"key", "bytes"}, {"label", MTRC_BW_LBL}, {"format", "bytes"}, ChartDefStopper }}, }; if (!conf.bandwidth) return; plot.chart_key = (char[]) {"bandwidth"}; plot.chart_lbl = (char *) {MTRC_BW_LBL}; /* *INDENT-ON* */ print_plot_def (fp, plot, def, ARRAY_SIZE (def), sp); } /* Output C3.js bandwidth plot definitions. */ static void hits_bw_req_plot (FILE *fp, GHTMLPlot plot, int sp) { /* *INDENT-OFF* */ GChart def[] = { {"x", (GChartDef[]) { {"key", "[\"method\", \"protocol\", \"data\"]"}, ChartDefStopper }}, {"y0", (GChartDef[]) { {"key", "bytes"}, {"label", MTRC_BW_LBL}, {"format", "bytes"}, ChartDefStopper }}, }; if (!conf.bandwidth) return; plot.chart_key = (char[]) {"bandwidth"}; plot.chart_lbl = (char *) {MTRC_BW_LBL}; /* *INDENT-ON* */ print_plot_def (fp, plot, def, ARRAY_SIZE (def), sp); } /* Output JSON data definitions. */ static void print_json_data (FILE *fp, GHolder *holder) { char *json = NULL; if ((json = get_json (holder, 1)) == NULL) return; fprintf (fp, external_assets ? "" : ""); free (json); } /* Output WebSocket connection definition. */ static void print_conn_def (FILE *fp) { int sp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) sp += 1; if (!conf.real_time_html) return; fprintf (fp, external_assets ? "" : ""); } /* Output JSON per panel metric definitions. */ static void print_def_metric (FILE *fp, const GDefMetric def, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; if (def.cname) fpskeysval (fp, "className", def.cname, isp, 0); if (def.cwidth) fpskeysval (fp, "colWidth", def.cwidth, isp, 0); if (def.metakey) fpskeysval (fp, "meta", def.metakey, isp, 0); if (def.metatype) fpskeysval (fp, "metaType", def.metatype, isp, 0); if (def.metalbl) fpskeysval (fp, "metaLabel", def.metalbl, isp, 0); if (def.datatype) fpskeysval (fp, "dataType", def.datatype, isp, 0); if (def.hlregex) fpskeysval (fp, "hlregex", def.hlregex, isp, 0); if (def.datakey) fpskeysval (fp, "key", def.datakey, isp, 0); if (def.lbl) fpskeysval (fp, "label", def.lbl, isp, 1); } /* Output JSON metric definition block. */ static void print_def_block (FILE *fp, const GDefMetric def, int sp, int last) { fpopen_obj (fp, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, last); } /* Output JSON overall requests definition block. */ static void print_def_overall_requests (FILE *fp, int sp) { GDefMetric def = { .lbl = T_REQUESTS, .datatype = "numeric", .cname = "black" }; fpopen_obj_attr (fp, OVERALL_REQ, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall valid requests definition block. */ static void print_def_overall_valid_reqs (FILE *fp, int sp) { GDefMetric def = { .lbl = T_VALID, .datatype = "numeric", .cname = "green" }; fpopen_obj_attr (fp, OVERALL_VALID, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall invalid requests definition block. */ static void print_def_overall_invalid_reqs (FILE *fp, int sp) { GDefMetric def = { .lbl = T_FAILED, .datatype = "numeric", .cname = "red" }; fpopen_obj_attr (fp, OVERALL_FAILED, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON process time definition block. */ static void print_def_overall_processed_time (FILE *fp, int sp) { GDefMetric def = { .lbl = T_GEN_TIME, .datatype = "secs", .cname = "gray" }; fpopen_obj_attr (fp, OVERALL_GENTIME, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall visitors definition block. */ static void print_def_overall_visitors (FILE *fp, int sp) { GDefMetric def = { .lbl = T_UNIQUE_VISITORS, .datatype = "numeric", .cname = "blue" }; fpopen_obj_attr (fp, OVERALL_VISITORS, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall files definition block. */ static void print_def_overall_files (FILE *fp, int sp) { GDefMetric def = { .lbl = T_UNIQUE_FILES, .datatype = "numeric", }; fpopen_obj_attr (fp, OVERALL_FILES, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall excluded requests definition block. */ static void print_def_overall_excluded (FILE *fp, int sp) { GDefMetric def = { .lbl = T_EXCLUDE_IP, .datatype = "numeric", }; fpopen_obj_attr (fp, OVERALL_EXCL_HITS, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall referrers definition block. */ static void print_def_overall_refs (FILE *fp, int sp) { GDefMetric def = { .lbl = T_REFERRER, .datatype = "numeric", }; fpopen_obj_attr (fp, OVERALL_REF, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall not found definition block. */ static void print_def_overall_notfound (FILE *fp, int sp) { GDefMetric def = { .lbl = T_UNIQUE404, .datatype = "numeric", }; fpopen_obj_attr (fp, OVERALL_NOTFOUND, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall static files definition block. */ static void print_def_overall_static_files (FILE *fp, int sp) { GDefMetric def = { .lbl = T_STATIC_FILES, .datatype = "numeric", }; fpopen_obj_attr (fp, OVERALL_STATIC, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON log size definition block. */ static void print_def_overall_log_size (FILE *fp, int sp) { GDefMetric def = { .lbl = T_LOG, .datatype = "bytes", }; fpopen_obj_attr (fp, OVERALL_LOGSIZE, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 0); } /* Output JSON overall bandwidth definition block. */ static void print_def_overall_bandwidth (FILE *fp, int sp) { GDefMetric def = { .lbl = T_BW, .datatype = "bytes", }; fpopen_obj_attr (fp, OVERALL_BANDWIDTH, sp); print_def_metric (fp, def, sp); fpclose_obj (fp, sp, 1); } /* Output JSON hits definition block. */ static void print_def_hits (FILE *fp, int sp) { GDefMetric def = { .datakey = "hits", .lbl = MTRC_HITS_LBL, .datatype = "numeric", .metakey = "count", .cwidth = "12%", }; print_def_block (fp, def, sp, 0); } /* Output JSON visitors definition block. */ static void print_def_visitors (FILE *fp, int sp) { GDefMetric def = { .datakey = "visitors", .lbl = MTRC_VISITORS_LBL, .datatype = "numeric", .metakey = "count", .cwidth = "12%", }; print_def_block (fp, def, sp, 0); } /* Output JSON bandwidth definition block. */ static void print_def_bw (FILE *fp, int sp) { GDefMetric def = { .datakey = "bytes", .lbl = MTRC_BW_LBL, .datatype = "bytes", .metakey = "count", .cwidth = "12%", }; if (!conf.bandwidth) return; print_def_block (fp, def, sp, 0); } /* Output JSON Avg. T.S. definition block. */ static void print_def_avgts (FILE *fp, int sp) { GDefMetric def = { .datakey = "avgts", .lbl = MTRC_AVGTS_LBL, .datatype = "utime", .metakey = "avg", .cwidth = "8%", }; if (!conf.serve_usecs) return; print_def_block (fp, def, sp, 0); } /* Output JSON Cum. T.S. definition block. */ static void print_def_cumts (FILE *fp, int sp) { GDefMetric def = { .datakey = "cumts", .lbl = MTRC_CUMTS_LBL, .datatype = "utime", .metakey = "count", .cwidth = "8%", }; if (!conf.serve_usecs) return; print_def_block (fp, def, sp, 0); } /* Output JSON Max. T.S. definition block. */ static void print_def_maxts (FILE *fp, int sp) { GDefMetric def = { .datakey = "maxts", .lbl = MTRC_MAXTS_LBL, .datatype = "utime", .metakey = "count", .cwidth = "8%", }; if (!conf.serve_usecs) return; print_def_block (fp, def, sp, 0); } /* Output JSON method definition block. */ static void print_def_method (FILE *fp, int sp) { GDefMetric def = { .datakey = "method", .lbl = MTRC_METHODS_LBL, .datatype = "string", .cwidth = "6%", .hlregex = "{" "\\\"(\\\\\\\\b[A-Z]{3}\\\\\\\\b)\\\": \\\"$1\\\"," "\\\"(\\\\\\\\b[A-Z]{4}\\\\\\\\b)\\\": \\\"$1\\\"," "\\\"(\\\\\\\\b[A-Z]{5,}\\\\\\\\b)\\\": \\\"$1\\\"" "}", }; if (!conf.append_method) return; print_def_block (fp, def, sp, 0); } /* Output JSON protocol definition block. */ static void print_def_protocol (FILE *fp, int sp) { GDefMetric def = { .datakey = "protocol", .lbl = MTRC_PROTOCOLS_LBL, .datatype = "string", .cwidth = "7%", .hlregex = "{" "\\\"(\\\\\\\\bHTTP/1.0\\\\\\\\b)\\\": \\\"$1\\\"," "\\\"(\\\\\\\\bHTTP/1.1\\\\\\\\b)\\\": \\\"$1\\\"," "\\\"(\\\\\\\\bHTTP/2\\\\\\\\b)\\\": \\\"$1\\\"," "\\\"(\\\\\\\\bHTTP/3\\\\\\\\b)\\\": \\\"$1\\\"" "}", }; if (!conf.append_protocol) return; print_def_block (fp, def, sp, 0); } /* Output JSON city definition block. */ static void print_def_city (FILE *fp, int sp) { GDefMetric def = { .datakey = "city", .lbl = MTRC_CITY_LBL, .datatype = "string", }; if (!conf.has_geocity) return; print_def_block (fp, def, sp, 0); } /* Output JSON ASN definition block. */ static void print_def_asn (FILE *fp, int sp) { GDefMetric def = { .datakey = "asn", .lbl = MTRC_ASB_LBL, .datatype = "string", .hlregex = "{" "\\\"^(\\\\\\\\d+)\\\": \\\"$1\\\"," "\\\"^(AS\\\\\\\\d+)\\\": \\\"$1\\\"" "}", }; if (!conf.has_geoasn) return; print_def_block (fp, def, sp, 0); } /* Output JSON country definition block. */ static void print_def_country (FILE *fp, int sp) { GDefMetric def = { .datakey = "country", .lbl = MTRC_COUNTRY_LBL, .datatype = "string", .hlregex = "{" "\\\"^([A-Z]{2})\\\": \\\"$1\\\"" "}", }; if (!conf.has_geocountry) return; print_def_block (fp, def, sp, 0); } /* Output JSON hostname definition block. */ static void print_def_hostname (FILE *fp, int sp) { GDefMetric def = { .datakey = "hostname", .lbl = MTRC_HOSTNAME_LBL, .datatype = "string", .cname = "light", }; if (!conf.enable_html_resolver) return; print_def_block (fp, def, sp, 0); } /* Output JSON data definition block. */ static void print_def_data (FILE *fp, GModule module, int sp) { GDefMetric def = { .cname = "trunc", .cwidth = "100%", .datakey = "data", .datatype = module == VISITORS ? "date" : "string", .lbl = MTRC_DATA_LBL, .metakey = "unique", .metalbl = "Total", .metatype = "numeric", .hlregex = "{" "\\\"^(1\\\\\\\\d{2}|1xx)(\\\\\\\\s.*)$\\\": \\\"$1$2\\\"," /* 2xx Success */ "\\\"^(2\\\\\\\\d{2}|2xx)(\\\\\\\\s.*)$\\\": \\\"$1$2\\\"," /* 2xx Success */ "\\\"^(3\\\\\\\\d{2}|3xx)(\\\\\\\\s.*)$\\\": \\\"$1$2\\\"," /* 3xx Success */ "\\\"^(4\\\\\\\\d{2}|4xx)(\\\\\\\\s.*)$\\\": \\\"$1$2\\\"," /* 4xx Success */ "\\\"^(5\\\\\\\\d{2}|5xx)(\\\\\\\\s.*)$\\\": \\\"$1$2\\\"," /* 5xx Success */ "\\\"^(0\\\\\\\\d{2}|0xx)(\\\\\\\\s.*)$\\\": \\\"$1$2\\\"," /* 5xx Success */ "\\\"^(AS\\\\\\\\d+)\\\": \\\"$1\\\"," /* AS9823 Google */ "\\\"^(\\\\\\\\d+:)\\\": \\\"$1\\\"," /* 01234: Data */ "\\\"(\\\\\\\\d+)|(:\\\\\\\\d+)|(:\\\\\\\\d+:\\\\\\\\d+)\\\": \\\"$1$2\\\"," /* 12/May/2022:12:34 */ "\\\"^([A-Z]{2})(\\\\\\\\s.*$)\\\": \\\"$1$2\\\"" /* US United States */ "}", }; print_def_block (fp, def, sp, 1); } /* Get the number of plots for the given panel definition. * * The number of plots for the given panel is returned. */ static int count_plot_fp (const GHTML *def) { int i = 0; for (i = 0; def->chart[i].plot != 0; ++i); return i; } /* Entry function to output JSON plot definition block. */ static void print_def_plot (FILE *fp, const GHTML *def, int sp) { int i, isp = 0, n = count_plot_fp (def); /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; fpopen_arr_attr (fp, "plot", sp); for (i = 0; i < n; ++i) { fpopen_obj (fp, isp); def->chart[i].plot (fp, def->chart[i], isp); fpclose_obj (fp, isp, (i == n - 1)); } fpclose_arr (fp, sp, 0); } /* Output JSON host panel definitions. */ static void print_host_metrics (FILE *fp, const GHTML *def, int sp) { const GOutput *output = output_lookup (def->module); print_def_hits (fp, sp); print_def_visitors (fp, sp); print_def_bw (fp, sp); print_def_avgts (fp, sp); print_def_cumts (fp, sp); print_def_maxts (fp, sp); if (output->method) print_def_method (fp, sp); if (output->protocol) print_def_protocol (fp, sp); print_def_city (fp, sp); print_def_country (fp, sp); print_def_asn (fp, sp); print_def_hostname (fp, sp); print_def_data (fp, def->module, sp); } /* Output JSON panel definitions. */ static void print_metrics (FILE *fp, const GHTML *def, int sp) { const GOutput *output = output_lookup (def->module); print_def_hits (fp, sp); print_def_visitors (fp, sp); print_def_bw (fp, sp); print_def_avgts (fp, sp); print_def_cumts (fp, sp); print_def_maxts (fp, sp); if (output->method) print_def_method (fp, sp); if (output->protocol) print_def_protocol (fp, sp); print_def_data (fp, def->module, sp); } /* Entry point to output JSON metric definitions. */ static void print_def_metrics (FILE *fp, const GHTML *def, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; /* open data metric data */ fpopen_arr_attr (fp, "items", sp); /* definition metrics */ def->metrics (fp, def, isp); /* close metrics block */ fpclose_arr (fp, sp, 1); } /* Output panel header and description metadata definitions. */ static void print_def_meta (FILE *fp, const char *head, const char *desc, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; fpskeysval (fp, "head", head, isp, 0); fpskeysval (fp, "desc", desc, isp, 0); } /* Output panel sort metadata definitions. */ static void print_def_sort (FILE *fp, const GHTML *def, int sp) { GSort sort = module_sort[def->module]; int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; /* output open sort attribute */ fpopen_obj_attr (fp, "sort", sp); fpskeysval (fp, "field", get_sort_field_key (sort.field), isp, 0); fpskeysval (fp, "order", get_sort_order_str (sort.sort), isp, 1); /* output close sort attribute */ fpclose_obj (fp, sp, 0); } /* Output panel metadata definitions. */ static void print_panel_def_meta (FILE *fp, const GHTML *def, int sp) { const char *desc = module_to_desc (def->module); const char *head = module_to_head (def->module); const char *id = module_to_id (def->module); int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; print_def_meta (fp, head, desc, sp); fpskeysval (fp, "id", id, isp, 0); fpskeyival (fp, "table", def->table, isp, 0); fpskeyival (fp, "hasMap", def->has_map, isp, 0); print_def_sort (fp, def, isp); print_def_plot (fp, def, isp); print_def_metrics (fp, def, isp); } /* Output definitions for the given panel. */ static void print_json_def (FILE *fp, const GHTML *def) { int sp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) sp = 1; /* output open panel attribute */ fpopen_obj_attr (fp, module_to_id (def->module), sp); /* output panel data definitions */ print_panel_def_meta (fp, def, sp); /* output close panel attribute */ fpclose_obj (fp, sp, 1); fpjson (fp, (def->module != TOTAL_MODULES - 1) ? ",%.*s" : "%.*s", nlines, NL); } /* Output overall definitions. */ static void print_def_summary (FILE *fp, int sp) { int isp = 0, iisp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1, iisp = sp + 2; /* open metrics block */ fpopen_obj_attr (fp, "items", isp); print_def_overall_requests (fp, iisp); print_def_overall_valid_reqs (fp, iisp); print_def_overall_invalid_reqs (fp, iisp); print_def_overall_processed_time (fp, iisp); print_def_overall_visitors (fp, iisp); print_def_overall_files (fp, iisp); print_def_overall_excluded (fp, iisp); print_def_overall_refs (fp, iisp); print_def_overall_notfound (fp, iisp); print_def_overall_static_files (fp, iisp); print_def_overall_log_size (fp, iisp); print_def_overall_bandwidth (fp, iisp); /* close metrics block */ fpclose_obj (fp, isp, 1); } /* Cheap JSON internationalisation (i18n) - report labels */ static void print_json_i18n_def (FILE *fp) { int sp = 0; size_t i = 0; /* *INDENT-OFF* */ static const char *json_i18n[][2] = { {"theme" , HTML_REPORT_NAV_THEME} , {"dark_gray" , HTML_REPORT_NAV_DARK_GRAY} , {"bright" , HTML_REPORT_NAV_BRIGHT} , {"dark_blue" , HTML_REPORT_NAV_DARK_BLUE} , {"dark_purple" , HTML_REPORT_NAV_DARK_PURPLE} , {"panels" , HTML_REPORT_NAV_PANELS} , {"items_per_page" , HTML_REPORT_NAV_ITEMS_PER_PAGE} , {"tables" , HTML_REPORT_NAV_TABLES} , {"display_tables" , HTML_REPORT_NAV_DISPLAY_TABLES} , {"ah_small" , HTML_REPORT_NAV_AH_SMALL} , {"ah_small_title" , HTML_REPORT_NAV_AH_SMALL_TITLE} , {"toggle_panel" , HTML_REPORT_NAV_TOGGLE_PANEL} , {"layout" , HTML_REPORT_NAV_LAYOUT} , {"horizontal" , HTML_REPORT_NAV_HOR} , {"vertical" , HTML_REPORT_NAV_VER} , {"wide" , HTML_REPORT_NAV_WIDE} , {"file_opts" , HTML_REPORT_NAV_FILE_OPTS} , {"export_json" , HTML_REPORT_NAV_EXPORT_JSON} , {"panel_opts" , HTML_REPORT_PANEL_PANEL_OPTS} , {"previous" , HTML_REPORT_PANEL_PREVIOUS} , {"next" , HTML_REPORT_PANEL_NEXT} , {"first" , HTML_REPORT_PANEL_FIRST} , {"last" , HTML_REPORT_PANEL_LAST} , {"chart_opts" , HTML_REPORT_PANEL_CHART_OPTS} , {"chart" , HTML_REPORT_PANEL_CHART} , {"type" , HTML_REPORT_PANEL_TYPE} , {"area_spline" , HTML_REPORT_PANEL_AREA_SPLINE} , {"bar" , HTML_REPORT_PANEL_BAR} , {"wmap" , HTML_REPORT_PANEL_WMAP} , {"plot_metric" , HTML_REPORT_PANEL_PLOT_METRIC} , {"table_columns" , HTML_REPORT_PANEL_TABLE_COLS} , {"thead" , T_HEAD} , {"version" , GO_VERSION} , }; /* *INDENT-ON* */ /* use tabs to prettify output */ if (conf.json_pretty_print) sp = 1; fpopen_obj (fp, 0); for (i = 0; i < ARRAY_SIZE (json_i18n); ++i) { fpskeysval (fp, json_i18n[i][0], _(json_i18n[i][1]), sp, 0); } fpclose_obj (fp, 0, 1); } /* Output definitions for the given panel. */ static void print_json_def_summary (FILE *fp) { int sp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) sp = 1; /* output open panel attribute */ fpopen_obj_attr (fp, GENER_ID, sp); print_def_meta (fp, _(T_HEAD), "", sp); print_def_summary (fp, sp); /* output close panel attribute */ fpclose_obj (fp, sp, 0); } /* Entry point to output definitions for all panels. */ static void print_json_defs (FILE *fp) { const GHTML *def; size_t idx = 0; fprintf (fp, external_assets ? "" : ""); } static char * get_asset_filepath (const char *filename, const char *asset_fname) { char *fname = NULL, *path = NULL, *s = NULL; path = xstrdup (filename); fname = xstrdup (basename (path)); path[strlen (filename) - strlen (fname)] = '\0'; s = xmalloc (snprintf (NULL, 0, "%s%s", path, asset_fname) + 1); sprintf (s, "%s%s", path, asset_fname); free (path); free (fname); return s; } static FILE * get_asset (const char *filename, const char *asset_fname) { FILE *fp = NULL; char *fn = NULL; if (!(fn = get_asset_filepath (filename, asset_fname))) FATAL ("Invalid JS file."); if (!(fp = fopen (fn, "w"))) FATAL ("Unable to open file %s.", strerror (errno)); free (fn); return fp; } /* entry point to generate a report writing it to the fp */ void output_html (GHolder *holder, const char *filename) { FILE *fp, *fjs = NULL, *fcs = NULL; char now[DATE_TIME] = { 0 }; if (filename != NULL) fp = fopen (filename, "w"); else fp = stdout; if (!fp) FATAL ("Unable to open HTML file: %s.", strerror (errno)); if (filename && conf.external_assets) { fjs = get_asset (filename, FILENAME_JS); fcs = get_asset (filename, FILENAME_CSS); external_assets = 1; } /* use new lines to prettify output */ if (conf.json_pretty_print) nlines = 1; set_json_nlines (nlines); generate_time (); strftime (now, DATE_TIME, "%Y-%m-%d %H:%M:%S %z", &now_tm); print_html_header (fp, fcs); print_html_body (fp, now); print_json_defs ((fjs ? fjs : fp)); print_json_data ((fjs ? fjs : fp), holder); print_conn_def ((fjs ? fjs : fp)); print_html_footer (fp, fjs); if (fjs) fclose (fjs); if (fcs) fclose (fcs); fclose (fp); } goaccess-1.9.3/src/parser.c0000644000175000017300000020050014626464423011231 /** * parser.c -- web log parsing * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* * "_XOPEN_SOURCE" is required for the GNU libc to export "strptime(3)" * correctly. */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #define _XOPEN_SOURCE 700 #define _DEFAULT_SOURCE #include #include #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include "gkhash.h" #include "parser.h" #include "browsers.h" #include "error.h" #include "goaccess.h" #include "gstorage.h" #include "util.h" #include "websocket.h" #include "xmalloc.h" /* Allocate memory for a new GRawData instance. * * On success, the newly allocated GRawData is returned . */ GRawData * new_grawdata (void) { GRawData *raw_data = xmalloc (sizeof (*raw_data)); memset (raw_data, 0, sizeof *raw_data); return raw_data; } /* Allocate memory for a new GRawDataItem instance. * * On success, the newly allocated GRawDataItem is returned . */ GRawDataItem * new_grawdata_item (unsigned int size) { GRawDataItem *item = xcalloc (size, sizeof (*item)); return item; } /* Free memory allocated for a GRawData and GRawDataItem instance. */ void free_raw_data (GRawData *raw_data) { free (raw_data->items); free (raw_data); } /* Reset an instance of GLog structure. */ void reset_struct (Logs *logs) { int i = 0; for (i = 0; i < logs->size; ++i) logs->glog[i].invalid = logs->glog[i].processed = 0; } /* Allocate memory for a new Logs and GLog instance. * * On success, the newly allocated Logs is returned . */ Logs * new_logs (int size) { Logs *logs = xmalloc (sizeof (*logs)); memset (logs, 0, sizeof *logs); logs->glog = xcalloc (size, sizeof (GLog)); logs->size = size; logs->idx = 0; return logs; } /* Allocate, initialize and add the given filename to our logs structure. * * On error, 1 is returned. * On success, the given filename is added to the Logs structure and 0 is * returned. */ int set_glog (Logs *logs, const char *filename) { GLog *tmp = NULL, *glog = NULL; int newlen = 0; char const *err; char *fvh = NULL, *fn = NULL; if (logs->size - 1 < logs->idx) { newlen = logs->size + 1; if (!(tmp = xrealloc (logs->glog, newlen * sizeof (GLog)))) return ERR_LOG_REALLOC_FAILURE; logs->glog = tmp; memset (logs->glog + logs->idx, 0, (logs->idx + 1 - logs->size) * sizeof *logs->glog); logs->size = newlen; } fn = xstrdup (filename); /* ensure fn is a string */ glog = logs->glog; glog[logs->idx].errors = xcalloc (MAX_LOG_ERRORS, sizeof (char *)); glog[logs->idx].props.filename = xstrdup (fn); glog[logs->idx].props.fname = xstrdup (basename (fn)); if (!glog->pipe && conf.fname_as_vhost) { if (!(fvh = regex_extract_string (glog[logs->idx].props.fname, conf.fname_as_vhost, 1, &err))) FATAL ("%s %s[%s]", err, glog[logs->idx].props.fname, conf.fname_as_vhost); glog[logs->idx].fname_as_vhost = fvh; } logs->processed = &(glog[logs->idx].processed); logs->filename = glog[logs->idx].props.filename; logs->idx++; free (fn); return 0; } /* Ensure the given filename is part of our original list of files. * * On error, 1 is returned. * On success, the given filename is added to the Logs structure and 0 is * returned. */ int set_log (Logs *logs, const char *value) { if (str_inarray (value, conf.filenames, conf.filenames_idx) < 0) return ERR_LOG_NOT_FOUND; return set_glog (logs, value); } /* Allocate memory for a new set of Logs including a GLog instance. * * On success, the newly allocated Logs is returned . */ Logs * init_logs (int size) { Logs *logs = NULL; GLog *glog = NULL; int i = 0, ret = 0; /* if no logs no a pipe nor restoring, nothing to do then */ if (!size && !conf.restore) return NULL; /* If no logs nor a pipe but restoring, we still need an minimal instance of * logs and a glog */ if (!size) { logs = xcalloc (1, sizeof (*logs)); logs->glog = xcalloc (1, sizeof (*glog)); logs->processed = &(logs->glog[0].processed); return logs; } logs = new_logs (size); logs->size = size; for (i = 0; i < size; ++i) { if ((ret = set_log (logs, conf.filenames[i]))) FATAL ("%s\n", ERR_LOG_NOT_FOUND_MSG); } return logs; } /* Free all log errors stored during parsing. */ void free_logerrors (GLog *glog) { int i; if (!glog->log_erridx) return; for (i = 0; i < glog->log_erridx; ++i) free (glog->errors[i]); glog->log_erridx = 0; } /* Free all log containers. */ void free_logs (Logs *logs) { GLog *glog = NULL; int i; for (i = 0; i < logs->size; ++i) { glog = &logs->glog[i]; free (glog->props.filename); free (glog->props.fname); free (glog->fname_as_vhost); free_logerrors (glog); free (glog->errors); if (glog->pipe) { fclose (glog->pipe); } } free (logs->glog); free (logs); } /* Initialize a new GLogItem instance. * * On success, the new GLogItem instance is returned. */ GLogItem * init_log_item (GLog *glog) { GLogItem *logitem; logitem = xmalloc (sizeof (GLogItem)); memset (logitem, 0, sizeof *logitem); logitem->agent = NULL; logitem->browser = NULL; logitem->browser_type = NULL; logitem->continent = NULL; logitem->asn = NULL; logitem->country = NULL; logitem->date = NULL; logitem->errstr = NULL; logitem->host = NULL; logitem->keyphrase = NULL; logitem->method = NULL; logitem->os = NULL; logitem->os_type = NULL; logitem->protocol = NULL; logitem->qstr = NULL; logitem->ref = NULL; logitem->req_key = NULL; logitem->req = NULL; logitem->resp_size = 0LL; logitem->serve_time = 0; logitem->status = -1; logitem->time = NULL; logitem->uniq_key = NULL; logitem->vhost = NULL; logitem->userid = NULL; logitem->cache_status = NULL; /* UMS */ logitem->mime_type = NULL; logitem->tls_type = NULL; logitem->tls_cypher = NULL; logitem->tls_type_cypher = NULL; memset (logitem->site, 0, sizeof (logitem->site)); memset (logitem->agent_hex, 0, sizeof (logitem->agent_hex)); logitem->dt = glog->start_time; return logitem; } /* Free all members of a GLogItem */ void free_glog (GLogItem *logitem) { if (logitem->agent != NULL) free (logitem->agent); if (logitem->browser != NULL) free (logitem->browser); if (logitem->browser_type != NULL) free (logitem->browser_type); if (logitem->continent != NULL) free (logitem->continent); if (logitem->asn != NULL) free (logitem->asn); if (logitem->country != NULL) free (logitem->country); if (logitem->date != NULL) free (logitem->date); if (logitem->errstr != NULL) free (logitem->errstr); if (logitem->host != NULL) free (logitem->host); if (logitem->keyphrase != NULL) free (logitem->keyphrase); if (logitem->method != NULL) free (logitem->method); if (logitem->os != NULL) free (logitem->os); if (logitem->os_type != NULL) free (logitem->os_type); if (logitem->protocol != NULL) free (logitem->protocol); if (logitem->qstr != NULL) free (logitem->qstr); if (logitem->ref != NULL) free (logitem->ref); if (logitem->req_key != NULL) free (logitem->req_key); if (logitem->req != NULL) free (logitem->req); if (logitem->time != NULL) free (logitem->time); if (logitem->uniq_key != NULL) free (logitem->uniq_key); if (logitem->userid != NULL) free (logitem->userid); if (logitem->cache_status != NULL) free (logitem->cache_status); if (logitem->vhost != NULL) free (logitem->vhost); if (logitem->mime_type != NULL) free (logitem->mime_type); if (logitem->tls_type != NULL) free (logitem->tls_type); if (logitem->tls_cypher != NULL) free (logitem->tls_cypher); if (logitem->tls_type_cypher != NULL) free (logitem->tls_type_cypher); free (logitem); } /* Decodes the given URL-encoded string. * * On success, the decoded string is assigned to the output buffer. */ #define B16210(x) (((x) >= '0' && (x) <= '9') ? ((x) - '0') : (toupper((unsigned char) (x)) - 'A' + 10)) static void decode_hex (char *url, char *out) { char *ptr; const char *c; for (c = url, ptr = out; *c; c++) { if (*c != '%' || !isxdigit ((unsigned char) c[1]) || !isxdigit ((unsigned char) c[2])) { *ptr++ = *c; } else { *ptr++ = (char) ((B16210 (c[1]) * 16) + (B16210 (c[2]))); c += 2; } } *ptr = 0; } /* Entry point to decode the given URL-encoded string. * * On success, the decoded trimmed string is assigned to the output * buffer. */ static char * decode_url (char *url) { char *out, *decoded; if ((url == NULL) || (*url == '\0')) return NULL; out = decoded = xstrdup (url); decode_hex (url, out); /* double encoded URL? */ if (conf.double_decode) decode_hex (decoded, out); strip_newlines (out); return trim_str (out); } /* Process keyphrases from Google search, cache, and translate. * Note that the referer hasn't been decoded at the entry point * since there could be '&' within the search query. * * On error, 1 is returned. * On success, the extracted keyphrase is assigned and 0 is returned. */ static int extract_keyphrase (char *ref, char **keyphrase) { char *r, *ptr, *pch, *referer; int encoded = 0; if (!(strstr (ref, "http://www.google.")) && !(strstr (ref, "http://webcache.googleusercontent.com/")) && !(strstr (ref, "http://translate.googleusercontent.com/")) && !(strstr (ref, "https://www.google.")) && !(strstr (ref, "https://webcache.googleusercontent.com/")) && !(strstr (ref, "https://translate.googleusercontent.com/"))) return 1; /* webcache.googleusercontent */ if ((r = strstr (ref, "/+&")) != NULL) return 1; /* webcache.googleusercontent */ else if ((r = strstr (ref, "/+")) != NULL) r += 2; /* webcache.googleusercontent */ else if ((r = strstr (ref, "q=cache:")) != NULL) { pch = strchr (r, '+'); if (pch) r += pch - r + 1; } /* www.google.* or translate.googleusercontent */ else if ((r = strstr (ref, "&q=")) != NULL || (r = strstr (ref, "?q=")) != NULL) r += 3; else if ((r = strstr (ref, "%26q%3D")) != NULL || (r = strstr (ref, "%3Fq%3D")) != NULL) encoded = 1, r += 7; else return 1; if (!encoded && (ptr = strchr (r, '&')) != NULL) *ptr = '\0'; else if (encoded && (ptr = strstr (r, "%26")) != NULL) *ptr = '\0'; referer = decode_url (r); if (referer == NULL || *referer == '\0') { free (referer); return 1; } referer = char_replace (referer, '+', ' '); *keyphrase = trim_str (referer); return 0; } /* Parse a URI and extracts the *host* part from it * i.e., //www.example.com/path?googleguy > www.example.com * * On error, 1 is returned. * On success, the extracted referer is set and 0 is returned. */ static int extract_referer_site (const char *referer, char *host) { char *url, *begin, *end; int len = 0; if ((referer == NULL) || (*referer == '\0')) return 1; url = strdup (referer); if ((begin = strstr (url, "//")) == NULL) goto clean; begin += 2; if ((len = strlen (begin)) == 0) goto clean; if ((end = strpbrk (begin, "/?")) != NULL) len = end - begin; if (len == 0) goto clean; if (len >= REF_SITE_LEN) len = REF_SITE_LEN; memcpy (host, begin, len); host[len] = '\0'; free (url); return 0; clean: free (url); return 1; } /* Determine if the given request is static (e.g., jpg, css, js, etc). * * On error, or if not static, 0 is returned. * On success, the 1 is returned. */ static int verify_static_content (const char *req) { const char *nul = NULL; const char *ext = NULL, *pch = NULL; int elen = 0, i; if ((req == NULL) || (*req == '\0')) return 0; nul = req + strlen (req); for (i = 0; i < conf.static_file_idx; ++i) { ext = conf.static_files[i]; if (ext == NULL || *ext == '\0') continue; elen = strlen (ext); if (conf.all_static_files && (pch = strchr (req, '?')) != NULL && pch - req > elen) { pch -= elen; if (0 == strncasecmp (ext, pch, elen)) return 1; continue; } if (nul - req > elen && !strncasecmp (nul - elen, ext, elen)) return 1; } return 0; } /* Extract the HTTP method. * * On error, or if not found, NULL is returned. * On success, the HTTP method is returned. */ static const char * extract_method (const char *token) { size_t i; for (i = 0; i < http_methods_len; i++) { if (strncasecmp (token, http_methods[i].method, http_methods[i].len) == 0) { return http_methods[i].method; } } return NULL; } static int is_cache_hit (const char *tkn) { if (strcasecmp ("MISS", tkn) == 0) return 1; else if (strcasecmp ("BYPASS", tkn) == 0) return 1; else if (strcasecmp ("EXPIRED", tkn) == 0) return 1; else if (strcasecmp ("STALE", tkn) == 0) return 1; else if (strcasecmp ("UPDATING", tkn) == 0) return 1; else if (strcasecmp ("REVALIDATED", tkn) == 0) return 1; else if (strcasecmp ("HIT", tkn) == 0) return 1; return 0; } /* Determine if the given token is a valid HTTP protocol. * * If not valid, 1 is returned. * If valid, 0 is returned. */ static const char * extract_protocol (const char *token) { size_t i; for (i = 0; i < http_protocols_len; i++) { if (strncasecmp (token, http_protocols[i].protocol, http_protocols[i].len) == 0) { return http_protocols[i].protocol; } } return NULL; } /* Parse a request containing the method and protocol. * * On error, or unable to parse, NULL is returned. * On success, the HTTP request is returned and the method and * protocol are assigned to the corresponding buffers. */ static char * parse_req (char *line, char **method, char **protocol) { char *req = NULL, *request = NULL, *dreq = NULL, *ptr = NULL; const char *meth, *proto; ptrdiff_t rlen; meth = extract_method (line); /* couldn't find a method, so use the whole request line */ if (meth == NULL) { request = xstrdup (line); } /* method found, attempt to parse request */ else { req = line + strlen (meth); if (!(ptr = strrchr (req, ' ')) || !(proto = extract_protocol (++ptr))) return alloc_string ("-"); req++; if ((rlen = ptr - req) <= 0) return alloc_string ("-"); request = xmalloc (rlen + 1); strncpy (request, req, rlen); request[rlen] = 0; if (conf.append_method) (*method) = strtoupper (xstrdup (meth)); if (conf.append_protocol) (*protocol) = strtoupper (xstrdup (proto)); } if (!(dreq = decode_url (request))) return request; else if (*dreq == '\0') { free (dreq); return request; } free (request); return dreq; } #if defined(HAVE_LIBSSL) && defined(HAVE_CIPHER_STD_NAME) static int extract_tls_version_cipher (char *tkn, char **cipher, char **tls_version) { SSL_CTX *ctx = NULL; SSL *ssl = NULL; int code = 0; unsigned short code_be; unsigned char cipherid[3]; const SSL_CIPHER *c = NULL; char *bEnd; const char *sn = NULL; code = strtoull (tkn, &bEnd, 10); if (tkn == bEnd || *bEnd != '\0' || errno == ERANGE) { LOG_DEBUG (("unable to convert cipher code to a valid decimal.")); goto fail; } /* ssl context */ if (!(ctx = SSL_CTX_new (SSLv23_server_method ()))) { LOG_DEBUG (("Unable to create a new SSL_CTX_new to extract TLS.")); goto fail; } if (!(ssl = SSL_new (ctx))) { LOG_DEBUG (("Unable to create a new instance of SSL_new to extract TLS.")); goto fail; } code_be = htobe16 (code); memcpy (cipherid, &code_be, 2); cipherid[2] = 0; if (!(c = SSL_CIPHER_find (ssl, cipherid))) { LOG_DEBUG (("Unable to find cipher to extract TLS.")); goto fail; } if (!(sn = SSL_CIPHER_standard_name (c))) { LOG_DEBUG (("Unable to get cipher standard name to extract TLS.")); goto fail; } *cipher = xstrdup (sn); *tls_version = xstrdup (SSL_CIPHER_get_version (c)); free (tkn); SSL_free (ssl); SSL_CTX_free (ctx); return 0; fail: free (tkn); if (ssl) SSL_free (ssl); if (ctx) SSL_CTX_free (ctx); return 1; } #endif /* Extract the next delimiter given a log format and copy the delimiter to the * destination buffer. * * On error, the dest buffer will be empty. * On success, the delimiter(s) are stored in the dest buffer. */ static void get_delim (char *dest, const char *p) { /* done, nothing to do */ if (p[0] == '\0' || p[1] == '\0') { dest[0] = '\0'; return; } /* add the first delim */ dest[0] = *(p + 1); } /* Extract and malloc a token given the parsed rule. * * On success, the malloc'd token is returned. */ static char * parsed_string (const char *pch, const char **str, int move_ptr) { char *p; size_t len = (pch - *str + 1); p = xmalloc (len); memcpy (p, *str, (len - 1)); p[len - 1] = '\0'; if (move_ptr) *str += len - 1; return trim_str (p); } /* Find and extract a token given a log format rule. * * On error, or unable to parse it, NULL is returned. * On success, the malloc'd token is returned. */ static char * parse_string (const char **str, const char *delims, int cnt) { int idx = 0; const char *pch = *str, *p = NULL; char end; if ((*delims != 0x0) && (p = strpbrk (*str, delims)) == NULL) return NULL; end = !*delims ? 0x0 : *p; do { /* match number of delims */ if (*pch == end) idx++; /* delim found, parse string then */ if ((*pch == end && cnt == idx) || *pch == '\0') return parsed_string (pch, str, 1); /* advance to the first unescaped delim */ if (*pch == '\\') pch++; } while (*pch++); return NULL; } char * extract_by_delim (const char **str, const char *end) { return parse_string (&(*str), end, 1); } /* Move forward through the log string until a non-space (!isspace) * char is found. */ static void find_alpha (const char **str) { const char *s = *str; while (*s) { if (isspace ((unsigned char) *s)) s++; else break; } *str += s - *str; } /* Move forward through the log string until a non-space (!isspace) * char is found and returns the count. */ static int find_alpha_count (const char *str) { int cnt = 0; const char *s = str; while (*s) { if (isspace ((unsigned char) *s)) s++, cnt++; else break; } return cnt; } /* Format the broken-down time tm to a numeric date format. * * On error, or unable to format the given tm, 1 is returned. * On success, a malloc'd format is returned. */ #pragma GCC diagnostic ignored "-Wformat-nonliteral" static int set_date (char **fdate, struct tm tm) { char buf[DATE_LEN] = ""; /* Ymd */ memset (buf, 0, sizeof (buf)); if (strftime (buf, DATE_LEN, conf.date_num_format, &tm) <= 0) return 1; *fdate = xstrdup (buf); return 0; } /* Format the broken-down time tm to a numeric time format. * * On error, or unable to format the given tm, 1 is returned. * On success, a malloc'd format is returned. */ static int set_time (char **ftime, struct tm tm) { char buf[TIME_LEN] = ""; memset (buf, 0, sizeof (buf)); if (strftime (buf, TIME_LEN, "%H:%M:%S", &tm) <= 0) return 1; *ftime = xstrdup (buf); return 0; } /* Determine the parsing specifier error and construct a message out * of it. * * On success, a malloc'd error message is assigned to the log * structure and 1 is returned. */ static int spec_err (GLogItem *logitem, int code, const char spec, const char *tkn) { char *err = NULL; const char *fmt = NULL; switch (code) { case ERR_SPEC_TOKN_NUL: fmt = "Token for '%%%c' specifier is NULL."; err = xmalloc (snprintf (NULL, 0, fmt, spec) + 1); sprintf (err, fmt, spec); break; case ERR_SPEC_TOKN_INV: fmt = "Token '%s' doesn't match specifier '%%%c'"; err = xmalloc (snprintf (NULL, 0, fmt, (tkn ? tkn : "-"), spec) + 1); sprintf (err, fmt, (tkn ? tkn : "-"), spec); break; case ERR_SPEC_SFMT_MIS: fmt = "Missing braces '%s' and ignore chars for specifier '%%%c'"; err = xmalloc (snprintf (NULL, 0, fmt, (tkn ? tkn : "-"), spec) + 1); sprintf (err, fmt, (tkn ? tkn : "-"), spec); break; case ERR_SPEC_LINE_INV: fmt = "Incompatible format due to early parsed line ending '\\0'."; err = xmalloc (snprintf (NULL, 0, fmt, (tkn ? tkn : "-")) + 1); sprintf (err, fmt, (tkn ? tkn : "-")); break; } logitem->errstr = err; return code; } static void set_tm_dt_logitem (GLogItem *logitem, struct tm tm) { logitem->dt.tm_year = tm.tm_year; logitem->dt.tm_mon = tm.tm_mon; logitem->dt.tm_mday = tm.tm_mday; } static void set_tm_tm_logitem (GLogItem *logitem, struct tm tm) { logitem->dt.tm_hour = tm.tm_hour; logitem->dt.tm_min = tm.tm_min; logitem->dt.tm_sec = tm.tm_sec; } static void set_numeric_date (uint32_t *numdate, const char *date) { int res = 0; if ((res = str2int (date)) == -1) FATAL ("Unable to parse date to integer %s", date); *numdate = res; } static void set_agent_hash (GLogItem *logitem) { logitem->agent_hash = djb2 ((unsigned char *) logitem->agent); sprintf (logitem->agent_hex, "%" PRIx32, logitem->agent_hash); } static int handle_default_case_token (const char **str, const char *p) { char *pch = NULL; if ((pch = strchr (*str, p[1])) != NULL) *str += pch - *str; return 0; } #pragma GCC diagnostic warning "-Wformat-nonliteral" /* Parse the log string given log format rule. * * On error, or unable to parse it, 1 is returned. * On success, the malloc'd token is assigned to a GLogItem member. */ static int parse_specifier (GLogItem *logitem, const char **str, const char *p, const char *end) { struct tm tm; const char *dfmt = conf.date_format; const char *tfmt = conf.time_format; char *pch, *sEnd, *bEnd, *tkn = NULL; double serve_secs = 0.0; uint64_t bandw = 0, serve_time = 0; int dspc = 0, fmtspcs = 0; errno = 0; memset (&tm, 0, sizeof (tm)); tm.tm_isdst = -1; tm = logitem->dt; switch (*p) { /* date */ case 'd': if (logitem->date) return handle_default_case_token (str, p); /* Attempt to parse date format containing spaces, * i.e., syslog date format (Jul\s15, Nov\s\s2). * Note that it's possible a date could contain some padding, e.g., * Dec\s\s2 vs Nov\s22, so we attempt to take that into consideration by looking * ahead the log string and counting the # of spaces until we find an alphanum char. */ if ((fmtspcs = count_matches (dfmt, ' ')) && (pch = strchr (*str, ' '))) dspc = find_alpha_count (pch); if (!(tkn = parse_string (&(*str), end, MAX (dspc, fmtspcs) + 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); if (str_to_time (tkn, dfmt, &tm, 1) != 0 || set_date (&logitem->date, tm) != 0) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } set_numeric_date (&logitem->numdate, logitem->date); set_tm_dt_logitem (logitem, tm); free (tkn); break; /* time */ case 't': if (logitem->time) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); if (str_to_time (tkn, tfmt, &tm, 1) != 0 || set_time (&logitem->time, tm) != 0) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } set_tm_tm_logitem (logitem, tm); free (tkn); break; /* date/time as decimal, i.e., timestamps, ms/us */ case 'x': if (logitem->time && logitem->date) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); if (str_to_time (tkn, tfmt, &tm, 1) != 0 || set_date (&logitem->date, tm) != 0 || set_time (&logitem->time, tm) != 0) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } set_numeric_date (&logitem->numdate, logitem->date); set_tm_dt_logitem (logitem, tm); set_tm_tm_logitem (logitem, tm); free (tkn); break; /* Virtual Host */ case 'v': if (logitem->vhost) return handle_default_case_token (str, p); tkn = parse_string (&(*str), end, 1); if (tkn == NULL) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); logitem->vhost = tkn; break; /* remote user */ case 'e': if (logitem->userid) return handle_default_case_token (str, p); tkn = parse_string (&(*str), end, 1); if (tkn == NULL) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); logitem->userid = tkn; break; /* cache status */ case 'C': if (logitem->cache_status) return handle_default_case_token (str, p); tkn = parse_string (&(*str), end, 1); if (tkn == NULL) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); if (is_cache_hit (tkn)) logitem->cache_status = tkn; else free (tkn); break; /* remote hostname (IP only) */ case 'h': if (logitem->host) return handle_default_case_token (str, p); /* per https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2 */ /* square brackets are possible */ if (*str[0] == '[' && (*str += 1) && **str) end = "]"; if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); if (!conf.no_ip_validation && invalid_ipaddr (tkn, &logitem->type_ip)) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } /* require a valid host token (e.g., ord38s18-in-f14.1e100.net) even when we're * not validating the IP */ if (conf.no_ip_validation && *tkn == '\0') { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } logitem->host = tkn; break; /* request method */ case 'm': if (logitem->method) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); { const char *meth = NULL; if (!(meth = extract_method (tkn))) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } logitem->method = xstrdup (meth); free (tkn); } break; /* request not including method or protocol */ case 'U': if (logitem->req) return handle_default_case_token (str, p); tkn = parse_string (&(*str), end, 1); if (tkn == NULL || *tkn == '\0') { free (tkn); return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); } if ((logitem->req = decode_url (tkn)) == NULL) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } free (tkn); break; /* query string alone, e.g., ?param=goaccess&tbm=shop */ case 'q': if (logitem->qstr) return handle_default_case_token (str, p); tkn = parse_string (&(*str), end, 1); if (tkn == NULL || *tkn == '\0') { free (tkn); return 0; } if ((logitem->qstr = decode_url (tkn)) == NULL) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } free (tkn); break; /* request protocol */ case 'H': if (logitem->protocol) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); { const char *proto = NULL; if (!(proto = extract_protocol (tkn))) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } logitem->protocol = xstrdup (proto); free (tkn); } break; /* request, including method + protocol */ case 'r': if (logitem->req) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); logitem->req = parse_req (tkn, &logitem->method, &logitem->protocol); free (tkn); break; /* Status Code */ case 's': if (logitem->status >= 0) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); logitem->status = strtol (tkn, &sEnd, 10); if (tkn == sEnd || *sEnd != '\0' || errno == ERANGE || (!conf.no_strict_status && !is_valid_http_status (logitem->status))) { spec_err (logitem, ERR_SPEC_TOKN_INV, *p, tkn); free (tkn); return 1; } free (tkn); break; /* size of response in bytes - excluding HTTP headers */ case 'b': if (logitem->resp_size) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); bandw = strtoull (tkn, &bEnd, 10); if (tkn == bEnd || *bEnd != '\0' || errno == ERANGE) bandw = 0; logitem->resp_size = bandw; __sync_bool_compare_and_swap (&conf.bandwidth, 0, 1); /* set flag */ free (tkn); break; /* referrer */ case 'R': if (logitem->ref) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) tkn = alloc_string ("-"); if (*tkn == '\0') { free (tkn); tkn = alloc_string ("-"); } if (strcmp (tkn, "-") != 0) { extract_keyphrase (tkn, &logitem->keyphrase); extract_referer_site (tkn, logitem->site); /* hide referrers from report */ if (hide_referer (logitem->site)) { logitem->site[0] = '\0'; free (tkn); } else logitem->ref = tkn; break; } logitem->ref = tkn; break; /* user agent */ case 'u': if (logitem->agent) return handle_default_case_token (str, p); tkn = parse_string (&(*str), end, 1); if (tkn != NULL && *tkn != '\0') { /* Make sure the user agent is decoded (i.e.: CloudFront) */ logitem->agent = decode_url (tkn); set_browser_os (logitem); set_agent_hash (logitem); free (tkn); break; } else if (tkn != NULL && *tkn == '\0') { free (tkn); tkn = alloc_string ("-"); } /* must be null */ else { tkn = alloc_string ("-"); } logitem->agent = tkn; set_agent_hash (logitem); break; /* time taken to serve the request, in milliseconds as a decimal number */ case 'L': /* ignore it if we already have served time */ if (logitem->serve_time) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); serve_secs = strtoull (tkn, &bEnd, 10); if (tkn == bEnd || *bEnd != '\0' || errno == ERANGE) serve_secs = 0; /* convert it to microseconds */ logitem->serve_time = (serve_secs > 0) ? serve_secs * MILS : 0; /* Determine if time-served data was stored on-disk. */ __sync_bool_compare_and_swap (&conf.serve_usecs, 0, 1); /* set flag */ free (tkn); break; /* time taken to serve the request, in seconds with a milliseconds * resolution */ case 'T': /* ignore it if we already have served time */ if (logitem->serve_time) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); if (strchr (tkn, '.') != NULL) serve_secs = strtod (tkn, &bEnd); else serve_secs = strtoull (tkn, &bEnd, 10); if (tkn == bEnd || *bEnd != '\0' || errno == ERANGE) serve_secs = 0; /* convert it to microseconds */ logitem->serve_time = (serve_secs > 0) ? serve_secs * SECS : 0; /* Determine if time-served data was stored on-disk. */ __sync_bool_compare_and_swap (&conf.serve_usecs, 0, 1); /* set flag */ free (tkn); break; /* time taken to serve the request, in microseconds */ case 'D': /* ignore it if we already have served time */ if (logitem->serve_time) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); serve_time = strtoull (tkn, &bEnd, 10); if (tkn == bEnd || *bEnd != '\0' || errno == ERANGE) serve_time = 0; logitem->serve_time = serve_time; /* Determine if time-served data was stored on-disk. */ __sync_bool_compare_and_swap (&conf.serve_usecs, 0, 1); /* set flag */ free (tkn); break; /* time taken to serve the request, in nanoseconds */ case 'n': /* ignore it if we already have served time */ if (logitem->serve_time) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); serve_time = strtoull (tkn, &bEnd, 10); if (tkn == bEnd || *bEnd != '\0' || errno == ERANGE) serve_time = 0; /* convert it to microseconds */ logitem->serve_time = (serve_time > 0) ? serve_time / MILS : 0; /* Determine if time-served data was stored on-disk. */ __sync_bool_compare_and_swap (&conf.serve_usecs, 0, 1); /* set flag */ free (tkn); break; /* UMS: Krypto (TLS) "ECDHE-RSA-AES128-GCM-SHA256" */ case 'k': /* error to set this twice */ if (logitem->tls_cypher) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); #if defined(HAVE_LIBSSL) && defined(HAVE_CIPHER_STD_NAME) { char *tmp = NULL; for (tmp = tkn; isdigit ((unsigned char) *tmp); tmp++); if (!strlen (tmp)) extract_tls_version_cipher (tkn, &logitem->tls_cypher, &logitem->tls_type); else logitem->tls_cypher = tkn; } #else logitem->tls_cypher = tkn; #endif break; /* UMS: Krypto (TLS) parameters like "TLSv1.2" */ case 'K': /* error to set this twice */ if (logitem->tls_type) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); logitem->tls_type = tkn; break; /* UMS: Mime-Type like "text/html" */ case 'M': /* error to set this twice */ if (logitem->mime_type) return handle_default_case_token (str, p); if (!(tkn = parse_string (&(*str), end, 1))) return spec_err (logitem, ERR_SPEC_TOKN_NUL, *p, NULL); logitem->mime_type = tkn; break; /* move forward through str until not a space */ case '~': find_alpha (&(*str)); break; /* everything else skip it */ default: handle_default_case_token (str, p); } return 0; } /* Parse the special host specifier and extract the characters that * need to be rejected when attempting to parse the XFF field. * * If no unable to find both curly braces (boundaries), NULL is returned. * On success, the malloc'd reject set is returned. */ static char * extract_braces (const char **p) { const char *b1 = NULL, *b2 = NULL, *s = *p; char *ret = NULL; int esc = 0; ptrdiff_t len = 0; /* iterate over the log format */ for (; *s; s++) { if (*s == '\\') { esc = 1; } else if (*s == '{' && !esc) { b1 = s; } else if (*s == '}' && !esc) { b2 = s; break; } else { esc = 0; } } if ((!b1) || (!b2)) return NULL; if ((len = b2 - (b1 + 1)) <= 0) return NULL; /* Found braces, extract 'reject' character set. */ ret = xmalloc (len + 1); memcpy (ret, b1 + 1, len); ret[len] = '\0'; (*p) = b2 + 1; return ret; } /* Attempt to extract the client IP from an X-Forwarded-For (XFF) field. * * If no IP is found, 1 is returned. * On success, the malloc'd token is assigned to a GLogItem->host and * 0 is returned. */ static int set_xff_host (GLogItem *logitem, const char *str, const char *skips, int out) { const char *ptr = NULL, *tkn = NULL; int invalid_ip = 1, len = 0, type_ip = TYPE_IPINV; int idx = 0, skips_len = 0; skips_len = strlen (skips); ptr = str; while (*ptr != '\0') { if ((len = strcspn (ptr, skips)) == 0) { len++, ptr++, idx++; goto move; } /* If our index does not match the number of delimiters and we have already a * valid client IP, then we assume we have reached the length of the XFF */ if (idx < skips_len && logitem->host) break; ptr += len; /* extract possible IP */ if (!(tkn = parsed_string (ptr, &str, 0))) break; invalid_ip = invalid_ipaddr (tkn, &type_ip); /* done, already have IP and current token is not a host */ if (logitem->host && invalid_ip) { free ((void *) tkn); break; } if (!logitem->host && !invalid_ip) { logitem->host = xstrdup (tkn); logitem->type_ip = type_ip; } free ((void *) tkn); idx = 0; /* found the client IP, break then */ if (logitem->host && out) break; move: str += len; } return logitem->host == NULL; } /* Attempt to find possible delimiters in the X-Forwarded-For (XFF) field. * * If no IP is found, 1 is returned. * On success, the malloc'd token is assigned to a GLogItem->host and 0 is returned. */ static int find_xff_host (GLogItem *logitem, const char **str, const char **p) { char *skips = NULL, *extract = NULL; char pch[2] = { 0 }; int res = 0; if (!(skips = extract_braces (p))) return spec_err (logitem, ERR_SPEC_SFMT_MIS, **p, "{}"); /* if the log format current char is not within the braces special chars, then * we assume the range of IPs are within hard delimiters */ if (!strchr (skips, **p) && strchr (*str, **p)) { *pch = **p; *(pch + 1) = '\0'; if (!(extract = parse_string (&(*str), pch, 1))) goto clean; res = set_xff_host (logitem, extract, skips, 1); free (extract); (*str)++; /* move a char forward from the trailing delim */ } else { res = set_xff_host (logitem, *str, skips, 0); } clean: free (skips); return res; } /* Handle special specifiers. * * On error, or unable to parse it, 1 is returned. * On success, the malloc'd token is assigned to a GLogItem member and * 0 is returned. */ static int special_specifier (GLogItem *logitem, const char **str, const char **p) { switch (**p) { /* XFF remote hostname (IP only) */ case 'h': if (find_xff_host (logitem, str, p)) return spec_err (logitem, ERR_SPEC_TOKN_NUL, 'h', NULL); break; } return 0; } /* Iterate over the given log format. * * On error, or unable to parse it, 1 is returned. * On success, the malloc'd token is assigned to a GLogItem member and * 0 is returned. */ static int parse_format (GLogItem *logitem, const char *str, const char *lfmt) { char end[2 + 1] = { 0 }; const char *p = NULL, *last = NULL; int perc = 0, tilde = 0, ret = 0; if (str == NULL || *str == '\0') return 1; /* iterate over the log format */ last = lfmt + strlen (lfmt); for (p = lfmt; p < last; p++) { if (*p == '%') { perc++; continue; } if (*p == '~' && perc == 0) { tilde++; continue; } if (*str == '\0') return spec_err (logitem, ERR_SPEC_LINE_INV, '-', NULL); if (*str == '\n') return 0; if (tilde && *p != '\0') { if (*str == '\0') return 0; if (special_specifier (logitem, &str, &p) == 1) return 1; tilde = 0; } /* %h */ else if (perc && *p != '\0') { if (*str == '\0') return 0; memset (end, 0, sizeof end); get_delim (end, p); /* attempt to parse format specifiers */ if ((ret = parse_specifier (logitem, &str, p, end))) return ret; perc = 0; } else if (perc && isspace ((unsigned char) p[0])) { return 1; } else { str++; } } return 0; } /* Determine if the log string is valid and if it's not a comment. * * On error, or invalid, 1 is returned. * On success, or valid line, 0 is returned. */ static int valid_line (char *line) { /* invalid line */ if ((line == NULL) || (*line == '\0')) return 1; /* ignore comments */ if (*line == '#' || *line == '\n') return 1; return 0; } /* Ignore request's query string. e.g., * /index.php?timestamp=1454385289 */ static void strip_qstring (char *req) { char *qmark; if ((qmark = strchr (req, '?')) != NULL) { if ((qmark - req) > 0) *qmark = '\0'; } } /* Output all log errors stored during parsing. */ void output_logerrors (void) { Logs *logs = get_db_logs (DB_INSTANCE); GLog *glog = NULL; int pid = getpid (), i; for (i = 0; i < logs->size; ++i) { glog = &logs->glog[i]; if (!glog->log_erridx) continue; fprintf (stderr, "==%d== GoAccess - version %s - %s %s\n", pid, GO_VERSION, __DATE__, __TIME__); fprintf (stderr, "==%d== Config file: %s\n", pid, conf.iconfigfile ? : NO_CONFIG_FILE); fprintf (stderr, "==%d== https://goaccess.io - \n", pid); fprintf (stderr, "==%d== Released under the MIT License.\n", pid); fprintf (stderr, "==%d==\n", pid); fprintf (stderr, "==%d== FILE: %s\n", pid, glog->props.filename); fprintf (stderr, "==%d== ", pid); fprintf (stderr, ERR_PARSED_NLINES, glog->log_erridx); fprintf (stderr, " %s:\n", ERR_PARSED_NLINES_DESC); fprintf (stderr, "==%d==\n", pid); for (i = 0; i < glog->log_erridx; ++i) fprintf (stderr, "==%d== %s\n", pid, glog->errors[i]); } fprintf (stderr, "==%d==\n", pid); fprintf (stderr, "==%d== %s\n", pid, ERR_FORMAT_HEADER); } /* Ensure we have the following fields. */ static int verify_missing_fields (GLogItem *logitem) { /* must have the following fields */ if (logitem->host == NULL) logitem->errstr = xstrdup ("IPv4/6 is required."); else if (logitem->date == NULL) logitem->errstr = xstrdup ("A valid date is required."); else if (logitem->req == NULL) logitem->errstr = xstrdup ("A request is required."); return logitem->errstr != NULL; } /* Determine if the request is from a robot or spider and check if we * need to ignore or show crawlers only. * * If the request line is not ignored, 0 is returned. * If the request line is ignored, 1 is returned. */ static int handle_crawler (const char *agent) { int bot = 0; if (!conf.ignore_crawlers && !conf.crawlers_only) return 1; bot = is_crawler (agent); return (conf.ignore_crawlers && bot) || (conf.crawlers_only && !bot) ? 0 : 1; } /* A wrapper function to determine if the request is static. * * If the request is not static, 0 is returned. * If the request is static, 1 is returned. */ static int is_static (const char *req) { return verify_static_content (req); } /* Determine if the request of the given status code needs to be * ignored. * * If the status code is not within the ignore-array, 0 is returned. * If the status code is within the ignore-array, 1 is returned. */ static int ignore_status_code (int status) { int i = 0; if (!status || conf.ignore_status_idx == 0) return 0; for (i = 0; i < conf.ignore_status_idx; i++) if (status == conf.ignore_status[i]) return 1; return 0; } /* Determine if static file request should be ignored * * If the request line is not ignored, 0 is returned. * If the request line is ignored, 1 is returned. */ static int ignore_static (const char *req) { if (conf.ignore_statics && is_static (req)) return 1; return 0; } /* Determine if the request status code is a 404. * * If the request is not a 404, 0 is returned. * If the request is a 404, 1 is returned. */ static int is_404 (GLogItem *logitem) { /* is this a 404? */ if (logitem->status == 404) return 1; /* treat 444 as 404? */ else if (logitem->status == 444 && conf.code444_as_404) return 1; return 0; } /* A wrapper function to determine if a log line needs to be ignored. * * If the request line is not ignored, 0 is returned. * If the request line is ignored, IGNORE_LEVEL_PANEL is returned. * If the request line is only not counted as valid, IGNORE_LEVEL_REQ is returned. */ static int ignore_line (GLogItem *logitem) { if (excluded_ip (logitem) == 0) return IGNORE_LEVEL_PANEL; if (handle_crawler (logitem->agent) == 0) return IGNORE_LEVEL_PANEL; if (ignore_referer (logitem->ref)) return IGNORE_LEVEL_PANEL; if (ignore_status_code (logitem->status)) return IGNORE_LEVEL_PANEL; if (ignore_static (logitem->req)) return conf.ignore_statics; // IGNORE_LEVEL_PANEL or IGNORE_LEVEL_REQ /* check if we need to remove the request's query string */ if (conf.ignore_qstr) strip_qstring (logitem->req); return 0; } /* The following generates a unique key to identity unique visitors. * The key is made out of the IP, date, and user agent. * Note that for readability, doing a simple snprintf/sprintf should * suffice, however, memcpy is the fastest solution * * On success the new unique visitor key is returned */ static char * get_uniq_visitor_key (GLogItem *logitem) { char *key = NULL; size_t s1, s2, s3; s1 = strlen (logitem->date); s2 = strlen (logitem->host); s3 = strlen (logitem->agent_hex); /* includes terminating null */ key = xcalloc (s1 + s2 + s3 + 3, sizeof (char)); memcpy (key, logitem->date, s1); key[s1] = '|'; memcpy (key + s1 + 1, logitem->host, s2 + 1); key[s1 + s2 + 1] = '|'; memcpy (key + s1 + s2 + 2, logitem->agent_hex, s3 + 1); return key; } /* Determine if the current log has the content from the last time it was * parsed. It does this by comparing READ_BYTES against the beginning of the * log. * * Returns 1 if the content is likely the same or no data to compare * Returns 0 if it has different content */ static int is_likely_same_log (GLog *glog, const GLastParse *lp) { size_t size = 0; if (!lp->size) return 1; /* Must be a LOG */ size = MIN (glog->snippetlen, lp->snippetlen); if (glog->snippet[0] != '\0' && lp->snippet[0] != '\0' && memcmp (glog->snippet, lp->snippet, size) == 0) return 1; return 0; } /* Determine if we should insert new record or if it's a duplicate record from * a previously persisted dataset * * Returns 1 if it thinks the record it's being restored from disk * Returns 0 if we need to parse the record */ static int should_restore_from_disk (GLog *glog) { GLastParse lp = { 0 }; if (!conf.restore) return 0; lp = ht_get_last_parse (glog->props.inode); /* No last parse timestamp, continue parsing as we got nothing to compare * against */ if (!lp.ts) return 0; /* If our current line is greater or equal (zero indexed) to the last parsed * line and have equal timestamps, then keep parsing then */ if (glog->props.inode && is_likely_same_log (glog, &lp)) { if (glog->props.size > lp.size && glog->read >= lp.line) return 0; return 1; } /* No inode (probably a pipe), prior or equal timestamps means restore from * disk (exclusive) */ if (!glog->props.inode && lp.ts >= glog->lp.ts) return 1; /* If not likely the same content, then fallback to the following checks */ /* If timestamp is greater than last parsed, read the line then */ if (glog->lp.ts > lp.ts) return 0; /* Check if current log size is smaller than the one last parsed, if it is, * it was possibly truncated and thus it may be smaller, so fallback to * timestamp even if they are equal to the last parsed timestamp */ else if (glog->props.size < lp.size && glog->lp.ts == lp.ts) return 0; /* Everything else we ignore it. For instance, if current log size is * greater than the one last parsed, or the timestamp are equal, we ignore the * request. * * **NOTE* We try to play safe here as we would rather miss a few lines * than double-count a few. */ return 1; } static void process_invalid (GLog *glog, GLogItem *logitem, const char *line) { GLastParse lp = { 0 }; /* if not restoring from disk, then count entry as proceeded and invalid */ if (!conf.restore) { count_process_and_invalid (glog, logitem, line); return; } lp = ht_get_last_parse (glog->props.inode); /* If our current line is greater or equal (zero indexed) to the last parsed * line then keep parsing then */ if (glog->props.inode && is_likely_same_log (glog, &lp)) { /* only count invalids if we're past the last parsed line */ if (glog->props.size > lp.size && glog->read >= lp.line) count_process_and_invalid (glog, logitem, line); return; } /* no timestamp to compare against, just count the invalid then */ if (!logitem->numdate) { count_process_and_invalid (glog, logitem, line); return; } /* if there's a valid timestamp, count only if greater than last parsed ts */ if ((glog->lp.ts = mktime (&logitem->dt)) == -1) return; /* check if we were able to at least parse the date/time, if no date/time * then we simply don't count the entry as proceed & invalid to attempt over * counting restored data */ if (should_restore_from_disk (glog) == 0) count_process_and_invalid (glog, logitem, line); } static int parse_json_specifier (void *ptr_data, char *key, char *str) { GLogItem *logitem = (GLogItem *) ptr_data; char *spec = NULL; int ret = 0; if (!key || !str) return 0; /* empty JSON value, e.g., {method: ""} */ if (0 == strlen (str)) return 0; if (!(spec = ht_get_json_logfmt (key))) return 0; ret = parse_format (logitem, str, spec); free (spec); return ret; } static int parse_json_format (GLogItem *logitem, char *str) { return parse_json_string (logitem, str, parse_json_specifier); } /* Atomically updates glog->lp.ts with the maximum timestamp value from * logitem->dt. * * On error (if mktime fails), returns -1. * On success, returns the updated timestamp value, which is also stored in * glog->lp.ts. */ static int atomic_lpts_update (GLog *glog, GLogItem *logitem) { int64_t oldts = 0, newts = 0; /* atomic update loop */ newts = mktime (&logitem->dt); // Get timestamp from logitem->dt while (!__sync_bool_compare_and_swap (&glog->lp.ts, oldts, newts)) { oldts = glog->lp.ts; /* Reread glog->lp.ts if CAS failed */ if (oldts >= newts) { break; /* No need to update if oldts is already greater */ } } return newts; } static int cleanup_logitem (int ret, GLogItem *logitem) { free_glog (logitem); return ret; } /* Process a line from the log and store it accordingly taking into * account multiple parsing options prior to setting data into the * corresponding data structure. * * On error, logitem->errstr will contains the error message. */ int parse_line (GLog *glog, char *line, int dry_run, GLogItem **logitem_out) { char *fmt = conf.log_format; int ret = 0; GLogItem *logitem = NULL; /* soft ignore these lines */ if (valid_line (line)) return -1; logitem = init_log_item (glog); /* Parse a line of log, and fill structure with appropriate values */ if (conf.is_json_log_format) ret = parse_json_format (logitem, line); else ret = parse_format (logitem, line, fmt); /* invalid log line (format issue) */ if (ret) { process_invalid (glog, logitem, line); return cleanup_logitem (ret, logitem); } if (!glog->piping && conf.fname_as_vhost && glog->fname_as_vhost) logitem->vhost = xstrdup (glog->fname_as_vhost); /* valid format but missing fields */ if (ret || (ret = verify_missing_fields (logitem))) { process_invalid (glog, logitem, line); return cleanup_logitem (ret, logitem); } /* From here on, valid format but possible ignoring of lines */ if (atomic_lpts_update (glog, logitem) == -1) return cleanup_logitem (ret, logitem); if (should_restore_from_disk (glog)) return cleanup_logitem (ret, logitem); count_process (glog); /* testing log only */ if (dry_run) return cleanup_logitem (ret, logitem); /* agent will be null in cases where %u is not specified */ if (logitem->agent == NULL) { logitem->agent = alloc_string ("-"); set_agent_hash (logitem); } logitem->ignorelevel = ignore_line (logitem); /* ignore line */ if (logitem->ignorelevel == IGNORE_LEVEL_PANEL) return cleanup_logitem (ret, logitem); if (is_404 (logitem)) logitem->is_404 = 1; else if (is_static (logitem->req)) logitem->is_static = 1; logitem->uniq_key = get_uniq_visitor_key (logitem); *logitem_out = logitem; return ret; } /* Entry point to process the given line from the log. * * On error, NULL is returned. * On success or soft ignores, GLogItem is returned. */ static GLogItem * read_line (GLog *glog, char *line, int *test, uint32_t *cnt, int dry_run) { GLogItem *logitem = NULL; int ret = 0; /* Begin processing the log line - in case of an invalid log format, flip * the test only if there's at least one valid record discovered during the log * format test. This condition applies solely when reading a log from the * beginning, not when tailing an ongoing log. */ if ((ret = parse_line (glog, line, dry_run, &logitem)) == 0) *test = 0; /* soft ignore these lines from parse_line */ if (ret == -1) return NULL; /* reached num of lines to test and no valid records were found, log * format is likely not matching */ if (conf.num_tests && ++(*cnt) >= conf.num_tests && *test) { uncount_processed (glog); uncount_invalid (glog); return NULL; } glog->read++; return logitem; } /* Parse chunk of lines to logitems */ static void * read_lines_thread (void *arg) { GJob *job = (GJob *) arg; int i = 0; for (i = 0; i < job->p; i++) { /* ensure we don't process more than we should when testing for log format, * else free chunk and stop processing threads */ if (!job->test || (job->test && job->cnt < conf.num_tests)) job->logitems[i] = read_line (job->glog, job->lines[i], &job->test, &job->cnt, job->dry_run); else conf.stop_processing = 1; #ifdef WITH_GETLINE free (job->lines[i]); #endif } return (void *) 0; } /* A replacement for GNU getline() to dynamically expand fgets buffer. * * On error, NULL is returned. * On success, the malloc'd line is returned. */ char * fgetline (FILE *fp) { char buf[LINE_BUFFER] = { 0 }; char *line = NULL, *tmp = NULL; size_t linelen = 0, len = 0; while (1) { if (!fgets (buf, sizeof (buf), fp)) { if (conf.process_and_exit && errno == EAGAIN) { (void) nanosleep ((const struct timespec[]) { {0, 100000000L} }, NULL); continue; } else break; } if (*buf == '\0') break; len = strlen (buf); /* overflow check */ if (SIZE_MAX - len - 1 < linelen) break; if ((tmp = realloc (line, linelen + len + 1)) == NULL) break; line = tmp; /* append */ strcpy (line + linelen, buf); linelen += len; if (feof (fp) || buf[len - 1] == '\n') return line; } free (line); return NULL; } void * process_lines_thread (void *arg) { GJob *job = (GJob *) arg; int i = 0; for (i = 0; i < job->p; i++) { if (job->logitems[i] != NULL && !job->dry_run && job->logitems[i]->errstr == NULL) { process_log (job->logitems[i]); free_glog (job->logitems[i]); } } return (void *) 0; } /* Initialize jobs */ static void init_jobs (GJob jobs[2][conf.jobs], GLog *glog, int dry_run, int test) { int b = 0, k = 0; #ifndef WITH_GETLINE int i = 0; #endif for (b = 0; b < 2; b++) { for (k = 0; k < conf.jobs; k++) { jobs[b][k].p = 0; jobs[b][k].cnt = 0; jobs[b][k].glog = glog; jobs[b][k].test = test; jobs[b][k].dry_run = dry_run; jobs[b][k].running = 0; jobs[b][k].logitems = xcalloc (conf.chunk_size, sizeof (GLogItem)); jobs[b][k].lines = xcalloc (conf.chunk_size, sizeof (char *)); #ifndef WITH_GETLINE for (i = 0; i < conf.chunk_size; i++) jobs[b][k].lines[i] = xcalloc (LINE_BUFFER, sizeof (char)); #endif } } } /* Read lines from file */ static void read_lines_from_file (FILE *fp, GLog *glog, GJob jobs[2][conf.jobs], int b, char **s) { int k = 0; for (k = 0; k < conf.jobs; k++) { #ifdef WITH_GETLINE while ((*s = fgetline (fp)) != NULL) { jobs[b][k].lines[jobs[b][k].p] = *s; #else while ((*s = fgets (jobs[b][k].lines[jobs[b][k].p], LINE_BUFFER, fp)) != NULL) { #endif glog->bytes += strlen (jobs[b][k].lines[jobs[b][k].p]); if (++(jobs[b][k].p) >= conf.chunk_size) break; // goto next chunk } } } /* Processes lines using threads from the GJob array, updating counters. */ static void process_lines (GJob jobs[2][conf.jobs], uint32_t *cnt, int *test, int b) { int k = 0; for (k = 0; k < conf.jobs; k++) { process_lines_thread (&jobs[b][k]); *cnt += jobs[b][k].cnt; jobs[b][k].cnt = 0; *test &= jobs[b][k].test; jobs[b][k].p = 0; } } /* Frees memory for lines and logitems in each job of the GJob array. */ static void free_jobs (GJob jobs[2][conf.jobs]) { int b = 0, k = 0; #ifndef WITH_GETLINE int i = 0; #endif for (b = 0; b < 2; b++) { for (k = 0; k < conf.jobs; k++) { #ifndef WITH_GETLINE for (i = 0; i < conf.chunk_size; i++) free (jobs[b][k].lines[i]); #endif free (jobs[b][k].logitems); free (jobs[b][k].lines); } } } /* Reads lines from the given file pointer `fp` and processes them using * parallel threads. * * On error or when interrupted by a signal (SIGINT), the function returns 0. * On success, it returns 1 if the number of processed lines is greater than or * equal to the configured number of tests (NUM_TESTS), otherwise 0. */ static int read_lines (FILE *fp, GLog *glog, int dry_run) { int b = 0, k = 0, test = conf.num_tests > 0 ? 1 : 0; uint32_t cnt = 0; void *status = NULL; char *s = NULL; GJob jobs[2][conf.jobs]; pthread_t threads[conf.jobs]; glog->bytes = 0; init_jobs (jobs, glog, dry_run, test); b = 0; while (1) { /* b = 0 or 1 */ read_lines_from_file (fp, glog, jobs, b, &s); /* if nothing was read from the log, skip it for now */ if (!glog->bytes) { test = 0; break; } if (conf.jobs == 1) { read_lines_thread (&jobs[b][0]); } else { for (k = 0; k < conf.jobs; k++) { jobs[b][k].running = 1; pthread_create (&threads[k], NULL, read_lines_thread, (void *) &jobs[b][k]); } } /* flip from block A/B to B/A */ if (conf.jobs > 1) b = b ^ 1; process_lines (jobs, &cnt, &test, b); /* flip from block B/A to A/B */ if (conf.jobs > 1) b = b ^ 1; if (conf.jobs > 1) { for (k = 0; k < conf.jobs; k++) { if (jobs[b][k].running) { pthread_join (threads[k], &status); jobs[b][k].running = 0; } } } if (dry_run && cnt >= NUM_TESTS) break; /* handle SIGINT */ if (conf.stop_processing) break; /* check for EOF */ if (s == NULL) break; /* flip from block A/B to B/A */ if (conf.jobs > 1) b = b ^ 1; } // while (1) /* After eof, process last data */ for (b = 0; b < 2; b++) { for (k = 0; k < conf.jobs; k++) { if (conf.jobs > 1 && jobs[b][k].running) { pthread_join (threads[k], &status); jobs[b][k].running = 0; } if (jobs[b][k].p) { process_lines_thread (&jobs[b][k]); cnt += jobs[b][k].cnt; jobs[b][k].cnt = 0; test &= jobs[b][k].test; jobs[b][k].p = 0; } } } free_jobs (jobs); /* if no data was available to read from (probably from a pipe) and still in * test mode and still below the test count, we simply return until data * becomes available */ if (!s && (errno == EAGAIN || errno == EWOULDBLOCK) && test && cnt < conf.num_tests) return 0; return test; } /* Read the given log file and attempt to mmap a fixed number of bytes so we * can compare its content on future runs. * * On error, 1 is returned. * On success, 0 is returned. */ int set_initial_persisted_data (GLog *glog, FILE *fp, const char *fn) { size_t len; time_t now = time (0); /* reset the snippet */ memset (glog->snippet, 0, sizeof (glog->snippet)); glog->snippetlen = 0; if (glog->props.size == 0) return 1; len = MIN (glog->props.size, READ_BYTES); if ((fread (glog->snippet, len, 1, fp)) != 1 && ferror (fp)) FATAL ("Unable to fread the specified log file '%s'", fn); glog->snippetlen = len; localtime_r (&now, &glog->start_time); fseek (fp, 0, SEEK_SET); return 0; } static void persist_last_parse (GLog *glog) { /* insert last parsed data for the recently file parsed */ if (glog->props.inode && glog->props.size) { glog->lp.line = glog->read; glog->lp.snippetlen = glog->snippetlen; memcpy (glog->lp.snippet, glog->snippet, glog->snippetlen); ht_insert_last_parse (glog->props.inode, &glog->lp); } /* probably from a pipe */ else if (!glog->props.inode) { ht_insert_last_parse (0, &glog->lp); } } /* Read the given log line by line and process its data. * * On error, 1 is returned. * On success, 0 is returned. */ static int read_log (GLog *glog, int dry_run) { FILE *fp = NULL; int piping = 0; struct stat fdstat; /* Ensure we have a valid pipe to read from stdin. Only checking for * conf.read_stdin without verifying for a valid FILE pointer would certainly * lead to issues. */ if (glog->props.filename[0] == '-' && glog->props.filename[1] == '\0' && glog->pipe) { fp = glog->pipe; glog->piping = piping = 1; } /* make sure we can open the log (if not reading from stdin) */ if (!piping && (fp = fopen (glog->props.filename, "r")) == NULL) FATAL ("Unable to open the specified log file '%s'. %s", glog->props.filename, strerror (errno)); /* grab the inode of the file being parsed */ if (!piping && stat (glog->props.filename, &fdstat) == 0) { glog->props.inode = fdstat.st_ino; glog->props.size = glog->lp.size = fdstat.st_size; set_initial_persisted_data (glog, fp, glog->props.filename); } /* read line by line */ if (read_lines (fp, glog, dry_run)) { if (!piping) fclose (fp); return 1; } persist_last_parse (glog); /* close log file if not a pipe */ if (!piping) fclose (fp); return 0; } static void set_log_processing (Logs *logs, GLog *glog) { lock_spinner (); logs->processed = &(glog->processed); logs->filename = glog->props.filename; unlock_spinner (); } /* Entry point to parse the log line by line. * * On error, 1 is returned. * On success, 0 is returned. */ int parse_log (Logs *logs, int dry_run) { GLog *glog = NULL; const char *err_log = NULL; int idx; /* verify that we have the required formats */ if ((err_log = verify_formats ())) FATAL ("%s", err_log); /* no data piped, no logs passed, load from disk only then */ if (conf.restore && !logs->restored) logs->restored = rebuild_rawdata_cache (); /* no data piped, no logs passed, load from disk only then */ if (conf.restore && !conf.filenames_idx && !conf.read_stdin) { logs->load_from_disk_only = 1; return 0; } for (idx = 0; idx < logs->size; ++idx) { glog = &logs->glog[idx]; set_log_processing (logs, glog); if (read_log (glog, dry_run)) return 1; glog->length = glog->bytes; } return 0; } /* Ensure we have valid hits * * On error, an array of pointers containing the error strings. * On success, NULL is returned. */ char ** test_format (Logs *logs, int *len) { char **errors = NULL; GLog *glog = NULL; int i; if (parse_log (logs, 1) == 0) return NULL; for (i = 0; i < logs->size; ++i) { glog = &logs->glog[i]; if (!glog->log_erridx) continue; break; } errors = xcalloc (glog->log_erridx, sizeof (char *)); *len = glog->log_erridx; for (i = 0; i < glog->log_erridx; ++i) errors[i] = xstrdup (glog->errors[i]); free_logerrors (glog); return errors; } goaccess-1.9.3/src/sha1.h0000644000175000017300000000074314624731651010603 #ifndef SHA1_H_INCLUDED #define SHA1_H_INCLUDED #include #include // From http://www.mirrors.wiretapped.net/security/cryptography/hashes/sha1/sha1.c typedef struct { uint32_t state[5]; uint32_t count[2]; uint8_t buffer[64]; } SHA1_CTX; extern void SHA1Init (SHA1_CTX * context); extern void SHA1Update (SHA1_CTX * context, uint8_t * data, uint32_t len); extern void SHA1Final (uint8_t digest[20], SHA1_CTX * context); #endif // for #ifndef SHA1_H goaccess-1.9.3/src/json.c0000644000175000017300000010011114624731651010701 /** * output.c -- output json to the standard output stream * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #include #include #include #include #include #include #include #include #include "json.h" #include "error.h" #include "gkhash.h" #include "settings.h" #include "ui.h" #include "util.h" #include "websocket.h" #include "xmalloc.h" typedef struct GPanel_ { GModule module; void (*render) (GJSON * json, GHolder * h, GPercTotals totals, const struct GPanel_ *); void (*subitems) (GJSON * json, GHolderItem * item, GPercTotals totals, int size, int iisp); } GPanel; /* number of new lines (applicable fields) */ static int nlines = 0; /* escape HTML in JSON data values */ static int escape_html_output = 0; static void print_json_data (GJSON * json, GHolder * h, GPercTotals totals, const struct GPanel_ *); static void print_json_host_items (GJSON * json, GHolderItem * item, GPercTotals totals, int size, int iisp); static void print_json_sub_items (GJSON * json, GHolderItem * item, GPercTotals totals, int size, int iisp); /* *INDENT-OFF* */ static const GPanel paneling[] = { {VISITORS , print_json_data , NULL } , {REQUESTS , print_json_data , NULL } , {REQUESTS_STATIC , print_json_data , NULL } , {NOT_FOUND , print_json_data , NULL } , {HOSTS , print_json_data , print_json_host_items } , {OS , print_json_data , print_json_sub_items } , {BROWSERS , print_json_data , print_json_sub_items } , {VISIT_TIMES , print_json_data , NULL } , {VIRTUAL_HOSTS , print_json_data , NULL } , {REFERRERS , print_json_data , NULL } , {REFERRING_SITES , print_json_data , NULL } , {KEYPHRASES , print_json_data , NULL } , {STATUS_CODES , print_json_data , print_json_sub_items } , {REMOTE_USER , print_json_data , NULL } , {CACHE_STATUS , print_json_data , NULL } , #ifdef HAVE_GEOLOCATION {GEO_LOCATION , print_json_data , print_json_sub_items } , {ASN , print_json_data , NULL} , #endif {MIME_TYPE , print_json_data , print_json_sub_items } , {TLS_TYPE , print_json_data , print_json_sub_items } , }; /* *INDENT-ON* */ /* Get panel output data for the given module. * * If not found, NULL is returned. * On success, panel data is returned . */ static const GPanel * panel_lookup (GModule module) { int i, num_panels = ARRAY_SIZE (paneling); for (i = 0; i < num_panels; i++) { if (paneling[i].module == module) return &paneling[i]; } return NULL; } /* Allocate memory for a new GJSON instance. * * On success, the newly allocated GJSON is returned . */ static GJSON * new_gjson (void) { GJSON *json = xcalloc (1, sizeof (GJSON)); return json; } /* Free malloc'd GJSON resources. */ static void free_json (GJSON *json) { if (!json) return; free (json->buf); free (json); } /* Set number of new lines when --json-pretty-print is used. */ void set_json_nlines (int newline) { nlines = newline; } /* Make sure that we have enough storage to write "len" bytes at the * current offset. */ static void set_json_buffer (GJSON *json, int len) { char *tmp = NULL; /* Maintain a null byte at the end of the buffer */ size_t need = json->offset + len + 1, newlen = 0; if (need <= json->size) return; if (json->size == 0) { newlen = INIT_BUF_SIZE; } else { newlen = json->size; newlen += newlen / 2; /* resize by 3/2 */ } if (newlen < need) newlen = need; tmp = realloc (json->buf, newlen); if (tmp == NULL) { free_json (json); FATAL (("Unable to realloc JSON buffer.\n")); } json->buf = tmp; json->size = newlen; } #pragma GCC diagnostic ignored "-Wformat-nonliteral" /* A wrapper function to write a formatted string and expand the * buffer if necessary. * * On success, data is outputted. */ __attribute__((format (printf, 2, 3))) static void pjson (GJSON *json, const char *fmt, ...) { int len = 0; va_list args; va_start (args, fmt); if ((len = vsnprintf (NULL, 0, fmt, args)) < 0) FATAL (("Unable to write JSON formatted data.\n")); va_end (args); /* malloc/realloc buffer as needed */ set_json_buffer (json, len); va_start (args, fmt); /* restart args */ vsprintf (json->buf + json->offset, fmt, args); va_end (args); json->offset += len; } /* A wrapper function to output a formatted string to a file pointer. * * On success, data is outputted. */ void fpjson (FILE *fp, const char *fmt, ...) { va_list args; va_start (args, fmt); vfprintf (fp, fmt, args); va_end (args); } #pragma GCC diagnostic warning "-Wformat-nonliteral" /* Escape all other characters accordingly. */ static void escape_json_other (GJSON *json, const char **s) { /* Since JSON data is bootstrapped into the HTML document of a report, * then we perform the following four translations in case weird stuff * is put into the document. * * Note: The following scenario assumes that the user manually makes * the HTML report a PHP file (GoAccess doesn't allow the creation of a * PHP file): * * /index.html */ if (escape_html_output) { switch (**s) { case '\'': pjson (json, "'"); return; case '&': pjson (json, "&"); return; case '<': pjson (json, "<"); return; case '>': pjson (json, ">"); return; } } if ((uint8_t) ** s <= 0x1f) { /* Control characters (U+0000 through U+001F) */ char buf[8]; snprintf (buf, sizeof buf, "\\u%04x", **s); pjson (json, "%s", buf); } else if ((uint8_t) ** s == 0xe2 && (uint8_t) * (*s + 1) == 0x80 && (uint8_t) * (*s + 2) == 0xa8) { /* Line separator (U+2028) - 0xE2 0x80 0xA8 */ pjson (json, "\\u2028"); *s += 2; } else if ((uint8_t) ** s == 0xe2 && (uint8_t) * (*s + 1) == 0x80 && (uint8_t) * (*s + 2) == 0xa9) { /* Paragraph separator (U+2019) - 0xE2 0x80 0xA9 */ pjson (json, "\\u2029"); *s += 2; } else { char buf[2]; snprintf (buf, sizeof buf, "%c", **s); pjson (json, "%s", buf); } } /* Escape and write to a valid JSON buffer. * * On success, escaped JSON data is outputted. */ static void escape_json_output (GJSON *json, const char *s) { while (*s) { switch (*s) { /* These are required JSON special characters that need to be escaped. */ case '"': pjson (json, "\\\""); break; case '\\': pjson (json, "\\\\"); break; case '\b': pjson (json, "\\b"); break; case '\f': pjson (json, "\\f"); break; case '\n': pjson (json, "\\n"); break; case '\r': pjson (json, "\\r"); break; case '\t': pjson (json, "\\t"); break; case '/': pjson (json, "\\/"); break; default: escape_json_other (json, &s); break; } s++; } } /* Write to a buffer a JSON a key/value pair. */ static void pskeysval (GJSON *json, const char *key, const char *val, int sp, int last) { if (!last) pjson (json, "%.*s\"%s\": \"%s\",%.*s", sp, TAB, key, val, nlines, NL); else pjson (json, "%.*s\"%s\": \"%s\"", sp, TAB, key, val); } /* Output a JSON string key, array value pair. */ void fpskeyaval (FILE *fp, const char *key, const char *val, int sp, int last) { if (!last) fpjson (fp, "%.*s\"%s\": %s,%.*s", sp, TAB, key, val, nlines, NL); else fpjson (fp, "%.*s\"%s\": %s", sp, TAB, key, val); } /* Output a JSON a key/value pair. */ void fpskeysval (FILE *fp, const char *key, const char *val, int sp, int last) { if (!last) fpjson (fp, "%.*s\"%s\": \"%s\",%.*s", sp, TAB, key, val, nlines, NL); else fpjson (fp, "%.*s\"%s\": \"%s\"", sp, TAB, key, val); } /* Output a JSON string key, int value pair. */ void fpskeyival (FILE *fp, const char *key, int val, int sp, int last) { if (!last) fpjson (fp, "%.*s\"%s\": %d,%.*s", sp, TAB, key, val, nlines, NL); else fpjson (fp, "%.*s\"%s\": %d", sp, TAB, key, val); } /* Write to a buffer a JSON string key, uint64_t value pair. */ static void pskeyu64val (GJSON *json, const char *key, uint64_t val, int sp, int last) { if (!last) pjson (json, "%.*s\"%s\": %" PRIu64 ",%.*s", sp, TAB, key, val, nlines, NL); else pjson (json, "%.*s\"%s\": %" PRIu64 "", sp, TAB, key, val); } /* Write to a buffer a JSON string key, int value pair. */ static void pskeyfval (GJSON *json, const char *key, float val, int sp, int last) { if (!last) pjson (json, "%.*s\"%s\": \"%05.2f\",%.*s", sp, TAB, key, val, nlines, NL); else pjson (json, "%.*s\"%s\": \"%05.2f\"", sp, TAB, key, val); } /* Write to a buffer the open block item object. */ static void popen_obj (GJSON *json, int iisp) { /* open data metric block */ pjson (json, "%.*s{%.*s", iisp, TAB, nlines, NL); } /* Output the open block item object. */ void fpopen_obj (FILE *fp, int iisp) { /* open data metric block */ fpjson (fp, "%.*s{%.*s", iisp, TAB, nlines, NL); } /* Write to a buffer a JSON open object attribute. */ static void popen_obj_attr (GJSON *json, const char *attr, int sp) { /* open object attribute */ pjson (json, "%.*s\"%s\": {%.*s", sp, TAB, attr, nlines, NL); } /* Output a JSON open object attribute. */ void fpopen_obj_attr (FILE *fp, const char *attr, int sp) { /* open object attribute */ fpjson (fp, "%.*s\"%s\": {%.*s", sp, TAB, attr, nlines, NL); } /* Close JSON object. */ static void pclose_obj (GJSON *json, int iisp, int last) { if (!last) pjson (json, "%.*s%.*s},%.*s", nlines, NL, iisp, TAB, nlines, NL); else pjson (json, "%.*s%.*s}", nlines, NL, iisp, TAB); } /* Close JSON object. */ void fpclose_obj (FILE *fp, int iisp, int last) { if (!last) fpjson (fp, "%.*s%.*s},%.*s", nlines, NL, iisp, TAB, nlines, NL); else fpjson (fp, "%.*s%.*s}", nlines, NL, iisp, TAB); } /* Write to a buffer a JSON open array attribute. */ static void popen_arr_attr (GJSON *json, const char *attr, int sp) { /* open object attribute */ pjson (json, "%.*s\"%s\": [%.*s", sp, TAB, attr, nlines, NL); } /* Output a JSON open array attribute. */ void fpopen_arr_attr (FILE *fp, const char *attr, int sp) { /* open object attribute */ fpjson (fp, "%.*s\"%s\": [%.*s", sp, TAB, attr, nlines, NL); } /* Close the data array. */ static void pclose_arr (GJSON *json, int sp, int last) { if (!last) pjson (json, "%.*s%.*s],%.*s", nlines, NL, sp, TAB, nlines, NL); else pjson (json, "%.*s%.*s]", nlines, NL, sp, TAB); } /* Close the data array. */ void fpclose_arr (FILE *fp, int sp, int last) { if (!last) fpjson (fp, "%.*s%.*s],%.*s", nlines, NL, sp, TAB, nlines, NL); else fpjson (fp, "%.*s%.*s]", nlines, NL, sp, TAB); } /* Write to a buffer the date and time for the overall object. */ static void poverall_datetime (GJSON *json, int sp) { char now[DATE_TIME]; generate_time (); strftime (now, DATE_TIME, "%Y-%m-%d %H:%M:%S %z", &now_tm); pskeysval (json, OVERALL_DATETIME, now, sp, 0); } /* Write to a buffer the date and time for the overall object. */ static void poverall_start_end_date (GJSON *json, GHolder *h, int sp) { char *start = NULL, *end = NULL; if (h->idx == 0 || get_start_end_parsing_dates (&start, &end, "%d/%b/%Y")) return; pskeysval (json, OVERALL_STARTDATE, start, sp, 0); pskeysval (json, OVERALL_ENDDATE, end, sp, 0); free (end); free (start); } /* Write to a buffer date and time for the overall object. */ static void poverall_requests (GJSON *json, int sp) { pskeyu64val (json, OVERALL_REQ, ht_get_processed (), sp, 0); } /* Write to a buffer the number of valid requests under the overall * object. */ static void poverall_valid_reqs (GJSON *json, int sp) { pskeyu64val (json, OVERALL_VALID, ht_sum_valid (), sp, 0); } /* Write to a buffer the number of invalid requests under the overall * object. */ static void poverall_invalid_reqs (GJSON *json, int sp) { pskeyu64val (json, OVERALL_FAILED, ht_get_invalid (), sp, 0); } /* Write to a buffer the total processed time under the overall * object. */ static void poverall_processed_time (GJSON *json, int sp) { pskeyu64val (json, OVERALL_GENTIME, ht_get_processing_time (), sp, 0); } /* Write to a buffer the total number of unique visitors under the * overall object. */ static void poverall_visitors (GJSON *json, int sp) { pskeyu64val (json, OVERALL_VISITORS, ht_get_size_uniqmap (VISITORS), sp, 0); } /* Write to a buffer the total number of unique files under the * overall object. */ static void poverall_files (GJSON *json, int sp) { pskeyu64val (json, OVERALL_FILES, ht_get_size_datamap (REQUESTS), sp, 0); } /* Write to a buffer the total number of excluded requests under the * overall object. */ static void poverall_excluded (GJSON *json, int sp) { pskeyu64val (json, OVERALL_EXCL_HITS, ht_get_excluded_ips (), sp, 0); } /* Write to a buffer the number of referrers under the overall object. */ static void poverall_refs (GJSON *json, int sp) { pskeyu64val (json, OVERALL_REF, ht_get_size_datamap (REFERRERS), sp, 0); } /* Write to a buffer the number of not found (404s) under the overall * object. */ static void poverall_notfound (GJSON *json, int sp) { pskeyu64val (json, OVERALL_NOTFOUND, ht_get_size_datamap (NOT_FOUND), sp, 0); } /* Write to a buffer the number of static files (jpg, pdf, etc) under * the overall object. */ static void poverall_static_files (GJSON *json, int sp) { pskeyu64val (json, OVERALL_STATIC, ht_get_size_datamap (REQUESTS_STATIC), sp, 0); } /* Write to a buffer the size of the log being parsed under the * overall object. */ static void poverall_log_size (GJSON *json, int sp) { pjson (json, "%.*s\"%s\": %jd,%.*s", sp, TAB, OVERALL_LOGSIZE, (intmax_t) get_log_sizes (), nlines, NL); } /* Write to a buffer the total bandwidth consumed under the overall * object. */ static void poverall_bandwidth (GJSON *json, int sp) { pskeyu64val (json, OVERALL_BANDWIDTH, ht_sum_bw (), sp, 0); } static void poverall_log_path (GJSON *json, int idx, int isp) { pjson (json, "%.*s\"", isp, TAB); if (conf.filenames[idx][0] == '-' && conf.filenames[idx][1] == '\0') pjson (json, "STDIN"); else escape_json_output (json, conf.filenames[idx]); pjson (json, conf.filenames_idx - 1 != idx ? "\",\n" : "\""); } /* Write to a buffer the path of the log being parsed under the * overall object. */ static void poverall_log (GJSON *json, int sp) { int idx, isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_arr_attr (json, OVERALL_LOG, sp); for (idx = 0; idx < conf.filenames_idx; ++idx) poverall_log_path (json, idx, isp); pclose_arr (json, sp, 1); } /* Write to a buffer hits data. */ static void phits (GJSON *json, GMetrics *nmetrics, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_obj_attr (json, "hits", sp); /* print hits */ pskeyu64val (json, "count", nmetrics->hits, isp, 0); /* print hits percent */ pskeyfval (json, "percent", nmetrics->hits_perc, isp, 1); pclose_obj (json, sp, 0); } /* Write to a buffer visitors data. */ static void pvisitors (GJSON *json, GMetrics *nmetrics, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_obj_attr (json, "visitors", sp); /* print visitors */ pskeyu64val (json, "count", nmetrics->visitors, isp, 0); /* print visitors percent */ pskeyfval (json, "percent", nmetrics->visitors_perc, isp, 1); pclose_obj (json, sp, 0); } /* Write to a buffer bandwidth data. */ static void pbw (GJSON *json, GMetrics *nmetrics, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; if (!conf.bandwidth) return; popen_obj_attr (json, "bytes", sp); /* print bandwidth */ pskeyu64val (json, "count", nmetrics->bw.nbw, isp, 0); /* print bandwidth percent */ pskeyfval (json, "percent", nmetrics->bw_perc, isp, 1); pclose_obj (json, sp, 0); } /* Write to a buffer average time served data. */ static void pavgts (GJSON *json, GMetrics *nmetrics, int sp) { if (!conf.serve_usecs) return; pskeyu64val (json, "avgts", nmetrics->avgts.nts, sp, 0); } /* Write to a buffer cumulative time served data. */ static void pcumts (GJSON *json, GMetrics *nmetrics, int sp) { if (!conf.serve_usecs) return; pskeyu64val (json, "cumts", nmetrics->cumts.nts, sp, 0); } /* Write to a buffer maximum time served data. */ static void pmaxts (GJSON *json, GMetrics *nmetrics, int sp) { if (!conf.serve_usecs) return; pskeyu64val (json, "maxts", nmetrics->maxts.nts, sp, 0); } /* Write to a buffer request method data. */ static void pmethod (GJSON *json, GMetrics *nmetrics, int sp) { /* request method */ if (conf.append_method && nmetrics->method) { pskeysval (json, "method", nmetrics->method, sp, 0); } } /* Write to a buffer protocol method data. */ static void pprotocol (GJSON *json, GMetrics *nmetrics, int sp) { /* request protocol */ if (conf.append_protocol && nmetrics->protocol) { pskeysval (json, "protocol", nmetrics->protocol, sp, 0); } } static void pmeta_i64_data (GJSON *json, GHolder *h, void (*cb) (GModule, uint64_t *, uint64_t *), const char *key, int show_perc, int sp) { int isp = 0; uint64_t max = 0, min = 0, total = ht_get_meta_data (h->module, key); float avg = (total == 0 ? 0 : (((float) total) / h->ht_size)); /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; cb (h->module, &min, &max); popen_obj_attr (json, "total", sp); pskeyu64val (json, "value", total, isp, 1); pclose_obj (json, sp, 0); popen_obj_attr (json, "avg", sp); pskeyu64val (json, "value", avg, isp, !show_perc); if (show_perc) { pskeyfval (json, "percent", get_percentage (total, avg), isp, 1); } pclose_obj (json, sp, 0); popen_obj_attr (json, "max", sp); pskeyu64val (json, "value", max, isp, !show_perc); if (show_perc) { pskeyfval (json, "percent", get_percentage (total, max), isp, 1); } pclose_obj (json, sp, 0); popen_obj_attr (json, "min", sp); pskeyu64val (json, "value", min, isp, !show_perc); if (show_perc) { pskeyfval (json, "percent", get_percentage (total, min), isp, 1); } pclose_obj (json, sp, 1); } static void pmeta_i32_data (GJSON *json, GHolder *h, void (*cb) (GModule, uint32_t *, uint32_t *), const char *key, int show_perc, int sp) { int isp = 0; uint32_t max = 0, min = 0, total = ht_get_meta_data (h->module, key); float avg = (total == 0 ? 0 : (((float) total) / h->ht_size)); /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; cb (h->module, &min, &max); popen_obj_attr (json, "total", sp); pskeyu64val (json, "value", total, isp, 1); pclose_obj (json, sp, 0); popen_obj_attr (json, "avg", sp); pskeyu64val (json, "value", avg, isp, !show_perc); if (show_perc) { pskeyfval (json, "percent", get_percentage (total, avg), isp, 1); } pclose_obj (json, sp, 0); popen_obj_attr (json, "max", sp); pskeyu64val (json, "value", max, isp, !show_perc); if (show_perc) { pskeyfval (json, "percent", get_percentage (total, max), isp, 1); } pclose_obj (json, sp, 0); popen_obj_attr (json, "min", sp); pskeyu64val (json, "value", min, isp, !show_perc); if (show_perc) { pskeyfval (json, "percent", get_percentage (total, min), isp, 1); } pclose_obj (json, sp, 1); } /* Write to a buffer the hits meta data object. */ static void pmeta_data_unique (GJSON *json, int ht_size, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_obj_attr (json, "data", sp); popen_obj_attr (json, "total", isp); pskeyu64val (json, "value", ht_size, isp + 1, 1); pclose_obj (json, isp, 1); pclose_obj (json, sp, 1); } /* Write to a buffer the hits meta data object. */ static void pmeta_data_hits (GJSON *json, GHolder *h, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_obj_attr (json, "hits", sp); pmeta_i32_data (json, h, ht_get_hits_min_max, "hits", 1, isp); pclose_obj (json, sp, 0); } /* Write to a buffer the visitors meta data object. */ static void pmeta_data_visitors (GJSON *json, GHolder *h, int sp) { int isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_obj_attr (json, "visitors", sp); pmeta_i32_data (json, h, ht_get_visitors_min_max, "visitors", 1, isp); pclose_obj (json, sp, 0); } /* Write to a buffer the bytes meta data object. */ static void pmeta_data_bw (GJSON *json, GHolder *h, int sp) { int isp = 0; if (!conf.bandwidth) return; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_obj_attr (json, "bytes", sp); pmeta_i64_data (json, h, ht_get_bw_min_max, "bytes", 1, isp); pclose_obj (json, sp, 0); } /* Write to a buffer the average of the average time served meta data * object. */ static void pmeta_data_avgts (GJSON *json, GHolder *h, int sp) { int isp = 0; uint64_t avg = 0, hits = 0, cumts = 0; if (!conf.serve_usecs) return; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; cumts = ht_get_meta_data (h->module, "cumts"); hits = ht_get_meta_data (h->module, "hits"); if (hits > 0) avg = cumts / hits; popen_obj_attr (json, "avgts", sp); popen_obj_attr (json, "avg", isp); pskeyu64val (json, "value", avg, isp + 1, 1); pclose_obj (json, isp, 1); pclose_obj (json, sp, 0); } /* Write to a buffer the cumulative time served meta data object. */ static void pmeta_data_cumts (GJSON *json, GHolder *h, int sp) { int isp = 0; if (!conf.serve_usecs) return; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_obj_attr (json, "cumts", sp); pmeta_i64_data (json, h, ht_get_cumts_min_max, "cumts", 0, isp); pclose_obj (json, sp, 0); } /* Write to a buffer the maximum time served meta data object. */ static void pmeta_data_maxts (GJSON *json, GHolder *h, int sp) { int isp = 0; if (!conf.serve_usecs) return; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1; popen_obj_attr (json, "maxts", sp); pmeta_i64_data (json, h, ht_get_maxts_min_max, "maxts", 0, isp); pclose_obj (json, sp, 0); } /* Entry point to output panel's metadata. */ static void print_meta_data (GJSON *json, GHolder *h, int sp) { int isp = 0, iisp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1, iisp = sp + 2; popen_obj_attr (json, "metadata", isp); pmeta_data_avgts (json, h, iisp); pmeta_data_cumts (json, h, iisp); pmeta_data_maxts (json, h, iisp); pmeta_data_bw (json, h, iisp); pmeta_data_visitors (json, h, iisp); pmeta_data_hits (json, h, iisp); pmeta_data_unique (json, h->ht_size, iisp); pclose_obj (json, isp, 0); } /* A wrapper function to output data metrics per panel. */ static void print_json_block (GJSON *json, GMetrics *nmetrics, int sp) { /* print hits */ phits (json, nmetrics, sp); /* print visitors */ pvisitors (json, nmetrics, sp); /* print bandwidth */ pbw (json, nmetrics, sp); /* print time served metrics */ pavgts (json, nmetrics, sp); pcumts (json, nmetrics, sp); pmaxts (json, nmetrics, sp); /* print protocol/method */ pmethod (json, nmetrics, sp); pprotocol (json, nmetrics, sp); /* data metric */ pjson (json, "%.*s\"data\": \"", sp, TAB); escape_json_output (json, nmetrics->data); pjson (json, "\""); } /* A wrapper function to output an array of user agents for each host. */ static void process_host_agents (GJSON *json, GHolderItem *item, int iisp) { GAgents *agents = NULL; int i, n = 0, iiisp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) iiisp = iisp + 1; /* create a new instance of GMenu and make it selectable */ if (!(agents = load_host_agents (item->metrics->data))) return; pjson (json, ",%.*s%.*s\"items\": [%.*s", nlines, NL, iisp, TAB, nlines, NL); n = agents->idx > 10 ? 10 : agents->idx; for (i = 0; i < n; ++i) { pjson (json, "%.*s\"", iiisp, TAB); escape_json_output (json, agents->items[i].agent); if (i == n - 1) pjson (json, "\""); else pjson (json, "\",%.*s", nlines, NL); } pclose_arr (json, iisp, 1); /* clean stuff up */ free_agents_array (agents); } /* A wrapper function to output children nodes. */ static void print_json_sub_items (GJSON *json, GHolderItem *item, GPercTotals totals, int size, int iisp) { GMetrics *nmetrics; GSubItem *iter; GSubList *sl = item->sub_list; int i = 0, iiisp = 0, iiiisp = 0; /* no sub items, nothing to output */ if (size == 0) return; /* use tabs to prettify output */ if (conf.json_pretty_print) iiisp = iisp + 1, iiiisp = iiisp + 1; if (sl == NULL) return; pjson (json, ",%.*s%.*s\"items\": [%.*s", nlines, NL, iisp, TAB, nlines, NL); for (iter = sl->head; iter; iter = iter->next, i++) { set_data_metrics (iter->metrics, &nmetrics, totals); popen_obj (json, iiisp); print_json_block (json, nmetrics, iiiisp); pclose_obj (json, iiisp, (i == sl->size - 1)); free (nmetrics); } pclose_arr (json, iisp, 1); } /* A wrapper function to output geolocation fields for the given host. */ static void print_json_host_geo (GJSON *json, GSubList *sl, int iisp) { GSubItem *iter; int i; static const char *key[] = { "country", "city", "asn", "hostname", }; pjson (json, ",%.*s", nlines, NL); /* Iterate over child properties (country, city, asn, etc) and print them out */ for (i = 0, iter = sl->head; iter; iter = iter->next, i++) { pjson (json, "%.*s\"%s\": \"", iisp, TAB, key[iter->metrics->id]); escape_json_output (json, iter->metrics->data); pjson (json, (i != sl->size - 1) ? "\",%.*s" : "\"", nlines, NL); } } /* Output Geolocation data and the IP's hostname. */ static void print_json_host_items (GJSON *json, GHolderItem *item, GPercTotals totals, int size, int iisp) { (void) totals; /* print geolocation fields */ if (size > 0 && item->sub_list != NULL) print_json_host_geo (json, item->sub_list, iisp); /* print list of user agents */ if (conf.list_agents) process_host_agents (json, item, iisp); } /* Output data and determine if there are children nodes. */ static void print_data_metrics (GJSON *json, GHolder *h, GPercTotals totals, int sp, const struct GPanel_ *panel) { GMetrics *nmetrics; int i, isp = 0, iisp = 0, iiisp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) isp = sp + 1, iisp = sp + 2, iiisp = sp + 3; popen_arr_attr (json, "data", isp); /* output data metrics */ for (i = 0; i < h->idx; i++) { set_data_metrics (h->items[i].metrics, &nmetrics, totals); /* open data metric block */ popen_obj (json, iisp); /* output data metric block */ print_json_block (json, nmetrics, iiisp); /* if there are children nodes, spit them out */ if (panel->subitems) panel->subitems (json, h->items + i, totals, h->sub_items_size, iiisp); /* close data metric block */ pclose_obj (json, iisp, (i == h->idx - 1)); free (nmetrics); } pclose_arr (json, isp, 1); } /* Entry point to output data metrics per panel. */ static void print_json_data (GJSON *json, GHolder *h, GPercTotals totals, const struct GPanel_ *panel) { int sp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) sp = 1; /* output open panel attribute */ popen_obj_attr (json, module_to_id (h->module), sp); /* output panel metadata */ print_meta_data (json, h, sp); /* output panel data */ print_data_metrics (json, h, totals, sp, panel); /* output close panel attribute */ pclose_obj (json, sp, 1); } /* Get the number of available panels. * * On success, the total number of available panels is returned . */ static int num_panels (void) { size_t idx = 0, npanels = 0; FOREACH_MODULE (idx, module_list) npanels++; return npanels; } /* Write to a buffer overall data. */ static void print_json_summary (GJSON *json, GHolder *holder) { int sp = 0, isp = 0; /* use tabs to prettify output */ if (conf.json_pretty_print) sp = 1, isp = 2; popen_obj_attr (json, GENER_ID, sp); /* generated start/end date */ poverall_start_end_date (json, holder, isp); /* generated date time */ poverall_datetime (json, isp); /* total requests */ poverall_requests (json, isp); /* valid requests */ poverall_valid_reqs (json, isp); /* invalid requests */ poverall_invalid_reqs (json, isp); /* generated time */ poverall_processed_time (json, isp); /* visitors */ poverall_visitors (json, isp); /* files */ poverall_files (json, isp); /* excluded hits */ poverall_excluded (json, isp); /* referrers */ poverall_refs (json, isp); /* not found */ poverall_notfound (json, isp); /* static files */ poverall_static_files (json, isp); /* log size */ poverall_log_size (json, isp); /* bandwidth */ poverall_bandwidth (json, isp); /* log path */ poverall_log (json, isp); pclose_obj (json, sp, num_panels () > 0 ? 0 : 1); } /* Iterate over all panels and generate json output. */ static GJSON * init_json_output (GHolder *holder) { GJSON *json = NULL; GModule module; GPercTotals totals; const GPanel *panel = NULL; size_t idx = 0, npanels = num_panels (), cnt = 0; json = new_gjson (); popen_obj (json, 0); print_json_summary (json, holder); set_module_totals (&totals); FOREACH_MODULE (idx, module_list) { module = module_list[idx]; if (!(panel = panel_lookup (module))) continue; panel->render (json, holder + module, totals, panel); pjson (json, (cnt++ != npanels - 1) ? ",%.*s" : "%.*s", nlines, NL); } pclose_obj (json, 0, 1); return json; } /* Open and write to a dynamically sized output buffer. * * On success, the newly allocated buffer is returned . */ char * get_json (GHolder *holder, int escape_html) { GJSON *json = NULL; char *buf = NULL; if (holder == NULL) return NULL; escape_html_output = escape_html; if ((json = init_json_output (holder)) && json->size > 0) { buf = xstrdup (json->buf); free_json (json); } return buf; } /* Entry point to generate a json report writing it to the fp */ void output_json (GHolder *holder, const char *filename) { GJSON *json = NULL; FILE *fp; if (filename != NULL) fp = fopen (filename, "w"); else fp = stdout; if (!fp) FATAL ("Unable to open JSON file: %s.", strerror (errno)); /* use new lines to prettify output */ if (conf.json_pretty_print) nlines = 1; /* spit it out */ if ((json = init_json_output (holder)) && json->size > 0) { fprintf (fp, "%s", json->buf); free_json (json); } fclose (fp); } goaccess-1.9.3/src/parser.h0000644000175000017300000001353614624731651011247 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef PARSER_H_INCLUDED #define PARSER_H_INCLUDED #define KEY_FOUND 1 #define KEY_NOT_FOUND -1 #define LINE_BUFFER 4096 /* read at most this num of chars */ #define NUM_TESTS 20 /* test this many lines from the log */ #define MAX_LOG_ERRORS 20 #define READ_BYTES 4096u #define MAX_BATCH_LINES 8192u /* max number of lines to read per batch before a reflow */ #define LINE_LEN 23 #define ERROR_LEN 255 #define REF_SITE_LEN 511 /* maximum length of a referring site */ #define CACHE_STATUS_LEN 7 #define HASH_HEX 64 #define ERR_SPEC_TOKN_NUL 0x1 #define ERR_SPEC_TOKN_INV 0x2 #define ERR_SPEC_SFMT_MIS 0x3 #define ERR_SPEC_LINE_INV 0x4 #define ERR_LOG_NOT_FOUND 0x5 #define ERR_LOG_REALLOC_FAILURE 0x6 #include #include "commons.h" #include "gslist.h" typedef struct GLogProp_ { char *filename; /* filename including path */ char *fname; /* basename(filename) */ uint64_t inode; /* inode of the log */ uint64_t size; /* original size of log */ } GLogProp; /* Log properties. Note: This is per line parsed */ typedef struct GLogItem_ { char *agent; char *browser; char *browser_type; char *continent; char *country; char *asn; char *date; char *host; char *keyphrase; char *method; char *os; char *os_type; char *protocol; char *qstr; char *ref; char *req; char *req_key; int status; char *time; char *uniq_key; char *vhost; char *userid; char *cache_status; char site[REF_SITE_LEN + 1]; char agent_hex[HASH_HEX]; uint64_t resp_size; uint64_t serve_time; uint32_t numdate; uint32_t agent_hash; int ignorelevel; int type_ip; int is_404; int is_static; int uniq_nkey; int agent_nkey; /* UMS */ char *mime_type; char *tls_type; char *tls_cypher; char *tls_type_cypher; char *errstr; struct tm dt; } GLogItem; typedef struct GLastParse_ { uint32_t line; int64_t ts; uint64_t size; uint16_t snippetlen; char snippet[READ_BYTES + 1]; } GLastParse; /* Overall parsed log properties */ typedef struct GLog_ { uint8_t piping:1; uint8_t log_erridx; uint32_t read; /* lines read/parsed */ uint64_t bytes; /* bytes read on each iteration */ uint64_t length; /* length read from the log so far */ uint64_t invalid; /* invalid lines for this log */ uint64_t processed; /* lines proceeded for this log */ /* file test for persisted/restored data */ uint16_t snippetlen; char snippet[READ_BYTES + 1]; GLastParse lp; GLogProp props; struct tm start_time; char *fname_as_vhost; char **errors; FILE *pipe; } GLog; /* Container for all logs */ typedef struct Logs_ { uint8_t restored:1; uint8_t load_from_disk_only:1; uint64_t *processed; uint64_t offset; int size; /* num items */ int idx; char *filename; GLog *glog; } Logs; /* Pthread jobs for multi-thread */ typedef struct GJob_ { uint32_t cnt; int p, test, dry_run, running; GLog *glog; GLogItem **logitems; char **lines; } GJob; /* Raw data field type */ typedef enum { U32, STR } datatype; /* Raw Data extracted from table stores */ typedef struct GRawDataItem_ { uint32_t nkey; union { const char *data; uint32_t hits; }; } GRawDataItem; /* Raw Data per module */ typedef struct GRawData_ { GRawDataItem *items; /* data */ GModule module; /* current module */ datatype type; int idx; /* first level index */ int size; /* total num of items on ht */ } GRawData; char *extract_by_delim (const char **str, const char *end); char *fgetline (FILE * fp); char **test_format (Logs * logs, int *len); int parse_line (GLog * glog, char *line, int dry_run, GLogItem ** logitem_out); int parse_log (Logs * logs, int dry_run); int set_glog (Logs * logs, const char *filename); int set_initial_persisted_data (GLog * glog, FILE * fp, const char *fn); int set_log (Logs * logs, const char *value); void free_glog (GLogItem * logitem); void free_logerrors (GLog * glog); void free_logs (Logs * logs); void free_raw_data (GRawData * raw_data); void output_logerrors (void); void *process_lines_thread (void *arg); void reset_struct (Logs * logs); GLogItem *init_log_item (GLog * glog); GRawDataItem *new_grawdata_item (unsigned int size); GRawData *new_grawdata (void); Logs *init_logs (int size); Logs *new_logs (int size); #endif goaccess-1.9.3/src/json.h0000644000175000017300000000471514624731651010723 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include #endif #ifndef JSON_H_INCLUDED #define JSON_H_INCLUDED #define TAB "\t\t\t\t\t\t\t\t\t\t\t" #define NL "\n\n\n" #include "parser.h" typedef struct GJSON_ { char *buf; /* pointer to buffer */ size_t size; /* size of malloc'd buffer */ size_t offset; /* current write offset */ } GJSON; char *get_json (GHolder * holder, int escape_html); void output_json (GHolder * holder, const char *filename); void set_json_nlines (int nl); void fpskeyival (FILE * fp, const char *key, int val, int sp, int last); void fpskeysval (FILE * fp, const char *key, const char *val, int sp, int last); void fpskeyaval (FILE * fp, const char *key, const char *val, int sp, int last); void fpclose_arr (FILE * fp, int sp, int last); void fpclose_obj (FILE * fp, int iisp, int last); void fpjson (FILE * fp, const char *fmt, ...) __attribute__((format (printf, 2, 3))); void fpopen_arr_attr (FILE * fp, const char *attr, int sp); void fpopen_obj_attr (FILE * fp, const char *attr, int sp); void fpopen_obj (FILE * fp, int iisp); #endif goaccess-1.9.3/src/gstorage.h0000644000175000017300000001175414624731651011566 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef GSTORAGE_H_INCLUDED #define GSTORAGE_H_INCLUDED #include "commons.h" #include "parser.h" #define DB_PATH "/tmp" #define GAMTRC_TOTAL 8 /* Enumerated App Metrics */ typedef enum GAMetric_ { MTRC_DATES, MTRC_SEQS, MTRC_CNT_OVERALL, MTRC_HOSTNAMES, MTRC_LAST_PARSE, MTRC_JSON_LOGFMT, MTRC_METH_PROTO, MTRC_DB_PROPS, } GAMetric; /* Enumerated Storage Metrics */ typedef enum GSMetricType_ { /* uint32_t key - uint32_t val */ MTRC_TYPE_II32, /* uint32_t key - string val */ MTRC_TYPE_IS32, /* uint32_t key - uint64_t val */ MTRC_TYPE_IU64, /* string key - uint32_t val */ MTRC_TYPE_SI32, /* string key - uint8_t val */ MTRC_TYPE_SI08, /* uint32_t key - uint8_t val */ MTRC_TYPE_II08, /* string key - string val */ MTRC_TYPE_SS32, /* uint32_t key - GSLList val */ MTRC_TYPE_IGSL, /* string key - uint64_t val */ MTRC_TYPE_SU64, /* uint32_t key - GKHashStorage_ val */ MTRC_TYPE_IGKH, /* uint64_t key - uint32_t val */ MTRC_TYPE_U648, /* uint64_t key - GLastParse val */ MTRC_TYPE_IGLP, } GSMetricType; typedef struct GKHashMetric_ { union { GSMetric storem; GAMetric dbm; } metric; GSMetricType type; void *(*alloc) (void); void (*des) (void *, uint8_t free_data); void (*del) (void *, uint8_t free_data); uint8_t free_data:1; void *hash; const char *filename; } GKHashMetric; /* Each record contains a data value, i.e., Windows XP, and it may contain a * root value, i.e., Windows, and a unique key which is the combination of * date, IP and user agent */ typedef struct GKeyData_ { const void *data; uint32_t dhash; uint32_t data_nkey; uint32_t cdnkey; /* cache data nkey */ uint32_t rhash; const void *root; const void *root_key; uint32_t root_nkey; uint32_t crnkey; /* cache root nkey */ void *uniq_key; uint32_t uniq_nkey; uint32_t numdate; } GKeyData; typedef struct GParse_ { GModule module; int (*key_data) (GKeyData * kdata, GLogItem * logitem); /* data field */ void (*datamap) (GModule module, GKeyData * kdata); void (*rootmap) (GModule module, GKeyData * kdata); void (*hits) (GModule module, GKeyData * kdata); void (*visitor) (GModule module, GKeyData * kdata); void (*bw) (GModule module, GKeyData * kdata, uint64_t size); void (*cumts) (GModule module, GKeyData * kdata, uint64_t ts); void (*maxts) (GModule module, GKeyData * kdata, uint64_t ts); void (*method) (GModule module, GKeyData * kdata, const char *data); void (*protocol) (GModule module, GKeyData * kdata, const char *data); void (*agent) (GModule module, GKeyData * kdata, uint32_t agent_nkey); } GParse; typedef struct httpmethods_ { const char *method; int len; } httpmethods; typedef struct httpprotocols_ { const char *protocol; int len; } httpprotocols; extern const httpmethods http_methods[]; extern const httpprotocols http_protocols[]; extern const size_t http_methods_len; extern const size_t http_protocols_len; const char *get_mtr_str (GSMetric metric); int excluded_ip (GLogItem * logitem); uint32_t *i322ptr (uint32_t val); uint64_t *uint642ptr (uint64_t val); void count_process_and_invalid (GLog * glog, GLogItem * logitem, const char *line); void count_process (GLog * glog); void free_gmetrics (GMetrics * metric); void insert_methods_protocols (void); void process_log (GLogItem * logitem); void set_browser_os (GLogItem * logitem); void set_data_metrics (GMetrics * ometrics, GMetrics ** nmetrics, GPercTotals totals); void set_module_totals (GPercTotals * totals); void uncount_invalid (GLog * glog); void uncount_processed (GLog * glog); GMetrics *new_gmetrics (void); #endif // for #ifndef GSTORAGE_H goaccess-1.9.3/src/websocket.c0000644000175000017300000023676414624731651011746 /** * websocket.c -- An rfc6455-complaint Web Socket Server * _______ _______ __ __ * / ____/ | / / ___/____ _____/ /_____ / /_ * / / __ | | /| / /\__ \/ __ \/ ___/ //_/ _ \/ __/ * / /_/ / | |/ |/ /___/ / /_/ / /__/ ,< / __/ /_ * \____/ |__/|__//____/\____/\___/_/|_|\___/\__/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if HAVE_CONFIG_H #include #endif #include "websocket.h" #include "base64.h" #include "error.h" #include "gslist.h" #include "sha1.h" #include "util.h" #include "xmalloc.h" /* *INDENT-OFF* */ /* UTF-8 Decoder */ /* Copyright (c) 2008-2009 Bjoern Hoehrmann * See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. */ #define UTF8_VALID 0 #define UTF8_INVAL 1 static const uint8_t utf8d[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 00..1f */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 20..3f */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40..5f */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 60..7f */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, /* 80..9f */ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, /* a0..bf */ 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, /* c0..df */ 0xa,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3, /* e0..ef */ 0xb,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, /* f0..ff */ 0x0,0x1,0x2,0x3,0x5,0x8,0x7,0x1,0x1,0x1,0x4,0x6,0x1,0x1,0x1,0x1, /* s0..s0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1, /* s1..s2 */ 1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1, /* s3..s4 */ 1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,1,1,1,1,1,1, /* s5..s6 */ 1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* s7..s8 */ }; /* *INDENT-ON* */ static struct pollfd *fdstate = NULL; static nfds_t nfdstate = 0; static WSConfig wsconfig = { 0 }; static void handle_read_close (int *conn, WSClient * client, WSServer * server); static void handle_reads (int *conn, WSServer * server); static void handle_writes (int *conn, WSServer * server); #ifdef HAVE_LIBSSL static int shutdown_ssl (WSClient * client); #endif /* Determine if the given string is valid UTF-8. * * The state after the by has been processed is returned. */ static uint32_t verify_utf8 (uint32_t *state, const char *str, int len) { int i; uint32_t type; for (i = 0; i < len; ++i) { type = utf8d[(uint8_t) str[i]]; *state = utf8d[256 + (*state) * 16 + type]; if (*state == UTF8_INVAL) break; } return *state; } /* Decode a character maintaining state and a byte, and returns the * state achieved after processing the byte. * * The state after the by has been processed is returned. */ static uint32_t utf8_decode (uint32_t *state, uint32_t *p, uint32_t b) { uint32_t type = utf8d[(uint8_t) b]; *p = (*state != UTF8_VALID) ? (b & 0x3fu) | (*p << 6) : (0xff >> type) & (b); *state = utf8d[256 + *state * 16 + type]; return *state; } /* Replace malformed sequences with a substitute character. * * On success, it replaces the whole sequence and return a malloc'd buffer. */ static char * sanitize_utf8 (const char *str, int len) { char *buf = NULL; uint32_t state = UTF8_VALID, prev = UTF8_VALID, cp = 0; int i = 0, j = 0, k = 0, l = 0; buf = xcalloc (len + 1, sizeof (char)); for (; i < len; prev = state, ++i) { switch (utf8_decode (&state, &cp, (unsigned char) str[i])) { case UTF8_INVAL: /* replace the whole sequence */ if (k) { for (l = i - k; l < i; ++l) buf[j++] = '?'; } else { buf[j++] = '?'; } state = UTF8_VALID; if (prev != UTF8_VALID) i--; k = 0; break; case UTF8_VALID: /* fill i - k valid continuation bytes */ if (k) for (l = i - k; l < i; ++l) buf[j++] = str[l]; buf[j++] = str[i]; k = 0; break; default: /* UTF8_VALID + continuation bytes */ k++; break; } } return buf; } /* find a pollfd structure based on fd * this should only be called by set_pollfd and unset_pollfd * because the position in memory may change */ static struct pollfd * get_pollfd (int fd) { struct pollfd *pfd, *efd = fdstate + nfdstate; for (pfd = fdstate; pfd < efd; pfd++) { if (pfd->fd == fd) return pfd; } return NULL; } /* set flags for an existing pollfd structure based on fd, * otherwise malloc a new one */ static void set_pollfd (int fd, short flags) { struct pollfd *pfd; if (fd == -1) FATAL ("Cannot poll an invalid fd"); pfd = get_pollfd (fd); if (pfd == NULL) { struct pollfd *newstate = xrealloc (fdstate, sizeof (*pfd) * (nfdstate + 1)); fdstate = newstate; pfd = fdstate + nfdstate++; pfd->fd = fd; } pfd->events = flags; pfd->revents = 0; } /* free a pollfd structure based on fd */ static void unset_pollfd (int fd) { struct pollfd *pfd = get_pollfd (fd), *efd; struct pollfd *newstate; if (pfd == NULL) return; nfdstate--; /* avoid undefined behaviour with realloc with a size of zero */ if (nfdstate == 0) { free (fdstate); fdstate = NULL; return; } efd = fdstate + nfdstate; if (pfd != efd) memmove (pfd, pfd + 1, (char *) efd - (char *) pfd); /* realloc could fail, but that's ok, we don't mind. */ newstate = realloc (fdstate, sizeof (*pfd) * nfdstate); if (newstate != NULL) fdstate = newstate; } /* Allocate memory for a websocket server */ static WSServer * new_wsserver (void) { WSServer *server = xcalloc (1, sizeof (WSServer)); return server; } /* Allocate memory for a websocket client */ static WSClient * new_wsclient (void) { WSClient *client = xcalloc (1, sizeof (WSClient)); client->status = WS_OK; return client; } /* Allocate memory for a websocket header */ static WSHeaders * new_wsheader (void) { WSHeaders *headers = xcalloc (1, sizeof (WSHeaders)); memset (headers->buf, 0, sizeof (headers->buf)); headers->reading = 1; return headers; } /* Allocate memory for a websocket frame */ static WSFrame * new_wsframe (void) { WSFrame *frame = xcalloc (1, sizeof (WSFrame)); memset (frame->buf, 0, sizeof (frame->buf)); frame->reading = 1; return frame; } /* Allocate memory for a websocket message */ static WSMessage * new_wsmessage (void) { WSMessage *msg = xcalloc (1, sizeof (WSMessage)); return msg; } /* Allocate memory for a websocket pipeout */ static WSPipeOut * new_wspipeout (void) { WSPipeOut *pipeout = xcalloc (1, sizeof (WSPipeOut)); pipeout->fd = -1; return pipeout; } /* Allocate memory for a websocket pipein */ static WSPipeIn * new_wspipein (void) { WSPipeIn *pipein = xcalloc (1, sizeof (WSPipeIn)); pipein->fd = -1; return pipein; } /* Escapes the special characters, e.g., '\n', '\r', '\t', '\' * in the string source by inserting a '\' before them. * * On error NULL is returned. * On success the escaped string is returned */ static char * escape_http_request (const char *src) { char *dest, *q; const unsigned char *p; if (src == NULL || *src == '\0') return NULL; p = (const unsigned char *) src; q = dest = xmalloc (strlen (src) * 4 + 1); while (*p) { switch (*p) { case '\\': *q++ = '\\'; *q++ = '\\'; break; case '\n': *q++ = '\\'; *q++ = 'n'; break; case '\r': *q++ = '\\'; *q++ = 'r'; break; case '\t': *q++ = '\\'; *q++ = 't'; break; case '"': *q++ = '\\'; *q++ = '"'; break; default: if ((*p < ' ') || (*p >= 0177)) { /* not ASCII */ } else { *q++ = *p; } break; } p++; } *q = 0; return dest; } /* Chop n characters from the beginning of the supplied buffer. * * The new length of the string is returned. */ static size_t chop_nchars (char *str, size_t n, size_t len) { if (n == 0 || str == 0) return 0; if (n > len) n = len; memmove (str, str + n, len - n); return (len - n); } /* Match a client given a socket id and an item from the list. * * On match, 1 is returned, else 0. */ static int ws_find_client_sock_in_list (void *data, void *needle) { WSClient *client = data; return client->listener == (*(int *) needle); } /* Find a client given a socket id. * * On success, an instance of a GSLList node is returned, else NULL. */ static GSLList * ws_get_list_node_from_list (int listener, GSLList **colist) { GSLList *match = NULL; /* Find the client data for the socket in use */ if (!(match = list_find (*colist, ws_find_client_sock_in_list, &listener))) return NULL; return match; } /* Find a client given a socket id. * * On success, an instance of a WSClient is returned, else NULL. */ static WSClient * ws_get_client_from_list (int listener, GSLList **colist) { GSLList *match = NULL; /* Find the client data for the socket in use */ if (!(match = list_find (*colist, ws_find_client_sock_in_list, &listener))) return NULL; return (WSClient *) match->data; } /* Free a frame structure and its data for the given client. */ static void ws_free_frame (WSClient *client) { if (client->frame) free (client->frame); client->frame = NULL; } /* Free a message structure and its data for the given client. */ static void ws_free_message (WSClient *client) { if (client->message && client->message->payload) free (client->message->payload); if (client->message) free (client->message); client->message = NULL; } /* Free all HTTP handshake headers data for the given client. */ static void ws_free_header_fields (WSHeaders *headers) { if (headers->connection) free (headers->connection); if (headers->host) free (headers->host); if (headers->agent) free (headers->agent); if (headers->method) free (headers->method); if (headers->origin) free (headers->origin); if (headers->path) free (headers->path); if (headers->protocol) free (headers->protocol); if (headers->upgrade) free (headers->upgrade); if (headers->ws_accept) free (headers->ws_accept); if (headers->ws_key) free (headers->ws_key); if (headers->ws_protocol) free (headers->ws_protocol); if (headers->ws_resp) free (headers->ws_resp); if (headers->ws_sock_ver) free (headers->ws_sock_ver); if (headers->referer) free (headers->referer); } /* A wrapper to close a socket. */ static void ws_close (int listener) { unset_pollfd (listener); close (listener); } /* Clear the client's sent queue and its data. */ static void ws_clear_queue (WSClient *client) { WSQueue **queue = &client->sockqueue; if (!(*queue)) return; if ((*queue)->queued) free ((*queue)->queued); (*queue)->queued = NULL; (*queue)->qlen = 0; free ((*queue)); (*queue) = NULL; /* done sending the whole queue, stop throttling */ client->status &= ~WS_THROTTLING; /* done sending, close connection if set to close */ if ((client->status & WS_CLOSE) && (client->status & WS_SENDING)) client->status = WS_CLOSE; } /* Free all HTTP handshake headers and structure. */ static void ws_clear_handshake_headers (WSHeaders *headers) { ws_free_header_fields (headers); free (headers); } /* Remove the given client from the list. */ static void ws_remove_client_from_list (WSClient *client, WSServer *server) { GSLList *node = NULL; if (!(node = ws_get_list_node_from_list (client->listener, &server->colist))) return; if (client->headers) ws_clear_handshake_headers (client->headers); list_remove_node (&server->colist, node); } #if HAVE_LIBSSL /* Attempt to send the TLS/SSL "close notify" shutdown and and removes * the SSL structure pointed to by ssl and frees up the allocated * memory. */ static void ws_shutdown_dangling_clients (WSClient *client) { shutdown_ssl (client); SSL_free (client->ssl); client->ssl = NULL; } /* Attempt to remove the SSL_CTX object pointed to by ctx and frees up * the allocated memory and cleans some more generally used TLS/SSL * memory. */ static void ws_ssl_cleanup (WSServer *server) { if (!wsconfig.use_ssl) return; if (server->ctx) SSL_CTX_free (server->ctx); CRYPTO_cleanup_all_ex_data (); CRYPTO_set_id_callback (NULL); CRYPTO_set_locking_callback (NULL); ERR_free_strings (); #if OPENSSL_VERSION_NUMBER < 0x10100000L ERR_remove_state (0); #endif EVP_cleanup (); } #endif /* Remove all clients that are still hanging out. */ static int ws_remove_dangling_clients (void *value, void *user_data) { WSClient *client = value; (void) (user_data); if (client == NULL) return 1; if (client->headers) ws_clear_handshake_headers (client->headers); if (client->sockqueue) ws_clear_queue (client); #ifdef HAVE_LIBSSL if (client->ssl) ws_shutdown_dangling_clients (client); #endif return 0; } /* Do some housekeeping on the named pipe data packet. */ static void ws_clear_fifo_packet (WSPacket *packet) { if (!packet) return; if (packet->data) free (packet->data); free (packet); } /* Do some housekeeping on the named pipe. */ static void ws_clear_pipein (WSPipeIn *pipein) { WSPacket **packet = &pipein->packet; if (!pipein) return; if (pipein->fd != -1) ws_close (pipein->fd); ws_clear_fifo_packet (*packet); free (pipein); if (wsconfig.pipein && access (wsconfig.pipein, F_OK) != -1) unlink (wsconfig.pipein); } /* Do some housekeeping on the named pipe. */ static void ws_clear_pipeout (WSPipeOut *pipeout) { if (!pipeout) return; if (pipeout->fd != -1) ws_close (pipeout->fd); free (pipeout); if (wsconfig.pipeout && access (wsconfig.pipeout, F_OK) != -1) unlink (wsconfig.pipeout); } /* Stop the server and do some cleaning. */ void ws_stop (WSServer *server) { WSPipeIn **pipein = &server->pipein; WSPipeOut **pipeout = &server->pipeout; ws_clear_pipein (*pipein); ws_clear_pipeout (*pipeout); /* close access log (if any) */ if (wsconfig.accesslog) access_log_close (); /* remove dangling clients */ if (list_count (server->colist) > 0) list_foreach (server->colist, ws_remove_dangling_clients, NULL); if (server->colist) list_remove_nodes (server->colist); #ifdef HAVE_LIBSSL ws_ssl_cleanup (server); #endif free (server); free (fdstate); fdstate = NULL; } /* Set the connection status for the given client and return the given * bytes. * * The given number of bytes are returned. */ static int ws_set_status (WSClient *client, WSStatus status, int bytes) { client->status = status; return bytes; } /* Append the source string to destination and reallocates and * updating the destination buffer appropriately. */ static void ws_append_str (char **dest, const char *src) { size_t curlen = strlen (*dest); size_t srclen = strlen (src); size_t newlen = curlen + srclen; char *str = xrealloc (*dest, newlen + 1); memcpy (str + curlen, src, srclen + 1); *dest = str; } #if HAVE_LIBSSL /* Create a new SSL_CTX object as framework to establish TLS/SSL * enabled connections. * * On error 1 is returned. * On success, SSL_CTX object is malloc'd and 0 is returned. */ static int initialize_ssl_ctx (WSServer *server) { int ret = 1; SSL_CTX *ctx = NULL; #if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_library_init (); SSL_load_error_strings (); #endif /* Ciphers and message digests */ OpenSSL_add_ssl_algorithms (); /* ssl context */ #if OPENSSL_VERSION_NUMBER < 0x10100000L if (!(ctx = SSL_CTX_new (SSLv23_server_method ()))) #else if (!(ctx = SSL_CTX_new (TLS_server_method ()))) #endif goto out; /* set certificate */ if (!SSL_CTX_use_certificate_file (ctx, wsconfig.sslcert, SSL_FILETYPE_PEM)) goto out; /* ssl private key */ if (!SSL_CTX_use_PrivateKey_file (ctx, wsconfig.sslkey, SSL_FILETYPE_PEM)) goto out; if (!SSL_CTX_check_private_key (ctx)) goto out; /* since we queued up the send data, a retry won't be the same buffer, * thus we need the following flags */ SSL_CTX_set_mode (ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER | SSL_MODE_ENABLE_PARTIAL_WRITE); server->ctx = ctx; ret = 0; out: if (ret) { SSL_CTX_free (ctx); LOG (("Error: %s\n", ERR_error_string (ERR_get_error (), NULL))); } return ret; } /* Log result code for TLS/SSL I/O operation */ static void log_return_message (int ret, int err, const char *fn) { unsigned long e; switch (err) { case SSL_ERROR_NONE: LOG (("SSL: %s -> SSL_ERROR_NONE\n", fn)); LOG (("SSL: TLS/SSL I/O operation completed\n")); break; case SSL_ERROR_WANT_READ: LOG (("SSL: %s -> SSL_ERROR_WANT_READ\n", fn)); LOG (("SSL: incomplete, data available for reading\n")); break; case SSL_ERROR_WANT_WRITE: LOG (("SSL: %s -> SSL_ERROR_WANT_WRITE\n", fn)); LOG (("SSL: incomplete, data available for writing\n")); break; case SSL_ERROR_ZERO_RETURN: LOG (("SSL: %s -> SSL_ERROR_ZERO_RETURN\n", fn)); LOG (("SSL: TLS/SSL connection has been closed\n")); break; case SSL_ERROR_WANT_X509_LOOKUP: LOG (("SSL: %s -> SSL_ERROR_WANT_X509_LOOKUP\n", fn)); break; case SSL_ERROR_SYSCALL: LOG (("SSL: %s -> SSL_ERROR_SYSCALL\n", fn)); e = ERR_get_error (); if (e > 0) LOG (("SSL: %s -> %s\n", fn, ERR_error_string (e, NULL))); /* call was not successful because a fatal error occurred either at the * protocol level or a connection failure occurred. */ if (ret != 0) { LOG (("SSL bogus handshake interrupt: %s\n", strerror (errno))); break; } /* call not yet finished. */ LOG (("SSL: handshake interrupted, got EOF\n")); if (errno == EINTR || errno == EWOULDBLOCK || errno == EAGAIN) LOG (("SSL: %s -> not yet finished %s\n", fn, strerror (errno))); break; default: LOG (("SSL: %s -> failed fatal error code: %d\n", fn, err)); LOG (("SSL: %s\n", ERR_error_string (ERR_get_error (), NULL))); break; } } /* Shut down the client's TLS/SSL connection * * On fatal error, 1 is returned. * If data still needs to be read/written, -1 is returned. * On success, the TLS/SSL connection is closed and 0 is returned */ static int shutdown_ssl (WSClient *client) { int ret = -1, err = 0; /* all good */ if ((ret = SSL_shutdown (client->ssl)) > 0) return ws_set_status (client, WS_CLOSE, 0); err = SSL_get_error (client->ssl, ret); log_return_message (ret, err, "SSL_shutdown"); switch (err) { case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: client->sslstatus = WS_TLS_SHUTTING; break; case SSL_ERROR_SYSCALL: if (ret == 0) { LOG (("SSL: SSL_shutdown, connection unexpectedly closed by peer.\n")); /* The shutdown is not yet finished. */ if (errno == EINTR || errno == EWOULDBLOCK || errno == EAGAIN) client->sslstatus = WS_TLS_SHUTTING; break; } LOG (("SSL: SSL_shutdown, probably unrecoverable, forcing close.\n")); /* FALLTHRU */ case SSL_ERROR_ZERO_RETURN: case SSL_ERROR_WANT_X509_LOOKUP: default: return ws_set_status (client, WS_ERR | WS_CLOSE, 1); } return ret; } /* Wait for a TLS/SSL client to initiate a TLS/SSL handshake * * On fatal error, the connection is shut down. * If data still needs to be read/written, -1 is returned. * On success, the TLS/SSL connection is completed and 0 is returned */ static int accept_ssl (WSClient *client) { int ret = -1, err = 0; /* all good on TLS handshake */ if ((ret = SSL_accept (client->ssl)) > 0) { client->sslstatus &= ~WS_TLS_ACCEPTING; return 0; } err = SSL_get_error (client->ssl, ret); log_return_message (ret, err, "SSL_accept"); switch (err) { case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: client->sslstatus = WS_TLS_ACCEPTING; break; case SSL_ERROR_SYSCALL: /* Wait for more activity else bail out, for instance if the socket is closed * during the handshake. */ if (ret < 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { client->sslstatus = WS_TLS_ACCEPTING; break; } /* The peer notified that it is shutting down through a SSL "close_notify" so * we shutdown too */ /* FALLTHRU */ case SSL_ERROR_ZERO_RETURN: case SSL_ERROR_WANT_X509_LOOKUP: default: client->sslstatus &= ~WS_TLS_ACCEPTING; return ws_set_status (client, WS_ERR | WS_CLOSE, 1); } return ret; } /* Create a new SSL structure for a connection and perform handshake */ static void handle_accept_ssl (WSClient *client, WSServer *server) { /* attempt to create SSL connection if we don't have one yet */ if (!client->ssl) { if (!(client->ssl = SSL_new (server->ctx))) { LOG (("SSL: SSL_new, new SSL structure failed.\n")); return; } if (!SSL_set_fd (client->ssl, client->listener)) { LOG (("SSL: unable to set file descriptor\n")); return; } } /* attempt to initiate the TLS/SSL handshake */ if (accept_ssl (client) == 0) { LOG (("SSL Accepted: %d %s\n", client->listener, client->remote_ip)); } } /* Given the current status of the SSL buffer, perform that action. * * On error or if no SSL pending status, 1 is returned. * On success, the TLS/SSL pending action is called and 0 is returned */ static int handle_ssl_pending_rw (int *conn, WSServer *server, WSClient *client) { if (!wsconfig.use_ssl) return 1; /* trying to write but still waiting for a successful SSL_accept */ if (client->sslstatus & WS_TLS_ACCEPTING) { handle_accept_ssl (client, server); return 0; } /* trying to read but still waiting for a successful SSL_read */ if (client->sslstatus & WS_TLS_READING) { handle_reads (conn, server); return 0; } /* trying to write but still waiting for a successful SSL_write */ if (client->sslstatus & WS_TLS_WRITING) { handle_writes (conn, server); return 0; } /* trying to write but still waiting for a successful SSL_shutdown */ if (client->sslstatus & WS_TLS_SHUTTING) { if (shutdown_ssl (client) == 0) handle_read_close (conn, client, server); return 0; } return 1; } /* Write bytes to a TLS/SSL connection for a given client. * * On error or if no write is performed <=0 is returned. * On success, the number of bytes actually written to the TLS/SSL * connection are returned */ static int send_ssl_buffer (WSClient *client, const char *buffer, int len) { int bytes = 0, err = 0; #if OPENSSL_VERSION_NUMBER < 0x10100000L ERR_clear_error (); #endif if ((bytes = SSL_write (client->ssl, buffer, len)) > 0) return bytes; err = SSL_get_error (client->ssl, bytes); log_return_message (bytes, err, "SSL_write"); switch (err) { case SSL_ERROR_WANT_WRITE: break; case SSL_ERROR_WANT_READ: client->sslstatus = WS_TLS_WRITING; break; case SSL_ERROR_SYSCALL: if ((bytes < 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR))) break; /* The connection was shut down cleanly */ /* FALLTHRU */ case SSL_ERROR_ZERO_RETURN: case SSL_ERROR_WANT_X509_LOOKUP: default: return ws_set_status (client, WS_ERR | WS_CLOSE, -1); } return bytes; } /* Read data from the given client's socket and set a connection * status given the output of recv(). * * On error, -1 is returned and the connection status is set. * On success, the number of bytes read is returned. */ static int read_ssl_socket (WSClient *client, char *buffer, int size) { int bytes = 0, done = 0, err = 0; do { #if OPENSSL_VERSION_NUMBER < 0x10100000L ERR_clear_error (); #endif done = 0; if ((bytes = SSL_read (client->ssl, buffer, size)) > 0) break; err = SSL_get_error (client->ssl, bytes); log_return_message (bytes, err, "SSL_read"); switch (err) { case SSL_ERROR_WANT_WRITE: client->sslstatus = WS_TLS_READING; done = 1; break; case SSL_ERROR_WANT_READ: done = 1; break; case SSL_ERROR_SYSCALL: if ((bytes < 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR))) break; /* FALLTHRU */ case SSL_ERROR_ZERO_RETURN: case SSL_ERROR_WANT_X509_LOOKUP: default: return ws_set_status (client, WS_ERR | WS_CLOSE, -1); } } while (SSL_pending (client->ssl) && !done); return bytes; } #endif /* Get sockaddr, either IPv4 or IPv6 */ static void * ws_get_raddr (struct sockaddr *sa) { if (sa->sa_family == AF_INET) return &(((struct sockaddr_in *) (void *) sa)->sin_addr); return &(((struct sockaddr_in6 *) (void *) sa)->sin6_addr); } /* Set the given file descriptor as NON BLOCKING. */ void set_nonblocking (int sock) { if (fcntl (sock, F_SETFL, fcntl (sock, F_GETFL, 0) | O_NONBLOCK) == -1) FATAL ("Unable to set socket as non-blocking: %s.", strerror (errno)); } /* Accept a new connection on a socket and add it to the list of * current connected clients. * * The newly assigned socket is returned. */ static int accept_client (int listener, GSLList **colist) { WSClient *client; struct sockaddr_storage raddr; int newfd; const void *src = NULL; socklen_t alen; alen = sizeof (raddr); if ((newfd = accept (listener, (struct sockaddr *) &raddr, &alen)) == -1) FATAL ("Unable to set accept: %s.", strerror (errno)); if (newfd == -1) { LOG (("Unable to accept: %s.", strerror (errno))); return newfd; } src = ws_get_raddr ((struct sockaddr *) &raddr); /* malloc a new client */ client = new_wsclient (); client->listener = newfd; inet_ntop (raddr.ss_family, src, client->remote_ip, INET6_ADDRSTRLEN); /* add up our new client to keep track of */ if (*colist == NULL) *colist = list_create (client); else *colist = list_insert_prepend (*colist, client); /* make the socket non-blocking */ set_nonblocking (client->listener); /* poll for the socket */ set_pollfd (client->listener, POLLIN); return newfd; } /* Extract the HTTP method. * * On error, or if not found, NULL is returned. * On success, the HTTP method is returned. */ static const char * ws_get_method (const char *token) { const char *lookfor = NULL; if ((lookfor = "GET", !memcmp (token, "GET ", 4)) || (lookfor = "get", !memcmp (token, "get ", 4))) return lookfor; return NULL; } /* Parse a request containing the method and protocol. * * On error, or unable to parse, NULL is returned. * On success, the HTTP request is returned and the method and * protocol are assigned to the corresponding buffers. */ static char * ws_parse_request (char *line, char **method, char **protocol) { const char *meth; char *req = NULL, *request = NULL, *proto = NULL; ptrdiff_t rlen; if ((meth = ws_get_method (line)) == NULL) { return NULL; } else { req = line + strlen (meth); if ((proto = strstr (line, " HTTP/1.0")) == NULL && (proto = strstr (line, " HTTP/1.1")) == NULL) return NULL; req++; if ((rlen = proto - req) <= 0) return NULL; request = xmalloc (rlen + 1); strncpy (request, req, rlen); request[rlen] = 0; (*method) = strtoupper (xstrdup (meth)); (*protocol) = strtoupper (xstrdup (++proto)); } return request; } /* Given a pair of key/values, assign it to our HTTP headers * structure. */ static void ws_set_header_key_value (WSHeaders *headers, char *key, char *value) { if (strcasecmp ("Host", key) == 0) headers->host = xstrdup (value); else if (strcasecmp ("Origin", key) == 0) headers->origin = xstrdup (value); else if (strcasecmp ("Upgrade", key) == 0) headers->upgrade = xstrdup (value); else if (strcasecmp ("Connection", key) == 0) headers->connection = xstrdup (value); else if (strcasecmp ("Sec-WebSocket-Protocol", key) == 0) headers->ws_protocol = xstrdup (value); else if (strcasecmp ("Sec-WebSocket-Key", key) == 0) headers->ws_key = xstrdup (value); else if (strcasecmp ("Sec-WebSocket-Version", key) == 0) headers->ws_sock_ver = xstrdup (value); else if (strcasecmp ("User-Agent", key) == 0) headers->agent = xstrdup (value); else if (strcasecmp ("Referer", key) == 0) headers->referer = xstrdup (value); } /* Verify that the given HTTP headers were passed upon doing the * websocket handshake. * * On error, or header missing, 1 is returned. * On success, 0 is returned. */ static int ws_verify_req_headers (WSHeaders *headers) { if (!headers->host) return 1; if (!headers->method) return 1; if (!headers->protocol) return 1; if (!headers->path) return 1; if (wsconfig.origin && !headers->origin) return 1; if (wsconfig.origin && strcasecmp (wsconfig.origin, headers->origin) != 0) return 1; if (!headers->connection) return 1; if (!headers->ws_key) return 1; if (!headers->ws_sock_ver) return 1; return 0; } /* From RFC2616, each header field consists of a name followed by a * colon (":") and the field value. Field names are case-insensitive. * The field value MAY be preceded by any amount of LWS, though a * single SP is preferred */ static int ws_set_header_fields (char *line, WSHeaders *headers) { char *path = NULL, *method = NULL, *proto = NULL, *p, *value; if (line[0] == '\n' || line[0] == '\r') return 1; if ((strstr (line, "GET ")) || (strstr (line, "get "))) { if ((path = ws_parse_request (line, &method, &proto)) == NULL) return 1; headers->path = path; headers->method = method; headers->protocol = proto; return 0; } if ((p = strchr (line, ':')) == NULL) return 1; value = p + 1; while (p != line && isspace ((unsigned char) *(p - 1))) p--; if (p == line) return 1; *p = '\0'; if (strpbrk (line, " \t") != NULL) { *p = ' '; return 1; } while (isspace ((unsigned char) *value)) value++; ws_set_header_key_value (headers, line, value); return 0; } /* Parse the given HTTP headers and set the expected websocket * handshake. * * On error, or 1 is returned. * On success, 0 is returned. */ static int parse_headers (WSHeaders *headers) { char *tmp = NULL; const char *buffer = headers->buf; const char *line = buffer, *next = NULL; int len = 0; while (line) { if ((next = strstr (line, "\r\n")) != NULL) len = (next - line); else len = strlen (line); if (len <= 0) return 1; tmp = xmalloc (len + 1); memcpy (tmp, line, len); tmp[len] = '\0'; if (ws_set_header_fields (tmp, headers) == 1) { free (tmp); return 1; } free (tmp); line = next ? (next + 2) : NULL; if (next && strcmp (next, "\r\n\r\n") == 0) break; } return 0; } /* Set into a queue the data that couldn't be sent. */ static void ws_queue_sockbuf (WSClient *client, const char *buffer, int len, int bytes) { WSQueue *queue = xcalloc (1, sizeof (WSQueue)); if (bytes < 1) bytes = 0; queue->queued = xcalloc (len - bytes, sizeof (char)); memcpy (queue->queued, buffer + bytes, len - bytes); queue->qlen = len - bytes; client->sockqueue = queue; client->status |= WS_SENDING; set_pollfd (client->listener, POLLIN | POLLOUT); } /* Read data from the given client's socket and set a connection * status given the output of recv(). * * On error, -1 is returned and the connection status is set. * On success, the number of bytes read is returned. */ static int read_plain_socket (WSClient *client, char *buffer, int size) { int bytes = 0; bytes = recv (client->listener, buffer, size, 0); if (bytes == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) return ws_set_status (client, WS_READING, bytes); else if (bytes == -1 || bytes == 0) return ws_set_status (client, WS_ERR | WS_CLOSE, bytes); return bytes; } /* Read data from the given client's socket and set a connection * status given the output of recv(). * * On error, -1 is returned and the connection status is set. * On success, the number of bytes read is returned. */ static int read_socket (WSClient *client, char *buffer, int size) { #ifdef HAVE_LIBSSL if (wsconfig.use_ssl) return read_ssl_socket (client, buffer, size); else return read_plain_socket (client, buffer, size); #else return read_plain_socket (client, buffer, size); #endif } static int send_plain_buffer (WSClient *client, const char *buffer, int len) { return send (client->listener, buffer, len, 0); } static int send_buffer (WSClient *client, const char *buffer, int len) { #ifdef HAVE_LIBSSL if (wsconfig.use_ssl) return send_ssl_buffer (client, buffer, len); else return send_plain_buffer (client, buffer, len); #else return send_plain_buffer (client, buffer, len); #endif } /* Attempt to send the given buffer to the given socket. * * On error, -1 is returned and the connection status is set. * On success, the number of bytes sent is returned. */ static int ws_respond_data (WSClient *client, const char *buffer, int len) { int bytes = 0; bytes = send_buffer (client, buffer, len); if (bytes == -1 && errno == EPIPE) return ws_set_status (client, WS_ERR | WS_CLOSE, bytes); /* did not send all of it... buffer it for a later attempt */ if (bytes < len || (bytes == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))) ws_queue_sockbuf (client, buffer, len, bytes); return bytes; } /* Attempt to send the queued up client's data to the given socket. * * On error, -1 is returned and the connection status is set. * On success, the number of bytes sent is returned. */ static int ws_respond_cache (WSClient *client) { WSQueue *queue = client->sockqueue; int bytes = 0; bytes = send_buffer (client, queue->queued, queue->qlen); if (bytes == -1 && errno == EPIPE) return ws_set_status (client, WS_ERR | WS_CLOSE, bytes); if (bytes == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) return bytes; if (chop_nchars (queue->queued, bytes, queue->qlen) == 0) ws_clear_queue (client); else queue->qlen -= bytes; return bytes; } /* Attempt to realloc the current sent queue. * * On error, 1 is returned and the connection status is set. * On success, 0 is returned. */ static int ws_realloc_send_buf (WSClient *client, const char *buf, int len) { WSQueue *queue = client->sockqueue; char *tmp = NULL; int newlen = 0; newlen = queue->qlen + len; tmp = realloc (queue->queued, newlen); if (tmp == NULL && newlen > 0) { ws_clear_queue (client); return ws_set_status (client, WS_ERR | WS_CLOSE, 1); } queue->queued = tmp; memcpy (queue->queued + queue->qlen, buf, len); queue->qlen += len; /* client probably too slow, so stop queueing until everything is * sent */ if (queue->qlen >= WS_THROTTLE_THLD) client->status |= WS_THROTTLING; return 0; } /* An entry point to attempt to send the client's data. * * On error, 1 is returned and the connection status is set. * On success, the number of bytes sent is returned. */ static int ws_respond (WSClient *client, const char *buffer, int len) { int bytes = 0; /* attempt to send the whole buffer */ if (client->sockqueue == NULL) bytes = ws_respond_data (client, buffer, len); /* buffer not empty, just append new data iff we're not throttling the * client */ else if (client->sockqueue != NULL && buffer != NULL && !(client->status & WS_THROTTLING)) { if (ws_realloc_send_buf (client, buffer, len) == 1) return bytes; } /* send from cache buffer */ else { bytes = ws_respond_cache (client); } return bytes; } /* Encode a websocket frame (header/message) and attempt to send it * through the client's socket. * * On success, 0 is returned. */ static int ws_send_frame (WSClient *client, WSOpcode opcode, const char *p, int sz) { unsigned char buf[32] = { 0 }; char *frm = NULL; uint64_t payloadlen = 0, u64; int hsize = 2; if (sz < 126) { payloadlen = sz; } else if (sz < (1 << 16)) { payloadlen = WS_PAYLOAD_EXT16; hsize += 2; } else { payloadlen = WS_PAYLOAD_EXT64; hsize += 8; } buf[0] = 0x80 | ((uint8_t) opcode); switch (payloadlen) { case WS_PAYLOAD_EXT16: buf[1] = WS_PAYLOAD_EXT16; buf[2] = (sz & 0xff00) >> 8; buf[3] = (sz & 0x00ff) >> 0; break; case WS_PAYLOAD_EXT64: buf[1] = WS_PAYLOAD_EXT64; u64 = htobe64 (sz); memcpy (buf + 2, &u64, sizeof (uint64_t)); break; default: buf[1] = (sz & 0xff); } frm = xcalloc (hsize + sz, sizeof (unsigned char)); memcpy (frm, buf, hsize); if (p != NULL && sz > 0) memcpy (frm + hsize, p, sz); ws_respond (client, frm, hsize + sz); free (frm); return 0; } /* Send an error message to the given client. * * On success, the number of sent bytes is returned. */ static int ws_error (WSClient *client, unsigned short code, const char *err) { unsigned int len; unsigned short code_be; char buf[128] = { 0 }; len = 2; code_be = htobe16 (code); memcpy (buf, &code_be, 2); if (err) len += snprintf (buf + 2, sizeof buf - 4, "%s", err); return ws_send_frame (client, WS_OPCODE_CLOSE, buf, len); } /* Log hit to the access log. * * On success, the hit/entry is logged. */ static void access_log (WSClient *client, int status_code) { WSHeaders *hdrs = client->headers; char buf[64] = { 0 }; uint32_t elapsed = 0; struct timeval tv; struct tm time; char *req = NULL, *ref = NULL, *ua = NULL; gettimeofday (&tv, NULL); strftime (buf, sizeof (buf) - 1, "[%d/%b/%Y:%H:%M:%S %z]", localtime_r (&tv.tv_sec, &time)); elapsed = (client->end_proc.tv_sec - client->start_proc.tv_sec) * 1000.0; elapsed += (client->end_proc.tv_usec - client->start_proc.tv_usec) / 1000.0; req = escape_http_request (hdrs->path); ref = escape_http_request (hdrs->referer); ua = escape_http_request (hdrs->agent); ACCESS_LOG (("%s ", client->remote_ip)); ACCESS_LOG (("- - ")); ACCESS_LOG (("%s ", buf)); ACCESS_LOG (("\"%s ", hdrs->method)); ACCESS_LOG (("%s ", req ? req : "-")); ACCESS_LOG (("%s\" ", hdrs->protocol)); ACCESS_LOG (("%d ", status_code)); ACCESS_LOG (("%d ", hdrs->buflen)); ACCESS_LOG (("\"%s\" ", ref ? ref : "-")); ACCESS_LOG (("\"%s\" ", ua ? ua : "-")); ACCESS_LOG (("%u\n", elapsed)); if (req) free (req); if (ref) free (ref); if (ua) free (ua); } /* Send an HTTP error status to the given client. * * On success, the number of sent bytes is returned. */ static int http_error (WSClient *client, const char *buffer) { /* do access logging */ gettimeofday (&client->end_proc, NULL); if (wsconfig.accesslog) access_log (client, 400); return ws_respond (client, buffer, strlen (buffer)); } /* Compute the SHA1 for the handshake. */ static void ws_sha1_digest (char *s, int len, unsigned char *digest) { SHA1_CTX sha; SHA1Init (&sha); SHA1Update (&sha, (uint8_t *) s, len); SHA1Final (digest, &sha); } /* Set the parsed websocket handshake headers. */ static void ws_set_handshake_headers (WSHeaders *headers) { size_t klen = strlen (headers->ws_key); size_t mlen = strlen (WS_MAGIC_STR); size_t len = klen + mlen; char *s = xmalloc (klen + mlen + 1); uint8_t digest[SHA_DIGEST_LENGTH]; memset (digest, 0, sizeof *digest); memcpy (s, headers->ws_key, klen); memcpy (s + klen, WS_MAGIC_STR, mlen + 1); ws_sha1_digest (s, len, digest); /* set response headers */ headers->ws_accept = base64_encode ((unsigned char *) digest, sizeof (digest)); headers->ws_resp = xstrdup (WS_SWITCH_PROTO_STR); if (!headers->upgrade) headers->upgrade = xstrdup ("websocket"); if (!headers->connection) headers->connection = xstrdup ("Upgrade"); free (s); } /* Send the websocket handshake headers to the given client. * * On success, the number of sent bytes is returned. */ static int ws_send_handshake_headers (WSClient *client, WSHeaders *headers) { int bytes = 0; char *str = xstrdup (""); ws_append_str (&str, headers->ws_resp); ws_append_str (&str, CRLF); ws_append_str (&str, "Upgrade: "); ws_append_str (&str, headers->upgrade); ws_append_str (&str, CRLF); ws_append_str (&str, "Connection: "); ws_append_str (&str, headers->connection); ws_append_str (&str, CRLF); ws_append_str (&str, "Sec-WebSocket-Accept: "); ws_append_str (&str, headers->ws_accept); ws_append_str (&str, CRLF CRLF); bytes = ws_respond (client, str, strlen (str)); free (str); return bytes; } /* Given the HTTP connection headers, attempt to parse the web socket * handshake headers. * * On success, the number of sent bytes is returned. */ static int ws_get_handshake (WSClient *client, WSServer *server) { int bytes = 0, readh = 0; char *buf = NULL; if (client->headers == NULL) client->headers = new_wsheader (); buf = client->headers->buf; readh = client->headers->buflen; /* Probably the connection was closed before finishing handshake */ if ((bytes = read_socket (client, buf + readh, WS_MAX_HEAD_SZ - readh)) < 1) { if (client->status & WS_CLOSE) { LOG (("Connection aborted %d [%s]...\n", client->listener, client->remote_ip)); http_error (client, WS_BAD_REQUEST_STR); } LOG (("Can't establish handshake %d [%s]...\n", client->listener, client->remote_ip)); return ws_set_status (client, WS_CLOSE, bytes); } client->headers->buflen += bytes; buf[client->headers->buflen] = '\0'; /* null-terminate */ /* Must have a \r\n\r\n */ if (strstr (buf, "\r\n\r\n") == NULL) { if (strlen (buf) < WS_MAX_HEAD_SZ) { LOG (("Headers too long %d [%s]...\n", client->listener, client->remote_ip)); return ws_set_status (client, WS_READING, bytes); } LOG (("Invalid newlines for handshake %d [%s]...\n", client->listener, client->remote_ip)); http_error (client, WS_BAD_REQUEST_STR); return ws_set_status (client, WS_CLOSE, bytes); } /* Ensure we have valid HTTP headers for the handshake */ if (parse_headers (client->headers) != 0) { LOG (("Invalid headers for handshake %d [%s]...\n", client->listener, client->remote_ip)); http_error (client, WS_BAD_REQUEST_STR); return ws_set_status (client, WS_CLOSE, bytes); } /* Ensure we have the required headers */ if (ws_verify_req_headers (client->headers) != 0) { LOG (("Missing headers for handshake %d [%s]...\n", client->listener, client->remote_ip)); http_error (client, WS_BAD_REQUEST_STR); return ws_set_status (client, WS_CLOSE, bytes); } ws_set_handshake_headers (client->headers); /* handshake response */ ws_send_handshake_headers (client, client->headers); /* upon success, call onopen() callback */ if (server->onopen && wsconfig.strict && !wsconfig.echomode) server->onopen (server->pipeout, client); client->headers->reading = 0; /* do access logging */ gettimeofday (&client->end_proc, NULL); if (wsconfig.accesslog) access_log (client, 101); LOG (("Active: %d\n", list_count (server->colist))); return ws_set_status (client, WS_OK, bytes); } /* Send a data message to the given client. * * On success, 0 is returned. */ int ws_send_data (WSClient *client, WSOpcode opcode, const char *p, int sz) { char *buf = NULL; buf = sanitize_utf8 (p, sz); ws_send_frame (client, opcode, buf, sz); free (buf); return 0; } /* Read a websocket frame's header. * * On success, the number of bytes read is returned. */ static int ws_read_header (WSClient *client, WSFrame *frm, int pos, int need) { char *buf = frm->buf; int bytes = 0; /* read the first 2 bytes for basic frame info */ if ((bytes = read_socket (client, buf + pos, need)) < 1) { if (client->status & WS_CLOSE) ws_error (client, WS_CLOSE_UNEXPECTED, "Unable to read header"); return bytes; } frm->buflen += bytes; frm->buf[frm->buflen] = '\0'; /* null-terminate */ return bytes; } /* Read a websocket frame's payload. * * On success, the number of bytes read is returned. */ static int ws_read_payload (WSClient *client, WSMessage *msg, int pos, int need) { char *buf = msg->payload; int bytes = 0; /* read the first 2 bytes for basic frame info */ if ((bytes = read_socket (client, buf + pos, need)) < 1) { if (client->status & WS_CLOSE) ws_error (client, WS_CLOSE_UNEXPECTED, "Unable to read payload"); return bytes; } msg->buflen += bytes; msg->payloadsz += bytes; return bytes; } /* Set the basic frame headers on a frame structure. * * On success, 0 is returned. */ static int ws_set_front_header_fields (WSClient *client) { WSFrame **frm = &client->frame; char *buf = (*frm)->buf; (*frm)->fin = WS_FRM_FIN (*(buf)); (*frm)->masking = WS_FRM_MASK (*(buf + 1)); (*frm)->opcode = WS_FRM_OPCODE (*(buf)); (*frm)->res = WS_FRM_R1 (*(buf)) || WS_FRM_R2 (*(buf)) || WS_FRM_R3 (*(buf)); /* should be masked and can't be using RESVd bits */ if (!(*frm)->masking || (*frm)->res) return ws_set_status (client, WS_ERR | WS_CLOSE, 1); return 0; } /* Unmask the payload given the current frame's masking key. */ static void ws_unmask_payload (char *buf, int len, int offset, unsigned char mask[]) { int i, j = 0; /* unmask data */ for (i = offset; i < len; ++i, ++j) { buf[i] ^= mask[j % 4]; } } /* Close a websocket connection. */ static int ws_handle_close (WSClient *client) { client->status = WS_ERR | WS_CLOSE; return ws_send_frame (client, WS_OPCODE_CLOSE, NULL, 0); } /* Handle a websocket error. * * On success, the number of bytes sent is returned. */ static int ws_handle_err (WSClient *client, unsigned short code, WSStatus status, const char *m) { client->status = status; return ws_error (client, code, m); } /* Handle a websocket pong. */ static void ws_handle_pong (WSClient *client) { WSFrame **frm = &client->frame; if (!(*frm)->fin) { ws_handle_err (client, WS_CLOSE_PROTO_ERR, WS_ERR | WS_CLOSE, NULL); return; } ws_free_message (client); } /* Handle a websocket ping from the client and it attempts to send * back a pong as soon as possible. */ static void ws_handle_ping (WSClient *client) { WSFrame **frm = &client->frame; WSMessage **msg = &client->message; char *buf = NULL, *tmp = NULL; int pos = 0, len = (*frm)->payloadlen, newlen = 0; /* RFC states that Control frames themselves MUST NOT be * fragmented. */ if (!(*frm)->fin) { ws_handle_err (client, WS_CLOSE_PROTO_ERR, WS_ERR | WS_CLOSE, NULL); return; } /* Control frames are only allowed to have payload up to and * including 125 octets */ if ((*frm)->payloadlen > 125) { ws_handle_err (client, WS_CLOSE_PROTO_ERR, WS_ERR | WS_CLOSE, NULL); return; } /* No payload from ping */ if (len == 0) { ws_send_frame (client, WS_OPCODE_PONG, NULL, 0); return; } /* Copy the ping payload */ pos = (*msg)->payloadsz - len; buf = xcalloc (len, sizeof (char)); memcpy (buf, (*msg)->payload + pos, len); /* Unmask it */ ws_unmask_payload (buf, len, 0, (*frm)->mask); /* Resize the current payload (keep an eye on this realloc) */ newlen = (*msg)->payloadsz - len; tmp = realloc ((*msg)->payload, newlen); if (tmp == NULL && newlen > 0) { free ((*msg)->payload); free (buf); (*msg)->payload = NULL; client->status = WS_ERR | WS_CLOSE; return; } (*msg)->payload = tmp; (*msg)->payloadsz -= len; ws_send_frame (client, WS_OPCODE_PONG, buf, len); (*msg)->buflen = 0; /* done with the current frame's payload */ /* Control frame injected in the middle of a fragmented message. */ if (!(*msg)->fragmented) { ws_free_message (client); } free (buf); } /* Ensure we have valid UTF-8 text payload. * * On error, or if the message is invalid, 1 is returned. * On success, or if the message is valid, 0 is returned. */ int ws_validate_string (const char *str, int len) { uint32_t state = UTF8_VALID; if (verify_utf8 (&state, str, len) == UTF8_INVAL) { LOG (("Invalid UTF8 data!\n")); return 1; } if (state != UTF8_VALID) { LOG (("Invalid UTF8 data!\n")); return 1; } return 0; } /* It handles a text or binary message frame from the client. */ static void ws_handle_text_bin (WSClient *client, WSServer *server) { WSFrame **frm = &client->frame; WSMessage **msg = &client->message; int offset = (*msg)->mask_offset; /* All data frames after the initial data frame must have opcode 0 */ if ((*msg)->fragmented && (*frm)->opcode != WS_OPCODE_CONTINUATION) { client->status = WS_ERR | WS_CLOSE; return; } /* RFC states that there is a new masking key per frame, therefore, * time to unmask... */ ws_unmask_payload ((*msg)->payload, (*msg)->payloadsz, offset, (*frm)->mask); /* Done with the current frame's payload */ (*msg)->buflen = 0; /* Reading a fragmented frame */ (*msg)->fragmented = 1; if (!(*frm)->fin) return; /* validate text data encoded as UTF-8 */ if ((*msg)->opcode == WS_OPCODE_TEXT) { if (ws_validate_string ((*msg)->payload, (*msg)->payloadsz) != 0) { ws_handle_err (client, WS_CLOSE_INVALID_UTF8, WS_ERR | WS_CLOSE, NULL); return; } } if ((*msg)->opcode != WS_OPCODE_CONTINUATION && server->onmessage) { /* just echo the message to the client */ if (wsconfig.echomode) ws_send_data (client, (*msg)->opcode, (*msg)->payload, (*msg)->payloadsz); /* just pipe out the message */ else if (!wsconfig.strict) ws_write_fifo (server->pipeout, (*msg)->payload, (*msg)->payloadsz); else server->onmessage (server->pipeout, client); } ws_free_message (client); } /* Depending on the frame opcode, then we take certain decisions. */ static void ws_manage_payload_opcode (WSClient *client, WSServer *server) { WSFrame **frm = &client->frame; WSMessage **msg = &client->message; switch ((*frm)->opcode) { case WS_OPCODE_CONTINUATION: LOG (("CONTINUATION\n")); /* first frame can't be a continuation frame */ if (!(*msg)->fragmented) { client->status = WS_ERR | WS_CLOSE; break; } ws_handle_text_bin (client, server); break; case WS_OPCODE_TEXT: case WS_OPCODE_BIN: LOG (("TEXT\n")); client->message->opcode = (*frm)->opcode; ws_handle_text_bin (client, server); break; case WS_OPCODE_PONG: LOG (("PONG\n")); ws_handle_pong (client); break; case WS_OPCODE_PING: LOG (("PING\n")); ws_handle_ping (client); break; default: LOG (("CLOSE\n")); ws_handle_close (client); } } /* Set the extended payload length into the given pointer. */ static void ws_set_extended_header_size (const char *buf, int *extended) { uint64_t payloadlen = 0; /* determine the payload length, else read more data */ payloadlen = WS_FRM_PAYLOAD (*(buf + 1)); switch (payloadlen) { case WS_PAYLOAD_EXT16: *extended = 2; break; case WS_PAYLOAD_EXT64: *extended = 8; break; } } /* Set the extended payload length into our frame structure. */ static void ws_set_payloadlen (WSFrame *frm, const char *buf) { uint64_t payloadlen = 0, len64; uint16_t len16; /* determine the payload length, else read more data */ payloadlen = WS_FRM_PAYLOAD (*(buf + 1)); switch (payloadlen) { case WS_PAYLOAD_EXT16: memcpy (&len16, (buf + 2), sizeof (uint16_t)); frm->payloadlen = ntohs (len16); break; case WS_PAYLOAD_EXT64: memcpy (&len64, (buf + 2), sizeof (uint64_t)); frm->payloadlen = be64toh (len64); break; default: frm->payloadlen = payloadlen; } } /* Set the masking key into our frame structure. */ static void ws_set_masking_key (WSFrame *frm, const char *buf) { uint64_t payloadlen = 0; /* determine the payload length, else read more data */ payloadlen = WS_FRM_PAYLOAD (*(buf + 1)); switch (payloadlen) { case WS_PAYLOAD_EXT16: memcpy (&frm->mask, buf + 4, sizeof (frm->mask)); break; case WS_PAYLOAD_EXT64: memcpy (&frm->mask, buf + 10, sizeof (frm->mask)); break; default: memcpy (&frm->mask, buf + 2, sizeof (frm->mask)); } } /* Attempt to read the frame's header and set the relevant data into * our frame structure. * * On error, or if no data available to read, the number of bytes is * returned and the appropriate connection status is set. * On success, the number of bytes is returned. */ static int ws_get_frm_header (WSClient *client) { WSFrame **frm = NULL; int bytes = 0, readh = 0, need = 0, offset = 0, extended = 0; if (client->frame == NULL) client->frame = new_wsframe (); frm = &client->frame; /* Read the first 2 bytes for basic frame info */ readh = (*frm)->buflen; /* read from header so far */ need = 2 - readh; /* need to read */ if (need > 0) { if ((bytes = ws_read_header (client, (*frm), readh, need)) < 1) return bytes; if (bytes != need) return ws_set_status (client, WS_READING, bytes); } offset += 2; if (ws_set_front_header_fields (client) != 0) return bytes; ws_set_extended_header_size ((*frm)->buf, &extended); /* read the extended header */ readh = (*frm)->buflen; /* read from header so far */ need = (extended + offset) - readh; /* read from header field so far */ if (need > 0) { if ((bytes = ws_read_header (client, (*frm), readh, need)) < 1) return bytes; if (bytes != need) return ws_set_status (client, WS_READING, bytes); } offset += extended; /* read the masking key */ readh = (*frm)->buflen; /* read from header so far */ need = (4 + offset) - readh; if (need > 0) { if ((bytes = ws_read_header (client, (*frm), readh, need)) < 1) return bytes; if (bytes != need) return ws_set_status (client, WS_READING, bytes); } offset += 4; ws_set_payloadlen ((*frm), (*frm)->buf); ws_set_masking_key ((*frm), (*frm)->buf); if ((*frm)->payloadlen > wsconfig.max_frm_size) { ws_error (client, WS_CLOSE_TOO_LARGE, "Frame is too big"); return ws_set_status (client, WS_ERR | WS_CLOSE, bytes); } (*frm)->buflen = 0; (*frm)->reading = 0; (*frm)->payload_offset = offset; return ws_set_status (client, WS_OK, bytes); } /* Attempt to realloc the message payload. * * On error, 1 is returned. * On success, 0 is returned. */ static int ws_realloc_frm_payload (WSFrame *frm, WSMessage *msg) { char *tmp = NULL; uint64_t newlen = 0; newlen = msg->payloadsz + frm->payloadlen; tmp = realloc (msg->payload, newlen); if (tmp == NULL && newlen > 0) { free (msg->payload); msg->payload = NULL; return 1; } msg->payload = tmp; return 0; } /* Attempt to read the frame's payload and set the relevant data into * our message structure. * * On error, or if no data available to read, the number of bytes is * returned and the appropriate connection status is set. * On success, the number of bytes is returned. */ static int ws_get_frm_payload (WSClient *client, WSServer *server) { WSFrame **frm = NULL; WSMessage **msg = NULL; int bytes = 0, readh = 0, need = 0; if (client->message == NULL) client->message = new_wsmessage (); frm = &client->frame; msg = &client->message; /* message within the same frame */ if ((*msg)->payload == NULL && (*frm)->payloadlen) (*msg)->payload = xcalloc ((*frm)->payloadlen, sizeof (char)); /* handle a new frame */ else if ((*msg)->buflen == 0 && (*frm)->payloadlen) { if (ws_realloc_frm_payload ((*frm), (*msg)) == 1) return ws_set_status (client, WS_ERR | WS_CLOSE, 0); } readh = (*msg)->buflen; /* read from so far */ need = (*frm)->payloadlen - readh; /* need to read */ if (need > 0) { if ((bytes = ws_read_payload (client, (*msg), (*msg)->payloadsz, need)) < 0) return bytes; if (bytes != need) return ws_set_status (client, WS_READING, bytes); } (*msg)->mask_offset = (*msg)->payloadsz - (*msg)->buflen; ws_manage_payload_opcode (client, server); ws_free_frame (client); return bytes; } /* Determine if we need to read a frame's header or its payload. * * On success, the number of bytes is returned. */ static int ws_get_message (WSClient *client, WSServer *server) { int bytes = 0; if ((client->frame == NULL) || (client->frame->reading)) if ((bytes = ws_get_frm_header (client)) < 1 || client->frame->reading) return bytes; return ws_get_frm_payload (client, server); } /* Determine if we need to read an HTTP request or a websocket frame. * * On success, the number of bytes is returned. */ static int read_client_data (WSClient *client, WSServer *server) { int bytes = 0; /* Handshake */ if ((!(client->headers) || (client->headers->reading))) bytes = ws_get_handshake (client, server); /* Message */ else bytes = ws_get_message (client, server); return bytes; } /* Handle a tcp close connection. */ static void handle_tcp_close (int conn, WSClient *client, WSServer *server) { LOG (("Closing TCP %d [%s]\n", client->listener, client->remote_ip)); #ifdef HAVE_LIBSSL if (client->ssl) shutdown_ssl (client); #endif shutdown (conn, SHUT_RDWR); /* upon close, call onclose() callback */ if (server->onclose && wsconfig.strict && !wsconfig.echomode) (*server->onclose) (server->pipeout, client); /* do access logging */ gettimeofday (&client->end_proc, NULL); if (wsconfig.accesslog) access_log (client, 200); /* errored out while parsing a frame or a message */ if (client->status & WS_ERR) { ws_clear_queue (client); ws_free_frame (client); ws_free_message (client); } server->closing = 0; ws_close (conn); #ifdef HAVE_LIBSSL if (client->ssl) SSL_free (client->ssl); client->ssl = NULL; #endif /* remove client from our list */ ws_remove_client_from_list (client, server); LOG (("Connection Closed.\nActive: %d\n", list_count (server->colist))); } /* Handle a tcp read close connection. */ static void handle_read_close (int *conn, WSClient *client, WSServer *server) { /* We can still try to send a message to the client if not forcing close, (nice * goodbye), else proceed to close it */ if (!(client->status & WS_CLOSE) && client->status & WS_SENDING) { server->closing = 1; set_pollfd (client->listener, POLLOUT); return; } handle_tcp_close (*conn, client, server); } /* Handle a new socket connection. */ static void handle_accept (int listener, WSServer *server) { WSClient *client = NULL; int newfd; newfd = accept_client (listener, &server->colist); if (newfd == -1) return; if (!(client = ws_get_client_from_list (newfd, &server->colist))) return; #ifdef HAVE_LIBSSL /* set flag to do TLS handshake */ if (wsconfig.use_ssl) client->sslstatus |= WS_TLS_ACCEPTING; #endif LOG (("Accepted: %d [%s]\n", newfd, client->remote_ip)); } /* Handle a tcp read. */ static void handle_reads (int *conn, WSServer *server) { WSClient *client = NULL; if (!(client = ws_get_client_from_list (*conn, &server->colist))) return; LOG (("Handling read %d [%s]...\n", client->listener, client->remote_ip)); #ifdef HAVE_LIBSSL if (handle_ssl_pending_rw (conn, server, client) == 0) return; #endif /* *INDENT-OFF* */ client->start_proc = client->end_proc = (struct timeval) {0}; /* *INDENT-ON* */ gettimeofday (&client->start_proc, NULL); read_client_data (client, server); /* An error occurred while reading data or connection closed */ if ((client->status & WS_CLOSE)) { handle_read_close (conn, client, server); *conn = -1; } } /* Handle a tcp write close connection. */ static void handle_write_close (int conn, WSClient *client, WSServer *server) { handle_tcp_close (conn, client, server); } /* Handle a tcp write. */ static void handle_writes (int *conn, WSServer *server) { WSClient *client = NULL; if (!(client = ws_get_client_from_list (*conn, &server->colist))) return; #ifdef HAVE_LIBSSL if (handle_ssl_pending_rw (conn, server, client) == 0) return; #endif ws_respond (client, NULL, 0); /* buffered data */ /* done sending data */ if (client->sockqueue == NULL) { client->status &= ~WS_SENDING; set_pollfd (client->listener, server->closing ? 0 : POLLIN); } /* An error occurred while sending data or while reading data but still * waiting from the last send() from the server to the client. e.g., * sending status code */ if ((client->status & WS_CLOSE) && !(client->status & WS_SENDING)) handle_write_close (*conn, client, server); } /* Create named pipe (FIFO) with the given pipe name. * * On error, 1 is returned. * On success, 0 is returned. */ int ws_setfifo (const char *pipename) { struct stat fistat; const char *f = pipename; if (access (f, F_OK) == 0) return 0; if (mkfifo (f, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) < 0) FATAL ("Unable to set fifo: %s.", strerror (errno)); if (stat (f, &fistat) < 0) FATAL ("Unable to stat fifo: %s.", strerror (errno)); if (!S_ISFIFO (fistat.st_mode)) FATAL ("pipe is not a fifo: %s.", strerror (errno)); return 0; } /* Open a named pipe (FIFO) for input to the server (reader). */ static void ws_openfifo_in (WSPipeIn *pipein) { ws_setfifo (wsconfig.pipein); /* we should be able to open it at as reader */ if ((pipein->fd = open (wsconfig.pipein, O_RDWR | O_NONBLOCK)) < 0) FATAL ("Unable to open fifo in: %s.", strerror (errno)); } /* Open a named pipe (FIFO) for output from the server (writer). */ static int ws_openfifo_out (WSPipeOut *pipeout) { int status = 0; ws_setfifo (wsconfig.pipeout); status = open (wsconfig.pipeout, O_WRONLY | O_NONBLOCK); /* will attempt on the next write */ if (status == -1 && errno == ENXIO) LOG (("Unable to open fifo out: %s.\n", strerror (errno))); else if (status < 0) FATAL ("Unable to open fifo out: %s.", strerror (errno)); pipeout->fd = status; return status; } /* Set a new named pipe for incoming messages and one for outgoing * messages from the client. */ static void ws_fifo (WSServer *server) { ws_openfifo_in (server->pipein); set_pollfd (server->pipein->fd, POLLIN); ws_openfifo_out (server->pipeout); set_pollfd (server->pipeout->fd, POLLOUT); } /* Clear the queue for an outgoing named pipe. */ static void clear_fifo_queue (WSPipeOut *pipeout) { WSQueue **queue = &pipeout->fifoqueue; if (!(*queue)) return; if ((*queue)->queued) free ((*queue)->queued); (*queue)->queued = NULL; (*queue)->qlen = 0; free ((*queue)); (*queue) = NULL; } /* Attempt to realloc the current sent queue for an outgoing named pip * (FIFO). * * On error, 1 is returned and the connection status is closed and * reopened. * On success, 0 is returned. */ static int ws_realloc_fifobuf (WSPipeOut *pipeout, const char *buf, int len) { WSQueue *queue = pipeout->fifoqueue; char *tmp = NULL; int newlen = 0; newlen = queue->qlen + len; tmp = realloc (queue->queued, newlen); if (tmp == NULL && newlen > 0) { ws_close (pipeout->fd); clear_fifo_queue (pipeout); ws_openfifo_out (pipeout); return 1; } queue->queued = tmp; memcpy (queue->queued + queue->qlen, buf, len); queue->qlen += len; return 0; } /* Set into a queue the data that couldn't be sent in the outgoing * FIFO. */ static void ws_queue_fifobuf (WSPipeOut *pipeout, const char *buffer, int len, int bytes) { WSQueue **queue = &pipeout->fifoqueue; if (bytes < 1) bytes = 0; (*queue) = xcalloc (1, sizeof (WSQueue)); (*queue)->queued = xcalloc (len - bytes, sizeof (char)); memcpy ((*queue)->queued, buffer + bytes, len - bytes); (*queue)->qlen = len - bytes; pipeout->status |= WS_SENDING; set_pollfd (pipeout->fd, POLLOUT); } /* Attempt to send the given buffer to the given outgoing FIFO. * * On error, the data is queued up. * On success, the number of bytes sent is returned. */ static int ws_write_fifo_data (WSPipeOut *pipeout, char *buffer, int len) { int bytes = 0; bytes = write (pipeout->fd, buffer, len); /* At this point, the reader probably closed the pipe, so a cheap *hack* for * this is to close the pipe on our end and attempt to reopen it. If unable to * do so, then let it be -1 and try on the next attempt to write. */ if (bytes == -1 && errno == EPIPE) { ws_close (pipeout->fd); ws_openfifo_out (pipeout); return bytes; } if (bytes < len || (bytes == -1 && (errno == EAGAIN || errno == EWOULDBLOCK))) ws_queue_fifobuf (pipeout, buffer, len, bytes); return bytes; } /* Attempt to send the queued up client's data through the outgoing * named pipe (FIFO) . * * On error, 1 is returned and the connection status is set. * On success, the number of bytes sent is returned. */ static int ws_write_fifo_cache (WSPipeOut *pipeout) { WSQueue *queue = pipeout->fifoqueue; int bytes = 0; bytes = write (pipeout->fd, queue->queued, queue->qlen); /* At this point, the reader probably closed the pipe, so a cheap *hack* for * this is to close the pipe on our end and attempt to reopen it. If unable to * do so, then let it be -1 and try on the next attempt to write. */ if (bytes == -1 && errno == EPIPE) { ws_close (pipeout->fd); ws_openfifo_out (pipeout); return bytes; } if (chop_nchars (queue->queued, bytes, queue->qlen) == 0) clear_fifo_queue (pipeout); else queue->qlen -= bytes; return bytes; } /* An entry point to attempt to send the client's data into an * outgoing named pipe (FIFO). * * On success, the number of bytes sent is returned. */ int ws_write_fifo (WSPipeOut *pipeout, char *buffer, int len) { int bytes = 0; if (pipeout->fd == -1 && ws_openfifo_out (pipeout) == -1) return bytes; /* attempt to send the whole buffer */ if (pipeout->fifoqueue == NULL) bytes = ws_write_fifo_data (pipeout, buffer, len); /* buffer not empty, just append new data */ else if (pipeout->fifoqueue != NULL && buffer != NULL) { if (ws_realloc_fifobuf (pipeout, buffer, len) == 1) return bytes; } /* send from cache buffer */ else { bytes = ws_write_fifo_cache (pipeout); } if (pipeout->fifoqueue == NULL) { pipeout->status &= ~WS_SENDING; set_pollfd (pipeout->fd, 0); } return bytes; } /* Clear an incoming FIFO packet and header data. */ static void clear_fifo_packet (WSPipeIn *pipein) { memset (pipein->hdr, 0, sizeof (pipein->hdr)); pipein->hlen = 0; if (pipein->packet == NULL) return; if (pipein->packet->data) free (pipein->packet->data); free (pipein->packet); pipein->packet = NULL; } /* Broadcast to all connected clients the given message. */ static int ws_broadcast_fifo (WSClient *client, WSServer *server) { WSPacket *packet = server->pipein->packet; LOG (("Broadcasting to %d [%s] ", client->listener, client->remote_ip)); if (client == NULL) return 1; if (client->headers == NULL || client->headers->ws_accept == NULL) { /* no handshake for this client */ LOG (("No headers. Closing %d [%s]\n", client->listener, client->remote_ip)); return -1; } LOG ((" - Sending...\n")); ws_send_data (client, packet->type, packet->data, packet->size); return 0; } static void ws_broadcast_fifo_to_clients (WSServer *server) { WSClient *client = NULL; void *data = NULL; uint32_t *close_list = NULL; int n = 0, idx = 0, i = 0, listener = 0; if ((n = list_count (server->colist)) == 0) return; close_list = xcalloc (n, sizeof (uint32_t)); /* *INDENT-OFF* */ GSLIST_FOREACH (server->colist, data, { client = data; if (ws_broadcast_fifo(client, server) == -1) close_list[idx++] = client->listener; }); /* *INDENT-ON* */ client = NULL; for (i = 0; i < idx; ++i) { listener = close_list[i]; if ((client = ws_get_client_from_list (listener, &server->colist))) handle_tcp_close (listener, client, server); } free (close_list); } /* Send a message from the incoming named pipe to specific client * given the socket id. */ static void ws_send_strict_fifo_to_client (WSServer *server, int listener, WSPacket *pa) { WSClient *client = NULL; if (!(client = ws_get_client_from_list (listener, &server->colist))) return; /* no handshake for this client */ if (client->headers == NULL || client->headers->ws_accept == NULL) { LOG (("No headers. Closing %d [%s]\n", client->listener, client->remote_ip)); handle_tcp_close (client->listener, client, server); return; } ws_send_data (client, pa->type, pa->data, pa->len); } /* Attempt to read message from a named pipe (FIFO). * * On error, -1 is returned. * On success, the number of bytes read is returned. */ int ws_read_fifo (int fd, char *buf, int *buflen, int pos, int need) { int bytes = 0; bytes = read (fd, buf + pos, need); if (bytes == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) return bytes; else if (bytes == -1) return bytes; *buflen += bytes; return bytes; } /* Pack the given value into a network byte order. * * On success, the number size of uint32_t is returned. */ size_t pack_uint32 (void *buf, uint32_t val) { uint32_t v32 = htonl (val); memcpy (buf, &v32, sizeof (uint32_t)); return sizeof (uint32_t); } /* Unpack the given value into a host byte order. * * On success, the number size of uint32_t is returned. */ size_t unpack_uint32 (const void *buf, uint32_t *val) { uint32_t v32 = 0; memcpy (&v32, buf, sizeof (uint32_t)); *val = ntohl (v32); return sizeof (uint32_t); } /* Ensure the fields coming from the named pipe are valid. * * On error, 1 is returned. * On success, 0 is returned. */ static int validate_fifo_packet (uint32_t type, int size) { if (type != WS_OPCODE_TEXT && type != WS_OPCODE_BIN) { LOG (("Invalid fifo packet type\n")); return 1; } if (size > wsconfig.max_frm_size) { LOG (("Invalid fifo packet size\n")); return 1; } return 0; } /* Handle reading and sending the incoming data from the named pipe on * strict mode. */ static void handle_strict_fifo (WSServer *server) { WSPipeIn *pi = server->pipein; WSPacket **pa = &pi->packet; int bytes = 0, readh = 0, need = 0; char *ptr = NULL; uint32_t listener = 0, type = 0, size = 0; readh = pi->hlen; /* read from header so far */ need = HDR_SIZE - readh; /* need to read */ if (need > 0) { if ((bytes = ws_read_fifo (pi->fd, pi->hdr, &pi->hlen, readh, need)) < 0) return; if (bytes != need) return; } /* unpack size, and type */ ptr = pi->hdr; ptr += unpack_uint32 (ptr, &listener); ptr += unpack_uint32 (ptr, &type); ptr += unpack_uint32 (ptr, &size); if (validate_fifo_packet (type, size) == 1) { ws_close (pi->fd); clear_fifo_packet (pi); ws_openfifo_in (pi); return; } if ((*pa) == NULL) { (*pa) = xcalloc (1, sizeof (WSPacket)); (*pa)->type = type; (*pa)->size = size; (*pa)->data = xcalloc (size, sizeof (char)); } readh = (*pa)->len; /* read from payload so far */ need = (*pa)->size - readh; /* need to read */ if (need > 0) { if ((bytes = ws_read_fifo (pi->fd, (*pa)->data, &(*pa)->len, readh, need)) < 0) return; if (bytes != need) return; } /* no clients to send data to */ if (list_count (server->colist) == 0) { clear_fifo_packet (pi); return; } /* Either send it to a specific client or broadcast message to all * clients */ if (listener != 0) ws_send_strict_fifo_to_client (server, listener, *pa); else ws_broadcast_fifo_to_clients (server); clear_fifo_packet (pi); } /* Handle reading and sending the incoming data from the named pipe on * a fixed buffer mode. */ static void handle_fixed_fifo (WSServer *server) { WSPipeIn *pi = server->pipein; WSPacket **pa = &pi->packet; int bytes = 0; char buf[PIPE_BUF] = { 0 }; if ((bytes = read (pi->fd, buf, PIPE_BUF - 1)) < 0) return; buf[bytes] = '\0'; /* null-terminate */ if (ws_validate_string (buf, bytes) != 0) return; (*pa) = xcalloc (1, sizeof (WSPacket)); (*pa)->type = WS_OPCODE_TEXT; (*pa)->size = bytes; (*pa)->data = xstrdup (buf); /* no clients to send data to */ if (list_count (server->colist) == 0) { clear_fifo_packet (pi); return; } /* broadcast message to all clients */ ws_broadcast_fifo_to_clients (server); clear_fifo_packet (pi); } /* Determine which mode should use the incoming message from the FIFO. */ static void handle_fifo (WSServer *server) { if (wsconfig.strict) handle_strict_fifo (server); else handle_fixed_fifo (server); } /* Creates an endpoint for communication and start listening for * connections on a socket */ static void ws_socket (int *listener) { if (wsconfig.unix_socket) { struct sockaddr_un servaddr; /* Create a TCP socket. */ if ((*listener = socket (AF_UNIX, SOCK_STREAM, 0)) == -1) FATAL ("Unable to open socket: %s.", strerror (errno)); memset (&servaddr, 0, sizeof (servaddr)); servaddr.sun_family = AF_UNIX; strncpy (servaddr.sun_path, wsconfig.unix_socket, sizeof (servaddr.sun_path) - 1); /* Bind the socket to the address. */ if (bind (*listener, (struct sockaddr *) &servaddr, sizeof (servaddr)) != 0) FATAL ("Unable to set bind: %s.", strerror (errno)); } else { int ov = 1, bind_result = 0; struct addrinfo hints, *ai, *p; memset (&hints, 0, sizeof (hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; if (getaddrinfo (wsconfig.host, wsconfig.port, &hints, &ai) != 0) FATAL ("Unable to set server: %s.", gai_strerror (errno)); for (p = ai; p != NULL; p = p->ai_next) { *listener = socket (p->ai_family, p->ai_socktype, p->ai_protocol); if (*listener == -1) continue; if (setsockopt (*listener, SOL_SOCKET, SO_REUSEADDR, &ov, sizeof (ov)) == -1) { close (*listener); continue; } if (bind (*listener, p->ai_addr, p->ai_addrlen) == 0) { bind_result = 1; break; } close (*listener); } freeaddrinfo (ai); if (bind_result == 0) FATAL ("Unable to set bind: %s.", strerror (errno)); } if (listen (*listener, SOMAXCONN) == -1) FATAL ("Unable to listen: %s.", strerror (errno)); } /* Start the websocket server and start to monitor multiple file * descriptors until we have something to read or write. */ void ws_start (WSServer *server) { int listener = -1, ret = 0; struct pollfd *cfdstate = NULL, *pfd, *efd; nfds_t ncfdstate = 0; bool run = true; if (server->self_pipe[0] != -1) set_pollfd (server->self_pipe[0], POLLIN); #ifdef HAVE_LIBSSL if (wsconfig.sslcert && wsconfig.sslkey) { LOG (("==Using TLS/SSL==\n")); wsconfig.use_ssl = 1; if (initialize_ssl_ctx (server)) { LOG (("Unable to initialize_ssl_ctx\n")); return; } } #endif ws_socket (&listener); set_pollfd (listener, POLLIN); while (run) { /* take a copy of the fdstate and give that to poll to allow * any dispatch to modify the real fdstate for the next pass */ if (ncfdstate != nfdstate) { free (cfdstate); cfdstate = xmalloc (nfdstate * sizeof (*cfdstate)); memset (cfdstate, 0, sizeof (*cfdstate) * nfdstate); ncfdstate = nfdstate; } memcpy (cfdstate, fdstate, ncfdstate * sizeof (*cfdstate)); /* yep, wait patiently */ if ((ret = poll (cfdstate, nfdstate, -1)) == -1) { switch (errno) { case EINTR: LOG (("A signal was caught on poll(2)\n")); break; default: FATAL ("Unable to poll: %s.", strerror (errno)); } } /* iterate over existing connections */ efd = cfdstate + nfdstate; for (pfd = cfdstate; pfd < efd; pfd++) { if (pfd->revents & POLLHUP) LOG (("Got POLLHUP %d\n", pfd->fd)); if (pfd->revents & POLLNVAL) LOG (("Got POLLNVAL %d\n", pfd->fd)); if (pfd->revents & POLLERR) LOG (("Got POLLERR %d\n", pfd->fd)); /* handle self-pipe trick */ if (pfd->fd == server->self_pipe[0]) { if (pfd->revents & POLLIN) { LOG (("Handled self-pipe to close event loop.\n")); run = false; break; } } else if (pfd->fd == server->pipein->fd) { /* handle pipein */ if (pfd->revents & POLLIN) handle_fifo (server); } else if (pfd->fd == server->pipeout->fd) { /* handle pipeout */ if (pfd->revents & POLLOUT) ws_write_fifo (server->pipeout, NULL, 0); } else if (pfd->fd == listener) { /* handle new connections */ if (pfd->revents & POLLIN) handle_accept (listener, server); } else { /* handle data from a client */ if (pfd->revents & POLLIN) { if (server->closing) { struct pollfd *ffd = get_pollfd (pfd->fd); if (ffd != NULL) ffd->events &= ~POLLIN; } else handle_reads (&pfd->fd, server); } /* handle sending data to a client */ if (pfd->revents & POLLOUT) handle_writes (&pfd->fd, server); } } } free (cfdstate); ws_close (listener); if (server->self_pipe[0] != -1) unset_pollfd (server->self_pipe[0]); if (wsconfig.unix_socket) { unlink (wsconfig.unix_socket); } } /* Set the origin so the server can force connections to have the * given HTTP origin. */ void ws_set_config_origin (const char *origin) { wsconfig.origin = origin; } /* Set the maximum websocket frame size. */ void ws_set_config_frame_size (int max_frm_size) { wsconfig.max_frm_size = max_frm_size; } /* Set specific name for the reader named pipe. */ void ws_set_config_pipein (const char *pipein) { wsconfig.pipein = pipein; } /* Set specific name for the writer named pipe. */ void ws_set_config_pipeout (const char *pipeout) { wsconfig.pipeout = pipeout; } /* Set a path and a file for the access log. */ void ws_set_config_accesslog (const char *accesslog) { wsconfig.accesslog = accesslog; if (access_log_open (wsconfig.accesslog) == 1) FATAL ("Unable to open access log: %s.", strerror (errno)); } /* Set if the server should handle strict named pipe handling. */ void ws_set_config_strict (int strict) { wsconfig.strict = strict; } /* Set the server into echo mode. */ void ws_set_config_echomode (int echomode) { wsconfig.echomode = echomode; } /* Set the server host bind address. */ void ws_set_config_host (const char *host) { wsconfig.host = host; } /* Set the server unix socket bind address. */ void ws_set_config_unix_socket (const char *unix_socket) { wsconfig.unix_socket = unix_socket; } /* Set the server port bind address. */ void ws_set_config_port (const char *port) { wsconfig.port = port; } /* Set specific name for the SSL certificate. */ void ws_set_config_sslcert (const char *sslcert) { wsconfig.sslcert = sslcert; } /* Set specific name for the SSL key. */ void ws_set_config_sslkey (const char *sslkey) { wsconfig.sslkey = sslkey; } /* Create a new websocket server context. */ WSServer * ws_init (const char *host, const char *port, void (*initopts) (void)) { WSServer *server = new_wsserver (); server->pipein = new_wspipein (); server->pipeout = new_wspipeout (); server->self_pipe[0] = server->self_pipe[1] = -1; wsconfig.accesslog = NULL; wsconfig.host = host; wsconfig.unix_socket = NULL; wsconfig.max_frm_size = WS_MAX_FRM_SZ; wsconfig.origin = NULL; wsconfig.pipein = NULL; wsconfig.pipeout = NULL; wsconfig.sslcert = NULL; wsconfig.sslkey = NULL; wsconfig.port = port; wsconfig.strict = 0; wsconfig.use_ssl = 0; initopts (); ws_fifo (server); return server; } goaccess-1.9.3/src/sha1.c0000644000175000017300000001433314624731651010576 /* SHA-1 in C By Steve Reid 100% Public Domain Test Vectors (from FIPS PUB 180-1) "abc" A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 A million repetitions of "a" 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F */ /* #define LITTLE_ENDIAN * This should be #define'd if true. */ #if __LITTLE_ENDIAN__ #define LITTLE_ENDIAN #endif /* #define SHA1HANDSOFF * Copies data before messing with it. */ #include #include "sha1.h" void SHA1Transform (uint32_t state[5], uint8_t buffer[64]); #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* blk0() and blk() perform the initial expand. */ /* I got the idea of expanding during the round function from SSLeay */ #ifdef LITTLE_ENDIAN #define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ |(rol(block->l[i],8)&0x00FF00FF)) #else #define blk0(i) block->l[i] #endif #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ #define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); /* Hash a single 512-bit block. This is the core of the algorithm. */ void SHA1Transform (uint32_t state[5], uint8_t buffer[64]) { uint32_t a, b, c, d, e; typedef union { uint8_t c[64]; uint32_t l[16]; } CHAR64LONG16; CHAR64LONG16 *block; #ifdef SHA1HANDSOFF static uint8_t workspace[64]; block = (CHAR64LONG16 *) (void *) workspace; memcpy (block, buffer, 64); #else block = (CHAR64LONG16 *) (void *) buffer; #endif /* Copy context->state[] to working vars */ a = state[0]; b = state[1]; c = state[2]; d = state[3]; e = state[4]; /* 4 rounds of 20 operations each. Loop unrolled. */ R0 (a, b, c, d, e, 0); R0 (e, a, b, c, d, 1); R0 (d, e, a, b, c, 2); R0 (c, d, e, a, b, 3); R0 (b, c, d, e, a, 4); R0 (a, b, c, d, e, 5); R0 (e, a, b, c, d, 6); R0 (d, e, a, b, c, 7); R0 (c, d, e, a, b, 8); R0 (b, c, d, e, a, 9); R0 (a, b, c, d, e, 10); R0 (e, a, b, c, d, 11); R0 (d, e, a, b, c, 12); R0 (c, d, e, a, b, 13); R0 (b, c, d, e, a, 14); R0 (a, b, c, d, e, 15); R1 (e, a, b, c, d, 16); R1 (d, e, a, b, c, 17); R1 (c, d, e, a, b, 18); R1 (b, c, d, e, a, 19); R2 (a, b, c, d, e, 20); R2 (e, a, b, c, d, 21); R2 (d, e, a, b, c, 22); R2 (c, d, e, a, b, 23); R2 (b, c, d, e, a, 24); R2 (a, b, c, d, e, 25); R2 (e, a, b, c, d, 26); R2 (d, e, a, b, c, 27); R2 (c, d, e, a, b, 28); R2 (b, c, d, e, a, 29); R2 (a, b, c, d, e, 30); R2 (e, a, b, c, d, 31); R2 (d, e, a, b, c, 32); R2 (c, d, e, a, b, 33); R2 (b, c, d, e, a, 34); R2 (a, b, c, d, e, 35); R2 (e, a, b, c, d, 36); R2 (d, e, a, b, c, 37); R2 (c, d, e, a, b, 38); R2 (b, c, d, e, a, 39); R3 (a, b, c, d, e, 40); R3 (e, a, b, c, d, 41); R3 (d, e, a, b, c, 42); R3 (c, d, e, a, b, 43); R3 (b, c, d, e, a, 44); R3 (a, b, c, d, e, 45); R3 (e, a, b, c, d, 46); R3 (d, e, a, b, c, 47); R3 (c, d, e, a, b, 48); R3 (b, c, d, e, a, 49); R3 (a, b, c, d, e, 50); R3 (e, a, b, c, d, 51); R3 (d, e, a, b, c, 52); R3 (c, d, e, a, b, 53); R3 (b, c, d, e, a, 54); R3 (a, b, c, d, e, 55); R3 (e, a, b, c, d, 56); R3 (d, e, a, b, c, 57); R3 (c, d, e, a, b, 58); R3 (b, c, d, e, a, 59); R4 (a, b, c, d, e, 60); R4 (e, a, b, c, d, 61); R4 (d, e, a, b, c, 62); R4 (c, d, e, a, b, 63); R4 (b, c, d, e, a, 64); R4 (a, b, c, d, e, 65); R4 (e, a, b, c, d, 66); R4 (d, e, a, b, c, 67); R4 (c, d, e, a, b, 68); R4 (b, c, d, e, a, 69); R4 (a, b, c, d, e, 70); R4 (e, a, b, c, d, 71); R4 (d, e, a, b, c, 72); R4 (c, d, e, a, b, 73); R4 (b, c, d, e, a, 74); R4 (a, b, c, d, e, 75); R4 (e, a, b, c, d, 76); R4 (d, e, a, b, c, 77); R4 (c, d, e, a, b, 78); R4 (b, c, d, e, a, 79); /* Add the working vars back into context.state[] */ state[0] += a; state[1] += b; state[2] += c; state[3] += d; state[4] += e; /* Wipe variables */ a = b = c = d = e = 0; } /* SHA1Init - Initialize new context */ void SHA1Init (SHA1_CTX *context) { /* SHA1 initialization constants */ context->state[0] = 0x67452301; context->state[1] = 0xEFCDAB89; context->state[2] = 0x98BADCFE; context->state[3] = 0x10325476; context->state[4] = 0xC3D2E1F0; context->count[0] = context->count[1] = 0; } /* Run your data through this. */ void SHA1Update (SHA1_CTX *context, uint8_t *data, unsigned int len) { unsigned int i, j; j = (context->count[0] >> 3) & 63; if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++; context->count[1] += (len >> 29); if ((j + len) > 63) { memcpy (&context->buffer[j], data, (i = 64 - j)); SHA1Transform (context->state, context->buffer); for (; i + 63 < len; i += 64) { SHA1Transform (context->state, &data[i]); } j = 0; } else i = 0; memcpy (&context->buffer[j], &data[i], len - i); } /* Add padding and return the message digest. */ void SHA1Final (uint8_t digest[20], SHA1_CTX *context) { uint32_t i, j; uint8_t finalcount[8]; for (i = 0; i < 8; i++) { finalcount[i] = (uint8_t) ((context->count[(i >= 4 ? 0 : 1)] >> ((3 - (i & 3)) * 8)) & 255); /* Endian independent */ } SHA1Update (context, (uint8_t *) "\200", 1); while ((context->count[0] & 504) != 448) { SHA1Update (context, (uint8_t *) "\0", 1); } SHA1Update (context, finalcount, 8); /* Should cause a SHA1Transform() */ for (i = 0; i < 20; i++) { digest[i] = (uint8_t) ((context->state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255); } /* Wipe variables */ i = j = 0; memset (context->buffer, 0, 64); memset (context->state, 0, 20); memset (context->count, 0, 8); memset (&finalcount, 0, 8); #ifdef SHA1HANDSOFF /* make SHA1Transform overwrite its own static vars */ SHA1Transform (context->state, context->buffer); #endif } goaccess-1.9.3/src/bin2c.c0000644000175000017300000000741514624731651010742 /* * This is bin2c program, which allows you to convert binary file to * C language array, for use as embedded resource, for instance you can * embed graphics or audio file directly into your program. * This is public domain software, use it on your own risk. * Contact Serge Fukanchik at fuxx@mail.ru if you have any questions. * * Some modifications were made by Gwilym Kuiper (kuiper.gwilym@gmail.com) * I have decided not to change the licence. */ #include #include #include #ifdef USE_BZ2 #include #endif int main (int argc, char *argv[]) { char *buf; char *ident; int need_comma; long file_size_orig; size_t file_size, i; FILE *f_input, *f_output; #ifdef USE_BZ2 int status; char *bz2_buf; unsigned int uncompressed_size, bz2_size; #endif if (argc < 4) { fprintf (stderr, "Usage: %s binary_file output_file array_name\n", argv[0]); return -1; } f_input = fopen (argv[1], "rb"); if (f_input == NULL) { fprintf (stderr, "%s: can't open %s for reading\n", argv[0], argv[1]); return -1; } // Get the file length fseek (f_input, 0, SEEK_END); file_size_orig = ftell (f_input); if (file_size_orig < 0) { fprintf (stderr, "%s: can't get size of file %s\n", argv[0], argv[1]); fclose (f_input); return -1; } file_size = (size_t) file_size_orig; fseek (f_input, 0, SEEK_SET); if ((buf = malloc (file_size)) == NULL) { fprintf (stderr, "Unable to malloc bin2c.c buffer\n"); fclose (f_input); return -1; } if (fread (buf, file_size, 1, f_input) != 1) { fprintf (stderr, "%s: can't read from %s\n", argv[0], argv[1]); free (buf); fclose (f_input); return -1; } if (fgetc (f_input) != EOF) { fprintf (stderr, "%s: can't read complete file %s\n", argv[0], argv[1]); free (buf); fclose (f_input); return -1; } if (ferror (f_input)) { fprintf (stderr, "%s: error while reading from %s\n", argv[0], argv[1]); free (buf); fclose (f_input); return -1; } fclose (f_input); #ifdef USE_BZ2 // allocate for bz2. bz2_size = (file_size + file_size / 100 + 1) + 600; // as per the documentation if ((bz2_buf = malloc (bz2_size)) == NULL) { fprintf (stderr, "Unable to malloc bin2c.c buffer\n"); free (buf); return -1; } // compress the data status = BZ2_bzBuffToBuffCompress (bz2_buf, &bz2_size, buf, file_size, 9, 1, 0); if (status != BZ_OK) { fprintf (stderr, "Failed to compress data: error %i\n", status); free (buf); free (bz2_buf); return -1; } // and be very lazy free (buf); uncompressed_size = file_size; file_size = bz2_size; buf = bz2_buf; #endif f_output = fopen (argv[2], "w"); if (f_output == NULL) { fprintf (stderr, "%s: can't open %s for writing\n", argv[0], argv[1]); free (buf); return -1; } ident = argv[3]; need_comma = 0; fprintf (f_output, "const char %s[%lu] = {", ident, file_size); for (i = 0; i < file_size; ++i) { if (buf[i] == '\0') { fprintf (stderr, "%s: writing a null character terminates the content prematurely\n", argv[0]); fclose (f_output); free (buf); return -1; } if (need_comma) fprintf (f_output, ", "); else need_comma = 1; if ((i % 11) == 0) fprintf (f_output, "\n\t"); fprintf (f_output, "0x%.2x", buf[i] & 0xff); } fprintf (f_output, "\n};\n\n"); fprintf (f_output, "const int %s_length = %lu;\n", ident, file_size); #ifdef USE_BZ2 fprintf (f_output, "const int %s_length_uncompressed = %u;\n", ident, uncompressed_size); #endif if (ferror (f_output)) { fprintf (stderr, "%s: error while writing to %s\n", argv[0], argv[2]); fclose (f_output); free (buf); return -1; } fclose (f_output); free (buf); return 0; } goaccess-1.9.3/src/persistence.c0000644000175000017300000007452014626464423012274 /** * persistence.c -- on-disk persistence functionality * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include #include #include "persistence.h" #include "error.h" #include "gkhash.h" #include "sort.h" #include "tpl.h" #include "util.h" #include "xmalloc.h" static uint32_t *persisted_dates = NULL; static uint32_t persisted_dates_len = 0; /* Determine the path for the given database file. * * On error, a fatal error is thrown. * On success, the databases path string is returned. */ static char * set_db_path (const char *fn) { struct stat info; char *rpath = NULL, *path = NULL; const char *dbpath = NULL; if (!conf.db_path) dbpath = DB_PATH; else dbpath = conf.db_path; rpath = realpath (dbpath, NULL); if (rpath == NULL) FATAL ("Unable to open the specified db path/file '%s'. %s", dbpath, strerror (errno)); /* sanity check: Is db_path accessible and a directory? */ if (stat (rpath, &info) != 0) FATAL ("Unable to access database path: %s", strerror (errno)); else if (!(info.st_mode & S_IFDIR)) FATAL ("Database path is not a directory."); path = xmalloc (snprintf (NULL, 0, "%s/%s", rpath, fn) + 1); sprintf (path, "%s/%s", rpath, fn); free (rpath); return path; } /* Given a database filename, restore a string key, uint32_t value back to the * storage */ static void restore_global_si08 (khash_t (si08) *hash, const char *fn) { tpl_node *tn; char *key = NULL; char fmt[] = "A(sv)"; uint16_t val; tn = tpl_map (fmt, &key, &val); tpl_load (tn, TPL_FILE, fn); while (tpl_unpack (tn, 1) > 0) { ins_si08 (hash, key, val); free (key); } tpl_free (tn); } /* Given a hash and a filename, persist to disk a string key, uint32_t value */ static void persist_global_si08 (khash_t (si08) *hash, const char *fn) { tpl_node *tn; khint_t k; const char *key = NULL; char fmt[] = "A(sv)"; uint16_t val; if (!hash || kh_size (hash) == 0) return; tn = tpl_map (fmt, &key, &val); for (k = 0; k < kh_end (hash); ++k) { if (!kh_exist (hash, k) || (!(key = kh_key (hash, k)))) continue; val = kh_value (hash, k); tpl_pack (tn, 1); } tpl_dump (tn, TPL_FILE, fn); tpl_free (tn); } /* Given a database filename, restore a string key, uint32_t value back to the * storage */ static void restore_global_si32 (khash_t (si32) *hash, const char *fn) { tpl_node *tn; char *key = NULL; char fmt[] = "A(su)"; uint32_t val; tn = tpl_map (fmt, &key, &val); tpl_load (tn, TPL_FILE, fn); while (tpl_unpack (tn, 1) > 0) { ins_si32 (hash, key, val); free (key); } tpl_free (tn); } /* Given a hash and a filename, persist to disk a string key, uint32_t value */ static void persist_global_si32 (khash_t (si32) *hash, const char *fn) { tpl_node *tn; khint_t k; const char *key = NULL; char fmt[] = "A(su)"; uint32_t val; if (!hash || kh_size (hash) == 0) return; tn = tpl_map (fmt, &key, &val); for (k = 0; k < kh_end (hash); ++k) { if (!kh_exist (hash, k) || (!(key = kh_key (hash, k)))) continue; val = kh_value (hash, k); tpl_pack (tn, 1); } tpl_dump (tn, TPL_FILE, fn); tpl_free (tn); } /* Given a database filename, restore a uint64_t key, GLastParse value back to * the storage */ static void restore_global_iglp (khash_t (iglp) *hash, const char *fn) { tpl_node *tn; uint64_t key; GLastParse val = { 0 }; char fmt[] = "A(US(uIUvc#))"; tn = tpl_map (fmt, &key, &val, READ_BYTES); tpl_load (tn, TPL_FILE, fn); while (tpl_unpack (tn, 1) > 0) { ins_iglp (hash, key, &val); } tpl_free (tn); } /* Given a hash and a filename, persist to disk a uint64_t key, uint32_t value */ static void persist_global_iglp (khash_t (iglp) *hash, const char *fn) { tpl_node *tn; khint_t k; uint64_t key; GLastParse val = { 0 }; char fmt[] = "A(US(uIUvc#))"; if (!hash || kh_size (hash) == 0) return; tn = tpl_map (fmt, &key, &val, READ_BYTES); for (k = 0; k < kh_end (hash); ++k) { if (!kh_exist (hash, k)) continue; key = kh_key (hash, k); val = kh_value (hash, k); tpl_pack (tn, 1); } tpl_dump (tn, TPL_FILE, fn); tpl_free (tn); } /* Given a filename, ensure we have a valid return path * * On error, NULL is returned. * On success, the valid path is returned */ static char * check_restore_path (const char *fn) { char *path = set_db_path (fn); if (access (path, F_OK) != -1) return path; LOG_DEBUG (("DB file %s doesn't exist. %s\n", path, strerror (errno))); free (path); return NULL; } static char * build_filename (const char *type, const char *modstr, const char *mtrstr) { char *fn = xmalloc (snprintf (NULL, 0, "%s_%s_%s.db", type, modstr, mtrstr) + 1); sprintf (fn, "%s_%s_%s.db", type, modstr, mtrstr); return fn; } /* Get the database filename given a module and a metric. * * On error, a fatal error is triggered. * On success, the filename is returned */ static char * get_filename (GModule module, GKHashMetric mtrc) { const char *mtrstr, *modstr, *type; char *fn = NULL; if (!(mtrstr = get_mtr_str (mtrc.metric.storem))) FATAL ("Unable to allocate metric name."); if (!(modstr = get_module_str (module))) FATAL ("Unable to allocate module name."); if (!(type = get_mtr_type_str (mtrc.type))) FATAL ("Unable to allocate module name."); fn = build_filename (type, modstr, mtrstr); return fn; } /* Dump to disk the database file and frees its memory */ static void close_tpl (tpl_node *tn, const char *fn) { tpl_dump (tn, TPL_FILE, fn); tpl_free (tn); } /* Check if the given date can be inserted based on how many dates we need to * keep conf.keep_last. * * Returns -1 if it fails to insert the date. * Returns 1 if the date exists. * Returns 2 if the date shouldn't be inserted. * On success or if the date is inserted 0 is returned */ static int insert_restored_date (uint32_t date) { uint32_t i, len = 0; /* no keep last, simply insert the restored date to our storage */ if (!conf.keep_last || persisted_dates_len < conf.keep_last) return ht_insert_date (date); len = MIN (persisted_dates_len, conf.keep_last); for (i = 0; i < len; ++i) if (persisted_dates[i] == date) return ht_insert_date (date); return 2; } /* Given a database filename, restore a string key, uint32_t value back to * the storage */ static int restore_si32 (GSMetric metric, const char *path, int module) { khash_t (si32) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(su))"; int date = 0, ret = 0; char *key = NULL; uint32_t val = 0; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { ins_si32 (hash, key, val); free (key); } } tpl_free (tn); return 0; } /* Given a database filename, restore a string key, uint32_t value back to * the storage */ static int migrate_si32_to_ii32 (GSMetric metric, const char *path, int module) { khash_t (ii32) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(su))"; int date = 0, ret = 0; char *key = NULL; uint32_t val = 0; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { ins_ii32 (hash, djb2 ((const unsigned char *) key), val); free (key); } } tpl_free (tn); return 0; } static char * migrate_unique_key (const char *key) { char *nkey = NULL, *token = NULL, *ptr = NULL; char agent_hex[64] = { 0 }; uint32_t delims = 0; if (!key || count_matches (key, '|') < 2) return NULL; nkey = xstrdup (""); while ((ptr = strchr (key, '|'))) { if (!(token = extract_by_delim (&key, "|"))) { free (nkey); return NULL; } append_str (&nkey, token); append_str (&nkey, "|"); free (token); key++; delims++; } if (delims == 2) { sprintf (agent_hex, "%" PRIx32, djb2 ((const unsigned char *) key)); append_str (&nkey, agent_hex); } return nkey; } /* Given a database filename, restore a string key, uint32_t value back to * the storage */ static int migrate_si32_to_ii32_unique_keys (GSMetric metric, const char *path, int module) { khash_t (si32) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(su))"; int date = 0, ret = 0; char *key = NULL, *nkey = NULL; uint32_t val = 0; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { if ((nkey = migrate_unique_key (key))) ins_si32 (hash, nkey, val); free (key); free (nkey); } } tpl_free (tn); return 0; } /* Given a hash and a filename, persist to disk a string key, uint32_t value */ static int persist_si32 (GSMetric metric, const char *path, int module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (si32) * hash = NULL; tpl_node *tn = NULL; int date = 0; char fmt[] = "A(iA(su))"; uint32_t val = 0; const char *key = NULL; if (!dates || !(tn = tpl_map (fmt, &date, &key, &val))) return 1; /* *INDENT-OFF* */ HT_FOREACH_KEY (dates, date, { if (!(hash = get_hash (module, date, metric))) return -1; kh_foreach (hash, key, val, { tpl_pack (tn, 2); }); tpl_pack (tn, 1); }); /* *INDENT-ON* */ close_tpl (tn, path); return 0; } /* Given a database filename, restore a uint32_t key, string value back to * the storage */ static int migrate_is32_to_ii08 (GSMetric metric, const char *path, int module) { khash_t (ii08) * hash = NULL; GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si08) * mtpr = get_hdb (db, MTRC_METH_PROTO); tpl_node *tn; char fmt[] = "A(iA(us))"; int date = 0, ret = 0; uint32_t key = 0; char *val = NULL; khint_t k; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { k = kh_get (si08, mtpr, val); /* key found, return current value */ if (k == kh_end (mtpr)) { free (val); continue; } ins_ii08 (hash, key, kh_val (mtpr, k)); free (val); } } tpl_free (tn); return 0; } /* Given a database filename, restore a uint32_t key, string value back to * the storage */ static int restore_is32 (GSMetric metric, const char *path, int module) { khash_t (is32) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(us))"; int date = 0, ret = 0; uint32_t key = 0; char *val = NULL, *dupval = NULL; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { dupval = xstrdup (val); if (ins_is32 (hash, key, dupval) != 0) free (dupval); free (val); } } tpl_free (tn); return 0; } /* Given a hash and a filename, persist to disk a uint32_t key, string value */ static int persist_is32 (GSMetric metric, const char *path, int module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (is32) * hash = NULL; tpl_node *tn = NULL; int date = 0; char fmt[] = "A(iA(us))"; char *val = NULL; uint32_t key = 0; if (!dates || !(tn = tpl_map (fmt, &date, &key, &val))) return 1; /* *INDENT-OFF* */ HT_FOREACH_KEY (dates, date, { if (!(hash = get_hash (module, date, metric))) return -1; kh_foreach (hash, key, val, { tpl_pack (tn, 2); }); tpl_pack (tn, 1); }); /* *INDENT-ON* */ close_tpl (tn, path); return 0; } /* Given a database filename, restore a uint32_t key, uint32_t value back to * the storage */ static int restore_ii08 (GSMetric metric, const char *path, int module) { khash_t (ii08) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(uv))"; int date = 0, ret = 0; uint32_t key = 0; uint16_t val = 0; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { ins_ii08 (hash, key, val); } } tpl_free (tn); return 0; } /* Given a database filename, restore a uint32_t key, uint32_t value back to * the storage */ static int restore_ii32 (GSMetric metric, const char *path, int module) { khash_t (ii32) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(uu))"; int date = 0, ret = 0; uint32_t key = 0, val = 0; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { ins_ii32 (hash, key, val); } } tpl_free (tn); return 0; } /* Given a hash and a filename, persist to disk a uint32_t key, uint32_t value */ static int persist_ii32 (GSMetric metric, const char *path, int module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (ii32) * hash = NULL; tpl_node *tn = NULL; int date = 0; char fmt[] = "A(iA(uu))"; uint32_t key = 0, val = 0; if (!dates || !(tn = tpl_map (fmt, &date, &key, &val))) return 1; /* *INDENT-OFF* */ HT_FOREACH_KEY (dates, date, { if (!(hash = get_hash (module, date, metric))) return -1; kh_foreach (hash, key, val, { tpl_pack (tn, 2); }); tpl_pack (tn, 1); }); /* *INDENT-ON* */ close_tpl (tn, path); return 0; } /* Given a hash and a filename, persist to disk a uint32_t key, uint32_t value */ static int persist_ii08 (GSMetric metric, const char *path, int module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (ii08) * hash = NULL; tpl_node *tn = NULL; int date = 0; char fmt[] = "A(iA(uv))"; uint32_t key = 0; uint16_t val = 0; if (!dates || !(tn = tpl_map (fmt, &date, &key, &val))) return 1; /* *INDENT-OFF* */ HT_FOREACH_KEY (dates, date, { if (!(hash = get_hash (module, date, metric))) return -1; kh_foreach (hash, key, val, { tpl_pack (tn, 2); }); tpl_pack (tn, 1); }); /* *INDENT-ON* */ close_tpl (tn, path); return 0; } /* Given a database filename, restore a uint64_t key, uint8_t value back to * the storage */ static int restore_u648 (GSMetric metric, const char *path, int module) { khash_t (u648) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(Uv))"; int date = 0, ret = 0; uint64_t key; uint16_t val = 0; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { ins_u648 (hash, key, val); } } tpl_free (tn); return 0; } /* Given a hash and a filename, persist to disk a uint64_t key, uint8_t value */ static int persist_u648 (GSMetric metric, const char *path, int module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (u648) * hash = NULL; tpl_node *tn = NULL; int date = 0; char fmt[] = "A(iA(Uv))"; uint64_t key; uint16_t val = 0; if (!dates || !(tn = tpl_map (fmt, &date, &key, &val))) return 1; /* *INDENT-OFF* */ HT_FOREACH_KEY (dates, date, { if (!(hash = get_hash (module, date, metric))) return -1; kh_foreach (hash, key, val, { tpl_pack (tn, 2); }); tpl_pack (tn, 1); }); /* *INDENT-ON* */ close_tpl (tn, path); return 0; } /* Given a database filename, restore a uint32_t key, uint64_t value back to * the storage */ static int restore_iu64 (GSMetric metric, const char *path, int module) { khash_t (iu64) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(uU))"; int date = 0, ret = 0; uint32_t key; uint64_t val; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { ins_iu64 (hash, key, val); } } tpl_free (tn); return 0; } /* Given a hash and a filename, persist to disk a uint32_t key, uint64_t value */ static int persist_iu64 (GSMetric metric, const char *path, int module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (iu64) * hash = NULL; tpl_node *tn = NULL; int date = 0; char fmt[] = "A(iA(uU))"; uint32_t key; uint64_t val; if (!dates || !(tn = tpl_map (fmt, &date, &key, &val))) return 1; /* *INDENT-OFF* */ HT_FOREACH_KEY (dates, date, { if (!(hash = get_hash (module, date, metric))) return -1; kh_foreach (hash, key, val, { tpl_pack (tn, 2); }); tpl_pack (tn, 1); }); /* *INDENT-ON* */ close_tpl (tn, path); return 0; } /* Given a database filename, restore a string key, uint64_t value back to * the storage */ static int restore_su64 (GSMetric metric, const char *path, int module) { khash_t (su64) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(sU))"; int date = 0, ret = 0; char *key = NULL; uint64_t val; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { ins_su64 (hash, key, val); free (key); } } tpl_free (tn); return 0; } /* Given a hash and a filename, persist to disk a string key, uint64_t value */ static int persist_su64 (GSMetric metric, const char *path, int module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (su64) * hash = NULL; tpl_node *tn = NULL; int date = 0; char fmt[] = "A(iA(sU))"; const char *key = NULL; uint64_t val; if (!dates || !(tn = tpl_map (fmt, &date, &key, &val))) return 1; /* *INDENT-OFF* */ HT_FOREACH_KEY (dates, date, { if (!(hash = get_hash (module, date, metric))) return -1; kh_foreach (hash, key, val, { tpl_pack (tn, 2); }); tpl_pack (tn, 1); }); /* *INDENT-ON* */ close_tpl (tn, path); return 0; } /* Given a database filename, restore a uint32_t key, GSLList value back to the * storage */ static int restore_igsl (GSMetric metric, const char *path, int module) { khash_t (igsl) * hash = NULL; tpl_node *tn; char fmt[] = "A(iA(uu))"; int date = 0, ret = 0; uint32_t key, val; if (!(tn = tpl_map (fmt, &date, &key, &val))) return 1; tpl_load (tn, TPL_FILE, path); while (tpl_unpack (tn, 1) > 0) { if ((ret = insert_restored_date (date)) == 2) continue; if (ret == -1 || !(hash = get_hash (module, date, metric))) break; while (tpl_unpack (tn, 2) > 0) { ins_igsl (hash, key, val); } } tpl_free (tn); return 0; } /* Given a hash and a filename, persist to disk a uint32_t key, GSLList value */ static int persist_igsl (GSMetric metric, const char *path, int module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (igsl) * hash = NULL; GSLList *node; tpl_node *tn = NULL; int date = 0; char fmt[] = "A(iA(uu))"; uint32_t key, val; if (!dates || !(tn = tpl_map (fmt, &date, &key, &val))) return 1; /* *INDENT-OFF* */ HT_FOREACH_KEY (dates, date, { if (!(hash = get_hash (module, date, metric))) return -1; kh_foreach (hash, key, node, { while (node) { val = (*(uint32_t *) node->data); node = node->next; } tpl_pack (tn, 2); }); tpl_pack (tn, 1); }); /* *INDENT-ON* */ close_tpl (tn, path); return 0; } /* Entry function to restore hash data by type */ static void restore_by_type (GKHashMetric mtrc, const char *fn, int module) { char *path = NULL; if (!(path = check_restore_path (fn))) goto clean; switch (mtrc.type) { case MTRC_TYPE_SI32: restore_si32 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_IS32: restore_is32 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_II08: restore_ii08 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_II32: restore_ii32 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_U648: restore_u648 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_IU64: restore_iu64 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_SU64: restore_su64 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_IGSL: restore_igsl (mtrc.metric.storem, path, module); break; default: break; } clean: free (path); } /* Entry function to restore hash data by metric type */ static void restore_metric_type (GModule module, GKHashMetric mtrc) { char *fn = NULL; fn = get_filename (module, mtrc); restore_by_type (mtrc, fn, module); free (fn); } static int migrate_metric (GModule module, GKHashMetric mtrc) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * db_props = get_hdb (db, MTRC_DB_PROPS); int ret = 0; char *fn = NULL, *path = NULL; const char *modstr, *mtrstr; khint_t k; k = kh_get (si32, db_props, "version"); /* db is up-to-date, thus no need to migrate anything */ if (k != kh_end (db_props) && kh_val (db_props, k) == DB_VERSION) return 0; switch (mtrc.metric.storem) { case MTRC_UNIQUE_KEYS: if (!(path = check_restore_path ("SI32_UNIQUE_KEYS.db"))) break; if (migrate_si32_to_ii32_unique_keys (mtrc.metric.storem, path, -1) != 0) break; unlink (path); ret++; break; case MTRC_KEYMAP: if (!(modstr = get_module_str (module))) FATAL ("Unable to allocate module name."); fn = build_filename ("SI32", modstr, "MTRC_KEYMAP"); if (!(path = check_restore_path (fn))) break; if (migrate_si32_to_ii32 (mtrc.metric.storem, path, module) != 0) break; unlink (path); ret++; break; case MTRC_METHODS: case MTRC_PROTOCOLS: if (!(mtrstr = get_mtr_str (mtrc.metric.storem))) FATAL ("Unable to allocate metric name."); if (!(modstr = get_module_str (module))) FATAL ("Unable to allocate module name."); fn = build_filename ("IS32", modstr, mtrstr); if (!(path = check_restore_path (fn))) break; if (migrate_is32_to_ii08 (mtrc.metric.storem, path, module) != 0) break; unlink (path); ret++; break; case MTRC_AGENT_KEYS: if (!(path = check_restore_path ("SI32_AGENT_KEYS.db"))) break; if (migrate_si32_to_ii32 (mtrc.metric.storem, path, -1) != 0) break; unlink (path); ret++; break; default: break; } free (fn); free (path); return ret; } static void persist_by_type (GKHashMetric mtrc, const char *fn, int module) { char *path = NULL; path = set_db_path (fn); switch (mtrc.type) { case MTRC_TYPE_SI32: persist_si32 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_IS32: persist_is32 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_II32: persist_ii32 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_II08: persist_ii08 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_U648: persist_u648 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_IU64: persist_iu64 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_SU64: persist_su64 (mtrc.metric.storem, path, module); break; case MTRC_TYPE_IGSL: persist_igsl (mtrc.metric.storem, path, module); break; default: break; } free (path); } static void persist_metric_type (GModule module, GKHashMetric mtrc) { char *fn = NULL; fn = get_filename (module, mtrc); persist_by_type (mtrc, fn, module); free (fn); } /* Given all the dates that we have processed, persist to disk a copy of them. */ static void persist_dates (void) { tpl_node *tn; char *path = NULL; uint32_t *dates = NULL, len = 0, i, date = 0; char fmt[] = "A(u)"; if (!(path = set_db_path ("I32_DATES.db"))) return; dates = get_sorted_dates (&len); tn = tpl_map (fmt, &date); for (i = 0; i < len; ++i) { date = dates[i]; tpl_pack (tn, 1); } tpl_dump (tn, TPL_FILE, path); tpl_free (tn); free (path); free (dates); } /* Restore all the processed dates from our last dataset */ static void restore_dates (void) { tpl_node *tn; char *path = NULL; uint32_t date, idx = 0; char fmt[] = "A(u)"; int len; if (!(path = check_restore_path ("I32_DATES.db"))) return; tn = tpl_map (fmt, &date); tpl_load (tn, TPL_FILE, path); len = tpl_Alen (tn, 1); if (len < 0) return; persisted_dates_len = len; persisted_dates = xcalloc (persisted_dates_len, sizeof (uint32_t)); while (tpl_unpack (tn, 1) > 0) persisted_dates[idx++] = date; qsort (persisted_dates, idx, sizeof (uint32_t), cmp_ui32_desc); tpl_free (tn); free (path); } /* Entry function to restore a global hashes */ static void restore_global (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * overall = get_hdb (db, MTRC_CNT_OVERALL); khash_t (si32) * seqs = get_hdb (db, MTRC_SEQS); khash_t (iglp) * last_parse = get_hdb (db, MTRC_LAST_PARSE); khash_t (si32) * db_props = get_hdb (db, MTRC_DB_PROPS); khash_t (si08) * meth_proto = get_hdb (db, MTRC_METH_PROTO); char *path = NULL; if ((path = check_restore_path ("SI32_DB_PROPS.db"))) { restore_global_si32 (db_props, path); free (path); } restore_dates (); if ((path = check_restore_path ("SI32_CNT_OVERALL.db"))) { restore_global_si32 (overall, path); free (path); } if ((path = check_restore_path ("SI32_SEQS.db"))) { restore_global_si32 (seqs, path); free (path); } if ((path = check_restore_path ("SI08_METH_PROTO.db"))) { restore_global_si08 (meth_proto, path); free (path); } if ((path = check_restore_path ("IGLP_LAST_PARSE.db"))) { restore_global_iglp (last_parse, path); free (path); } } static void persist_global (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * overall = get_hdb (db, MTRC_CNT_OVERALL); khash_t (si32) * seqs = get_hdb (db, MTRC_SEQS); khash_t (iglp) * last_parse = get_hdb (db, MTRC_LAST_PARSE); khash_t (si32) * db_props = get_hdb (db, MTRC_DB_PROPS); khash_t (si08) * meth_proto = get_hdb (db, MTRC_METH_PROTO); char *path = NULL; ins_si32 (db_props, "version", DB_VERSION); persist_dates (); if ((path = set_db_path ("SI32_CNT_OVERALL.db"))) { persist_global_si32 (overall, path); free (path); } if ((path = set_db_path ("SI32_SEQS.db"))) { persist_global_si32 (seqs, path); free (path); } if ((path = set_db_path ("IGLP_LAST_PARSE.db"))) { persist_global_iglp (last_parse, path); free (path); } if ((path = set_db_path ("SI08_METH_PROTO.db"))) { persist_global_si08 (meth_proto, path); free (path); } if ((path = set_db_path ("SI32_DB_PROPS.db"))) { persist_global_si32 (db_props, path); free (path); } } void persist_data (void) { GModule module; int i, n = 0; size_t idx = 0; persist_global (); n = global_metrics_len; for (i = 0; i < n; ++i) persist_by_type (global_metrics[i], global_metrics[i].filename, -1); n = module_metrics_len; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; for (i = 0; i < n; ++i) { persist_metric_type (module, module_metrics[i]); } } } /* Entry function to restore hashes */ void restore_data (void) { int migrated = 0; GModule module; int i, n = 0; size_t idx = 0; restore_global (); n = global_metrics_len; for (i = 0; i < n; ++i) { migrated += migrate_metric (-1, global_metrics[i]); restore_by_type (global_metrics[i], global_metrics[i].filename, -1); } n = module_metrics_len; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; for (i = 0; i < n; ++i) { migrated += migrate_metric (module, module_metrics[i]); restore_metric_type (module, module_metrics[i]); } } if (migrated && !conf.persist) conf.persist = 1; } void free_persisted_data (void) { free (persisted_dates); } goaccess-1.9.3/src/khash.h0000644000175000017300000011371214624731651011046 /* The MIT License Copyright (c) 2008, 2009, 2011 by Attractive Chaos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* An example: #include "khash.h" KHASH_MAP_INIT_INT(32, char) int main() { int ret, is_missing; khiter_t k; khash_t(32) *h = kh_init(32); k = kh_put(32, h, 5, &ret); kh_value(h, k) = 10; k = kh_get(32, h, 10); is_missing = (k == kh_end(h)); k = kh_get(32, h, 5); kh_del(32, h, k); for (k = kh_begin(h); k != kh_end(h); ++k) if (kh_exist(h, k)) kh_value(h, k) = 1; kh_destroy(32, h); return 0; } */ /* 2013-05-02 (0.2.8): * Use quadratic probing. When the capacity is power of 2, stepping function i*(i+1)/2 guarantees to traverse each bucket. It is better than double hashing on cache performance and is more robust than linear probing. In theory, double hashing should be more robust than quadratic probing. However, my implementation is probably not for large hash tables, because the second hash function is closely tied to the first hash function, which reduce the effectiveness of double hashing. Reference: http://research.cs.vt.edu/AVresearch/hashing/quadratic.php 2011-12-29 (0.2.7): * Minor code clean up; no actual effect. 2011-09-16 (0.2.6): * The capacity is a power of 2. This seems to dramatically improve the speed for simple keys. Thank Zilong Tan for the suggestion. Reference: - http://code.google.com/p/ulib/ - http://nothings.org/computer/judy/ * Allow to optionally use linear probing which usually has better performance for random input. Double hashing is still the default as it is more robust to certain non-random input. * Added Wang's integer hash function (not used by default). This hash function is more robust to certain non-random input. 2011-02-14 (0.2.5): * Allow to declare global functions. 2009-09-26 (0.2.4): * Improve portability 2008-09-19 (0.2.3): * Corrected the example * Improved interfaces 2008-09-11 (0.2.2): * Improved speed a little in kh_put() 2008-09-10 (0.2.1): * Added kh_clear() * Fixed a compiling error 2008-09-02 (0.2.0): * Changed to token concatenation which increases flexibility. 2008-08-31 (0.1.2): * Fixed a bug in kh_get(), which has not been tested previously. 2008-08-31 (0.1.1): * Added destructor */ #ifndef __AC_KHASH_H #define __AC_KHASH_H /*! @header Generic hash table library. */ #define AC_VERSION_KHASH_H "0.2.8" #include #include #include /* compiler specific configuration */ #if UINT_MAX == 0xffffffffu typedef unsigned int khint32_t; #elif ULONG_MAX == 0xffffffffu typedef unsigned long khint32_t; #endif #if ULONG_MAX == ULLONG_MAX typedef unsigned long khint64_t; #else typedef unsigned long long khint64_t; #endif #ifndef kh_inline #ifdef _MSC_VER #define kh_inline __inline #else #define kh_inline inline #endif #endif /* kh_inline */ #ifndef klib_unused #if (defined __clang__ && __clang_major__ >= 3) || (defined __GNUC__ && __GNUC__ >= 3) #define klib_unused __attribute__ ((__unused__)) #else #define klib_unused #endif #endif /* klib_unused */ typedef khint32_t khint_t; typedef khint_t khiter_t; #define __ac_isempty(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&2) #define __ac_isdel(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&1) #define __ac_iseither(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&3) #define __ac_set_isdel_false(flag, i) (flag[i>>4]&=~(1ul<<((i&0xfU)<<1))) #define __ac_set_isempty_false(flag, i) (flag[i>>4]&=~(2ul<<((i&0xfU)<<1))) #define __ac_set_isboth_false(flag, i) (flag[i>>4]&=~(3ul<<((i&0xfU)<<1))) #define __ac_set_isdel_true(flag, i) (flag[i>>4]|=1ul<<((i&0xfU)<<1)) #define __ac_fsize(m) ((m) < 16? 1 : (m)>>4) #ifndef kroundup32 #define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x)) #endif #ifndef kcalloc #define kcalloc(N,Z) calloc(N,Z) #endif #ifndef kmalloc #define kmalloc(Z) malloc(Z) #endif #ifndef krealloc #define krealloc(P,Z) realloc(P,Z) #endif #ifndef kfree #define kfree(P) free(P) #endif static const double __ac_HASH_UPPER = 0.77; #define __KHASH_TYPE(name, khkey_t, khval_t) \ typedef struct kh_##name##_s { \ khint_t n_buckets, size, n_occupied, upper_bound; \ khint32_t *flags; \ khkey_t *keys; \ khval_t *vals; \ } kh_##name##_t; #define __KHASH_PROTOTYPES(name, khkey_t, khval_t) \ extern kh_##name##_t *kh_init_##name(void); \ extern void kh_destroy_##name(kh_##name##_t *h); \ extern void kh_clear_##name(kh_##name##_t *h); \ extern khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key); \ extern int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets); \ extern khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret); \ extern void kh_del_##name(kh_##name##_t *h, khint_t x); \ #define __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ SCOPE kh_##name##_t *kh_init_##name(void) { \ return (kh_##name##_t*) kcalloc(1, sizeof(kh_##name##_t)); \ } \ SCOPE void kh_destroy_##name(kh_##name##_t *h) \ { \ if (h) { \ kfree ((void *) h->keys); \ kfree (h->flags); \ kfree ((void *) h->vals); \ kfree (h); \ } \ } \ SCOPE void kh_clear_##name(kh_##name##_t *h) \ { \ if (h && h->flags) { \ memset (h->flags, 0xaa, __ac_fsize (h->n_buckets) * sizeof (khint32_t)); \ h->size = h->n_occupied = 0; \ } \ } \ SCOPE khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key) \ { \ if (h->n_buckets) { \ khint_t k, i, last, mask, step = 0; \ mask = h->n_buckets - 1; \ k = __hash_func (key); \ i = k & mask; \ last = i; \ while (!__ac_isempty (h->flags, i) && \ (__ac_isdel (h->flags, i) || !__hash_equal (h->keys[i], key))) { \ i = (i + (++step)) & mask; \ if (i == last) \ return h->n_buckets; \ } \ return __ac_iseither (h->flags, i) ? h->n_buckets : i; \ } else \ return 0; \ } \ SCOPE int kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets) \ { \ /* This function uses 0.25*n_buckets bytes of working space instead of */ \ /* [sizeof(key_t+val_t)+.25]*n_buckets. */ \ khint32_t *new_flags = 0; \ khint_t j = 1; \ { \ kroundup32 (new_n_buckets); \ if (new_n_buckets < 4) \ new_n_buckets = 4; \ if (h->size >= (khint_t) (new_n_buckets * __ac_HASH_UPPER + 0.5)) \ j = 0; /* requested size is too small */ \ else { /* hash table size to be changed (shrink or expand); rehash */ \ new_flags = (khint32_t *) kmalloc (__ac_fsize (new_n_buckets) * sizeof (khint32_t)); \ if (!new_flags) \ return -1; \ memset (new_flags, 0xaa, __ac_fsize (new_n_buckets) * sizeof (khint32_t)); \ if (h->n_buckets < new_n_buckets) { /* expand */ \ khkey_t *new_keys = (khkey_t *) krealloc ((void *) h->keys, new_n_buckets * sizeof (khkey_t)); \ if (!new_keys) { \ kfree (new_flags); \ return -1; \ } \ h->keys = new_keys; \ if (kh_is_map) { \ khval_t *new_vals = (khval_t *) krealloc ((void *) h->vals, new_n_buckets * sizeof (khval_t)); \ if (!new_vals) { \ kfree (new_flags); \ return -1; \ } \ h->vals = new_vals; \ } \ } /* otherwise shrink */ \ } \ } \ if (j) { /* rehashing is needed */ \ for (j = 0; j != h->n_buckets; ++j) { \ if (__ac_iseither (h->flags, j) == 0) { \ khkey_t key = h->keys[j]; \ khval_t val; \ khint_t new_mask; \ new_mask = new_n_buckets - 1; \ if (kh_is_map) \ val = h->vals[j]; \ __ac_set_isdel_true (h->flags, j); \ while (1) { /* kick-out process; sort of like in Cuckoo hashing */ \ khint_t k, i, step = 0; \ k = __hash_func (key); \ i = k & new_mask; \ while (!__ac_isempty (new_flags, i)) \ i = (i + (++step)) & new_mask; \ __ac_set_isempty_false (new_flags, i); \ if (i < h->n_buckets && __ac_iseither (h->flags, i) == 0) { /* kick out the existing element */ \ { \ khkey_t tmp = h->keys[i]; \ h->keys[i] = key; \ key = tmp; \ } \ if (kh_is_map) { \ khval_t tmp = h->vals[i]; \ h->vals[i] = val; \ val = tmp; \ } \ __ac_set_isdel_true (h->flags, i); /* mark it as deleted in the old hash table */ \ } else { /* write the element and jump out of the loop */ \ h->keys[i] = key; \ if (kh_is_map) \ h->vals[i] = val; \ break; \ } \ } \ } \ } \ if (h->n_buckets > new_n_buckets) { /* shrink the hash table */ \ h->keys = (khkey_t *) krealloc ((void *) h->keys, new_n_buckets * sizeof (khkey_t)); \ if (kh_is_map) \ h->vals = (khval_t *) krealloc ((void *) h->vals, new_n_buckets * sizeof (khval_t)); \ } \ kfree (h->flags); /* free the working space */ \ h->flags = new_flags; \ h->n_buckets = new_n_buckets; \ h->n_occupied = h->size; \ h->upper_bound = (khint_t) (h->n_buckets * __ac_HASH_UPPER + 0.5); \ } \ return 0; \ } \ SCOPE khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret) \ { \ khint_t x; \ if (h->n_occupied >= h->upper_bound) { /* update the hash table */ \ if (h->n_buckets > (h->size << 1)) { \ if (kh_resize_##name (h, h->n_buckets - 1) < 0) { /* clear "deleted" elements */ \ *ret = -1; \ return h->n_buckets; \ } \ } else if (kh_resize_##name (h, h->n_buckets + 1) < 0) { /* expand the hash table */ \ *ret = -1; \ return h->n_buckets; \ } \ } /* TODO: to implement automatically shrinking; resize() already support shrinking */ \ { \ khint_t k, i, site, last, mask = h->n_buckets - 1, step = 0; \ x = site = h->n_buckets; \ k = __hash_func (key); \ i = k & mask; \ if (__ac_isempty (h->flags, i)) \ x = i; /* for speed up */ \ else { \ last = i; \ while (!__ac_isempty (h->flags, i) && (__ac_isdel (h->flags, i) || !__hash_equal (h->keys[i], key))) { \ if (__ac_isdel (h->flags, i)) \ site = i; \ i = (i + (++step)) & mask; \ if (i == last) { \ x = site; \ break; \ } \ } \ if (x == h->n_buckets) { \ if (__ac_isempty (h->flags, i) && site != h->n_buckets) \ x = site; \ else \ x = i; \ } \ } \ } \ if (__ac_isempty (h->flags, x)) { /* not present at all */ \ h->keys[x] = key; \ __ac_set_isboth_false (h->flags, x); \ ++h->size; \ ++h->n_occupied; \ *ret = 1; \ } else if (__ac_isdel (h->flags, x)) { /* deleted */ \ h->keys[x] = key; \ __ac_set_isboth_false (h->flags, x); \ ++h->size; \ *ret = 2; \ } else \ *ret = 0; /* Don't touch h->keys[x] if present and not deleted */ \ return x; \ } \ SCOPE void kh_del_##name(kh_##name##_t *h, khint_t x) \ { \ if (x != h->n_buckets && !__ac_iseither (h->flags, x)) { \ __ac_set_isdel_true (h->flags, x); \ --h->size; \ } \ } \ #define KHASH_DECLARE(name, khkey_t, khval_t) \ __KHASH_TYPE(name, khkey_t, khval_t) \ __KHASH_PROTOTYPES(name, khkey_t, khval_t) #define KHASH_INIT2(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ __KHASH_TYPE(name, khkey_t, khval_t) \ __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) #define KHASH_INIT(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ KHASH_INIT2(name, static kh_inline klib_unused, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ /* --- BEGIN OF HASH FUNCTIONS --- */ /*! @function @abstract Integer hash function @param key The integer [khint32_t] @return The hash value [khint_t] */ #define kh_int_hash_func(key) (khint32_t)(key) /*! @function @abstract Integer comparison function */ #define kh_int_hash_equal(a, b) ((a) == (b)) /*! @function @abstract 64-bit integer hash function @param key The integer [khint64_t] @return The hash value [khint_t] */ #define kh_int64_hash_func(key) (khint32_t)((key)>>33^(key)^(key)<<11) /*! @function @abstract 64-bit integer comparison function */ #define kh_int64_hash_equal(a, b) ((a) == (b)) /*! @function @abstract const char* hash function @param s Pointer to a null terminated string @return The hash value */ #if defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 4) __attribute__((no_sanitize ("unsigned-integer-overflow"))) #if (__clang_major__ >= 12) __attribute__((no_sanitize ("unsigned-shift-base"))) #endif #endif static kh_inline khint_t __ac_X31_hash_string (const char *s) { khint_t h = (khint_t) * s; if (h) for (++s; *s; ++s) h = (h << 5) - h + (khint_t) * s; return h; } /*! @function @abstract Another interface to const char* hash function @param key Pointer to a null terminated string [const char*] @return The hash value [khint_t] */ #define kh_str_hash_func(key) __ac_X31_hash_string(key) /*! @function @abstract Const char* comparison function */ #define kh_str_hash_equal(a, b) (strcmp(a, b) == 0) static kh_inline khint_t __ac_Wang_hash (khint_t key) { key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16); return key; } #define kh_int_hash_func2(k) __ac_Wang_hash((khint_t)key) /* --- END OF HASH FUNCTIONS --- */ /* Other convenient macros... */ /*! @abstract Type of the hash table. @param name Name of the hash table [symbol] */ #define khash_t(name) kh_##name##_t /*! @function @abstract Initiate a hash table. @param name Name of the hash table [symbol] @return Pointer to the hash table [khash_t(name)*] */ #define kh_init(name) kh_init_##name() /*! @function @abstract Destroy a hash table. @param name Name of the hash table [symbol] @param h Pointer to the hash table [khash_t(name)*] */ #define kh_destroy(name, h) kh_destroy_##name(h) /*! @function @abstract Reset a hash table without deallocating memory. @param name Name of the hash table [symbol] @param h Pointer to the hash table [khash_t(name)*] */ #define kh_clear(name, h) kh_clear_##name(h) /*! @function @abstract Resize a hash table. @param name Name of the hash table [symbol] @param h Pointer to the hash table [khash_t(name)*] @param s New size [khint_t] */ #define kh_resize(name, h, s) kh_resize_##name(h, s) /*! @function @abstract Insert a key to the hash table. @param name Name of the hash table [symbol] @param h Pointer to the hash table [khash_t(name)*] @param k Key [type of keys] @param r Extra return code: -1 if the operation failed; 0 if the key is present in the hash table; 1 if the bucket is empty (never used); 2 if the element in the bucket has been deleted [int*] @return Iterator to the inserted element [khint_t] */ #define kh_put(name, h, k, r) kh_put_##name(h, k, r) /*! @function @abstract Retrieve a key from the hash table. @param name Name of the hash table [symbol] @param h Pointer to the hash table [khash_t(name)*] @param k Key [type of keys] @return Iterator to the found element, or kh_end(h) if the element is absent [khint_t] */ #define kh_get(name, h, k) kh_get_##name(h, k) /*! @function @abstract Remove a key from the hash table. @param name Name of the hash table [symbol] @param h Pointer to the hash table [khash_t(name)*] @param k Iterator to the element to be deleted [khint_t] */ #define kh_del(name, h, k) kh_del_##name(h, k) /*! @function @abstract Test whether a bucket contains data. @param h Pointer to the hash table [khash_t(name)*] @param x Iterator to the bucket [khint_t] @return 1 if containing data; 0 otherwise [int] */ #define kh_exist(h, x) (!__ac_iseither((h)->flags, (x))) /*! @function @abstract Get key given an iterator @param h Pointer to the hash table [khash_t(name)*] @param x Iterator to the bucket [khint_t] @return Key [type of keys] */ #define kh_key(h, x) ((h)->keys[x]) /*! @function @abstract Get value given an iterator @param h Pointer to the hash table [khash_t(name)*] @param x Iterator to the bucket [khint_t] @return Value [type of values] @discussion For hash sets, calling this results in segfault. */ #define kh_val(h, x) ((h)->vals[x]) /*! @function @abstract Alias of kh_val() */ #define kh_value(h, x) ((h)->vals[x]) /*! @function @abstract Get the start iterator @param h Pointer to the hash table [khash_t(name)*] @return The start iterator [khint_t] */ #define kh_begin(h) (khint_t)(0) /*! @function @abstract Get the end iterator @param h Pointer to the hash table [khash_t(name)*] @return The end iterator [khint_t] */ #define kh_end(h) ((h)->n_buckets) /*! @function @abstract Get the number of elements in the hash table @param h Pointer to the hash table [khash_t(name)*] @return Number of elements in the hash table [khint_t] */ #define kh_size(h) ((h)->size) /*! @function @abstract Get the number of buckets in the hash table @param h Pointer to the hash table [khash_t(name)*] @return Number of buckets in the hash table [khint_t] */ #define kh_n_buckets(h) ((h)->n_buckets) /*! @function @abstract Iterate over the entries in the hash table @param h Pointer to the hash table [khash_t(name)*] @param kvar Variable to which key will be assigned @param vvar Variable to which value will be assigned @param code Block of code to execute */ #define kh_foreach(h, kvar, vvar, code) { khint_t __i; \ for (__i = kh_begin(h); __i != kh_end(h); ++__i) { \ if (!kh_exist(h,__i)) continue; \ (kvar) = kh_key(h,__i); \ (vvar) = kh_val(h,__i); \ code; \ } } /*! @function @abstract Iterate over the values in the hash table @param h Pointer to the hash table [khash_t(name)*] @param vvar Variable to which value will be assigned @param code Block of code to execute */ #define kh_foreach_value(h, vvar, code) { khint_t __i; \ for (__i = kh_begin (h); __i != kh_end (h); ++__i) { \ if (!kh_exist (h, __i)) \ continue; \ (vvar) = kh_val (h, __i); \ code; \ } } /* More convenient interfaces */ /*! @function @abstract Instantiate a hash set containing integer keys @param name Name of the hash table [symbol] */ #define KHASH_SET_INIT_INT(name) \ KHASH_INIT(name, khint32_t, char, 0, kh_int_hash_func, kh_int_hash_equal) /*! @function @abstract Instantiate a hash map containing integer keys @param name Name of the hash table [symbol] @param khval_t Type of values [type] */ #define KHASH_MAP_INIT_INT(name, khval_t) \ KHASH_INIT(name, khint32_t, khval_t, 1, kh_int_hash_func, kh_int_hash_equal) /*! @function @abstract Instantiate a hash map containing 64-bit integer keys @param name Name of the hash table [symbol] */ #define KHASH_SET_INIT_INT64(name) \ KHASH_INIT(name, khint64_t, char, 0, kh_int64_hash_func, kh_int64_hash_equal) /*! @function @abstract Instantiate a hash map containing 64-bit integer keys @param name Name of the hash table [symbol] @param khval_t Type of values [type] */ #define KHASH_MAP_INIT_INT64(name, khval_t) \ KHASH_INIT(name, khint64_t, khval_t, 1, kh_int64_hash_func, kh_int64_hash_equal) typedef const char *kh_cstr_t; /*! @function @abstract Instantiate a hash map containing const char* keys @param name Name of the hash table [symbol] */ #define KHASH_SET_INIT_STR(name) \ KHASH_INIT(name, kh_cstr_t, char, 0, kh_str_hash_func, kh_str_hash_equal) /*! @function @abstract Instantiate a hash map containing const char* keys @param name Name of the hash table [symbol] @param khval_t Type of values [type] */ #define KHASH_MAP_INIT_STR(name, khval_t) \ KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str_hash_equal) #endif /* __AC_KHASH_H */ goaccess-1.9.3/src/xmalloc.h0000644000175000017300000000310314624731651011377 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2022 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef XMALLOC_H_INCLUDED #define XMALLOC_H_INCLUDED char *xstrdup (const char *s); void *xcalloc (size_t nmemb, size_t size); void *xmalloc (size_t size); void *xrealloc (void *oldptr, size_t size); #endif goaccess-1.9.3/src/pdjson.h0000644000175000017300000000575414624731651011253 #ifndef PDJSON_H #define PDJSON_H #ifndef PDJSON_SYMEXPORT # define PDJSON_SYMEXPORT #endif #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) #include #else #ifndef bool #define bool int #define true 1 #define false 0 #endif /* bool */ #endif /* __STDC_VERSION__ */ #include enum json_type { JSON_ERROR = 1, JSON_DONE, JSON_OBJECT, JSON_OBJECT_END, JSON_ARRAY, JSON_ARRAY_END, JSON_STRING, JSON_NUMBER, JSON_TRUE, JSON_FALSE, JSON_NULL }; struct json_allocator { void *(*malloc) (size_t); void *(*realloc) (void *, size_t); void (*free) (void *); }; typedef int (*json_user_io) (void *user); typedef struct json_stream json_stream; typedef struct json_allocator json_allocator; PDJSON_SYMEXPORT void json_open_buffer (json_stream * json, const void *buffer, size_t size); PDJSON_SYMEXPORT void json_open_string (json_stream * json, const char *string); PDJSON_SYMEXPORT void json_open_stream (json_stream * json, FILE * stream); PDJSON_SYMEXPORT void json_open_user (json_stream * json, json_user_io get, json_user_io peek, void *user); PDJSON_SYMEXPORT void json_close (json_stream * json); PDJSON_SYMEXPORT void json_set_allocator (json_stream * json, json_allocator * a); PDJSON_SYMEXPORT void json_set_streaming (json_stream * json, bool mode); PDJSON_SYMEXPORT enum json_type json_next (json_stream * json); PDJSON_SYMEXPORT enum json_type json_peek (json_stream * json); PDJSON_SYMEXPORT void json_reset (json_stream * json); PDJSON_SYMEXPORT const char *json_get_string (json_stream * json, size_t *length); PDJSON_SYMEXPORT double json_get_number (json_stream * json); PDJSON_SYMEXPORT enum json_type json_skip (json_stream * json); PDJSON_SYMEXPORT enum json_type json_skip_until (json_stream * json, enum json_type type); PDJSON_SYMEXPORT size_t json_get_lineno (json_stream * json); PDJSON_SYMEXPORT size_t json_get_position (json_stream * json); PDJSON_SYMEXPORT size_t json_get_depth (json_stream * json); PDJSON_SYMEXPORT enum json_type json_get_context (json_stream * json, size_t *count); PDJSON_SYMEXPORT const char *json_get_error (json_stream * json); PDJSON_SYMEXPORT int json_source_get (json_stream * json); PDJSON_SYMEXPORT int json_source_peek (json_stream * json); PDJSON_SYMEXPORT bool json_isspace (int c); /* internal */ struct json_source { int (*get) (struct json_source *); int (*peek) (struct json_source *); size_t position; union { struct { FILE *stream; } stream; struct { const char *buffer; size_t length; } buffer; struct { void *ptr; json_user_io get; json_user_io peek; } user; } source; }; struct json_stream { size_t lineno; struct json_stack *stack; size_t stack_top; size_t stack_size; enum json_type next; unsigned flags; struct { char *string; size_t string_fill; size_t string_size; } data; size_t ntokens; struct json_source source; struct json_allocator alloc; char errmsg[128]; }; #endif goaccess-1.9.3/src/csv.h0000644000175000017300000000311614624731651010537 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include #endif #ifndef CSV_H_INCLUDED #define CSV_H_INCLUDED #include #include "parser.h" #include "settings.h" void output_csv (GHolder * holder, const char *filename); #endif goaccess-1.9.3/src/commons.c0000644000175000017300000003300214624731651011407 /** * commons.c -- holds different data types * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include "commons.h" #include "labels.h" #include "settings.h" #include "util.h" #include "xmalloc.h" /* processing time */ time_t end_proc; time_t timestamp; time_t start_proc; /* list of available modules/panels */ int module_list[TOTAL_MODULES] = {[0 ... TOTAL_MODULES - 1] = -1 }; /* *INDENT-OFF* */ /* String modules to enumerated modules */ static const GEnum enum_modules[] = { {"VISITORS" , VISITORS} , {"REQUESTS" , REQUESTS} , {"REQUESTS_STATIC" , REQUESTS_STATIC} , {"NOT_FOUND" , NOT_FOUND} , {"HOSTS" , HOSTS} , {"OS" , OS} , {"BROWSERS" , BROWSERS} , {"VISIT_TIMES" , VISIT_TIMES} , {"VIRTUAL_HOSTS" , VIRTUAL_HOSTS} , {"REFERRERS" , REFERRERS} , {"REFERRING_SITES" , REFERRING_SITES} , {"KEYPHRASES" , KEYPHRASES} , {"STATUS_CODES" , STATUS_CODES} , {"REMOTE_USER" , REMOTE_USER} , {"CACHE_STATUS" , CACHE_STATUS} , #ifdef HAVE_GEOLOCATION {"GEO_LOCATION" , GEO_LOCATION} , {"ASN" , ASN} , #endif {"MIME_TYPE" , MIME_TYPE} , {"TLS_TYPE" , TLS_TYPE} , }; /* *INDENT-ON* */ /* Get number of items per panel to parse. * * The number of items per panel is returned. */ int get_max_choices (void) { char *csv = NULL, *json = NULL, *html = NULL; int max = MAX_CHOICES; /* no max choices, return defaults */ if (conf.max_items <= 0) return conf.real_time_html ? MAX_CHOICES_RT : (conf.date_spec_hr == 2 ? MAX_CHOICES_MINUTE : MAX_CHOICES); /* TERM */ if (!conf.output_stdout) return conf.max_items > MAX_CHOICES ? MAX_CHOICES : conf.max_items; /* REAL-TIME STDOUT */ /* real time HTML, display max rt choices */ if (conf.real_time_html) return conf.max_items > MAX_CHOICES_RT ? MAX_CHOICES_RT : conf.max_items; /* STDOUT */ /* CSV - allow n amount of choices */ if (find_output_type (&csv, "csv", 1) == 0) max = conf.max_items; /* JSON - allow n amount of choices */ if (find_output_type (&json, "json", 1) == 0 && conf.max_items > 0) max = conf.max_items; /* HTML - takes priority on cases where multiple outputs were given. Note that * we check either for an .html extension or we assume not extension was passed * via -o and therefore we are redirecting the output to a file. */ if (find_output_type (&html, "html", 1) == 0 || conf.output_format_idx == 0) max = conf.max_items; free (csv); free (html); free (json); return max; } /* Calculate a percentage. * * The percentage is returned. */ float get_percentage (unsigned long long total, unsigned long long hit) { return (total == 0 ? 0 : (((float) hit) / total) * 100); } /* Display the storage being used. */ void display_storage (void) { fprintf (stdout, "%s\n", BUILT_WITH_DEFHASH); } /* Display the path of the default configuration file when `-p` is not used */ void display_default_config_file (void) { char *path = get_config_file_path (); if (!path) { fprintf (stdout, "%s\n", ERR_NODEF_CONF_FILE); fprintf (stdout, "%s `-p /path/goaccess.conf`\n", ERR_NODEF_CONF_FILE_DESC); } else { fprintf (stdout, "%s\n", path); free (path); } } /* Display the current version. */ void display_version (void) { fprintf (stdout, "GoAccess - %s.\n", GO_VERSION); fprintf (stdout, "%s: %s\n", INFO_MORE_INFO, GO_WEBSITE); fprintf (stdout, "Copyright (C) 2009-2024 by Gerardo Orellana\n"); fprintf (stdout, "\nBuild configure arguments:\n"); #ifdef DEBUG fprintf (stdout, " --enable-debug\n"); #endif #ifdef HAVE_NCURSESW_NCURSES_H fprintf (stdout, " --enable-utf8\n"); #endif #ifdef HAVE_LIBGEOIP fprintf (stdout, " --enable-geoip=legacy\n"); #endif #ifdef HAVE_LIBMAXMINDDB fprintf (stdout, " --enable-geoip=mmdb\n"); #endif #ifdef WITH_GETLINE fprintf (stdout, " --with-getline\n"); #endif #ifdef HAVE_LIBSSL fprintf (stdout, " --with-openssl\n"); #endif } /* Get the enumerated value given a string. * * On error, -1 is returned. * On success, the enumerated module value is returned. */ int str2enum (const GEnum map[], int len, const char *str) { int i; for (i = 0; i < len; ++i) { if (!strcmp (str, map[i].str)) return map[i].idx; } return -1; } /* Get the string value given an enum. * * On error, -1 is returned. * On success, the enumerated module value is returned. */ const char * enum2str (const GEnum map[], int len, int idx) { int i; for (i = 0; i < len; ++i) { if (idx == map[i].idx) return map[i].str; } return NULL; } /* Get the enumerated module value given a module string. * * On error, -1 is returned. * On success, the enumerated module value is returned. */ int get_module_enum (const char *str) { return str2enum (enum_modules, ARRAY_SIZE (enum_modules), str); } /* Get the module string value given a module enum value. * * On error, NULL is returned. * On success, the string module value is returned. */ const char * get_module_str (GModule module) { return enum2str (enum_modules, ARRAY_SIZE (enum_modules), module); } /* Instantiate a new GAgents structure. * * On success, the newly malloc'd structure is returned. */ GAgents * new_gagents (uint32_t size) { GAgents *agents = xmalloc (sizeof (GAgents)); memset (agents, 0, sizeof *agents); agents->items = xcalloc (size, sizeof (GAgentItem)); agents->size = size; agents->idx = 0; return agents; } /* Clean the array of agents. */ void free_agents_array (GAgents *agents) { int i; if (agents == NULL) return; /* clean stuff up */ for (i = 0; i < agents->idx; ++i) free (agents->items[i].agent); if (agents->items) free (agents->items); free (agents); } /* Determine if the given date format is a timestamp. * * If not a timestamp, 0 is returned. * If it is a timestamp, 1 is returned. */ int has_timestamp (const char *fmt) { if (strcmp ("%s", fmt) == 0 || strcmp ("%f", fmt) == 0) return 1; return 0; } /* Determine if the given module is set to be enabled. * * If enabled, 1 is returned, else 0 is returned. */ int enable_panel (GModule mod) { int i, module; for (i = 0; i < conf.enable_panel_idx; ++i) { if ((module = get_module_enum (conf.enable_panels[i])) == -1) continue; if (mod == (unsigned int) module) { return 1; } } return 0; } /* Determine if the given module is set to be ignored. * * If ignored, 1 is returned, else 0 is returned. */ int ignore_panel (GModule mod) { int i, module; for (i = 0; i < conf.ignore_panel_idx; ++i) { if ((module = get_module_enum (conf.ignore_panels[i])) == -1) continue; if (mod == (unsigned int) module) { return 1; } } return 0; } /* Get the number of available modules/panels. * * The number of modules available is returned. */ uint32_t get_num_modules (void) { size_t idx = 0; uint32_t num = 0; FOREACH_MODULE (idx, module_list) { num++; } return num; } /* Get the index from the module_list given a module. * * If the module is not within the array, -1 is returned. * If the module is within the array, the index is returned. */ int get_module_index (int module) { size_t idx = 0; FOREACH_MODULE (idx, module_list) { if (module_list[idx] == module) return idx; } return -1; } /* Remove the given module from the module_list array. * * If the module is not within the array, 1 is returned. * If the module is within the array, it is removed from the array and * 0 is returned. */ int remove_module (GModule module) { int idx = get_module_index (module); if (idx == -1) return 1; if (idx < TOTAL_MODULES - 1) memmove (&module_list[idx], &module_list[idx + 1], ((TOTAL_MODULES - 1) - idx) * sizeof (module_list[0])); module_list[TOTAL_MODULES - 1] = -1; return 0; } /* Find the next module given the current module. * * The next available module in the array is returned. */ int get_next_module (GModule module) { int next = get_module_index (module) + 1; if (next == TOTAL_MODULES || module_list[next] == -1) return module_list[0]; return module_list[next]; } /* Find the previous module given the current module. * * The previous available module in the array is returned. */ int get_prev_module (GModule module) { int i; int next = get_module_index (module) - 1; if (next >= 0 && module_list[next] != -1) return module_list[next]; for (i = TOTAL_MODULES - 1; i >= 0; i--) { if (module_list[i] != -1) { return module_list[i]; } } return 0; } /* Perform some additional tasks to panels before they are being * parsed. * * Note: This overwrites --enable-panel since it assumes there's * truly nothing to do with the panel */ void verify_panels (void) { int ignore_panel_idx = conf.ignore_panel_idx; /* Remove virtual host panel if no '%v' within log format */ if (!conf.log_format) return; if (!strstr (conf.log_format, "%v") && ignore_panel_idx < TOTAL_MODULES && !conf.fname_as_vhost) { if (str_inarray ("VIRTUAL_HOSTS", conf.ignore_panels, ignore_panel_idx) < 0) remove_module (VIRTUAL_HOSTS); } if (!strstr (conf.log_format, "%e") && ignore_panel_idx < TOTAL_MODULES) { if (str_inarray ("REMOTE_USER", conf.ignore_panels, ignore_panel_idx) < 0) remove_module (REMOTE_USER); } if (!strstr (conf.log_format, "%C") && ignore_panel_idx < TOTAL_MODULES) { if (str_inarray ("CACHE_STATUS", conf.ignore_panels, ignore_panel_idx) < 0) remove_module (CACHE_STATUS); } if (!strstr (conf.log_format, "%M") && ignore_panel_idx < TOTAL_MODULES) { if (str_inarray ("MIME_TYPE", conf.ignore_panels, ignore_panel_idx) < 0) remove_module (MIME_TYPE); } if (!strstr (conf.log_format, "%K") && ignore_panel_idx < TOTAL_MODULES) { if (str_inarray ("TLS_TYPE", conf.ignore_panels, ignore_panel_idx) < 0) remove_module (TLS_TYPE); } #ifdef HAVE_GEOLOCATION #ifdef HAVE_LIBMAXMINDDB if (!conf.geoip_db_idx && ignore_panel_idx < TOTAL_MODULES) { if (str_inarray ("GEO_LOCATION", conf.ignore_panels, ignore_panel_idx) < 0) remove_module (GEO_LOCATION); } if (!conf.geoip_db_idx && ignore_panel_idx < TOTAL_MODULES) { if (str_inarray ("ASN", conf.ignore_panels, ignore_panel_idx) < 0) remove_module (ASN); } #endif #endif } /* Build an array of available modules (ignores listed panels). * * If there are no modules enabled, 0 is returned. * On success, the first enabled module is returned. */ int init_modules (void) { GModule module; int i; /* init - terminating with -1 */ for (module = 0; module < TOTAL_MODULES; ++module) module_list[module] = -1; for (i = 0, module = 0; module < TOTAL_MODULES; ++module) { if (!ignore_panel (module) || enable_panel (module)) { module_list[i++] = module; } } return module_list[0] > -1 ? module_list[0] : 0; } /* Get the logs size. * * If log was piped (from stdin), 0 is returned. * On success, it adds up all log sizes and its value is returned. * if --log-size was specified, it will be returned explicitly */ intmax_t get_log_sizes (void) { int i; off_t size = 0; /* --log-size */ if (conf.log_size > 0) return (intmax_t) conf.log_size; for (i = 0; i < conf.filenames_idx; ++i) { if (conf.filenames[i][0] == '-' && conf.filenames[i][1] == '\0') size += 0; else size += file_size (conf.filenames[i]); } return (intmax_t) size; } /* Get the log sources used. * * On success, a newly malloc'd string containing the log source either * from filename(s) and/or STDIN is returned. */ char * get_log_source_str (int max_len) { char *str = xstrdup (""); int i, len = 0; for (i = 0; i < conf.filenames_idx; ++i) { if (conf.filenames[i][0] == '-' && conf.filenames[i][1] == '\0') append_str (&str, "STDIN"); else append_str (&str, conf.filenames[i]); if (i != conf.filenames_idx - 1) append_str (&str, "; "); } len = strlen (str); if (max_len > 0 && len > 0 && len > max_len) { str[max_len - 3] = 0; append_str (&str, "..."); } return str; } goaccess-1.9.3/src/sort.h0000644000175000017300000000576314624731651010745 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include #endif #ifndef SORT_H_INCLUDED #define SORT_H_INCLUDED #include "commons.h" #include "parser.h" #define SORT_MAX_OPTS 11 /* See GEnum for mapping */ #define SORT_FIELD_LEN 11 + 1 /* longest metric name */ #define SORT_MODULE_LEN 15 + 1 /* longest module name */ #define SORT_ORDER_LEN 4 + 1 /* length of ASC or DESC */ /* Enumerated sorting metrics */ typedef enum GSortField_ { SORT_BY_HITS, SORT_BY_VISITORS, SORT_BY_DATA, SORT_BY_BW, SORT_BY_AVGTS, SORT_BY_CUMTS, SORT_BY_MAXTS, SORT_BY_PROT, SORT_BY_MTHD, } GSortField; /* Enumerated sorting order */ typedef enum GSortOrder_ { SORT_ASC, SORT_DESC } GSortOrder; /* Sorting of each panel, metric and order */ typedef struct GSort_ { GModule module; GSortField field; GSortOrder sort; } GSort; extern GSort module_sort[TOTAL_MODULES]; extern const int sort_choices[][SORT_MAX_OPTS]; GRawData *sort_raw_num_data (GRawData * raw_data, int ht_size); GRawData *sort_raw_str_data (GRawData * raw_data, int ht_size); const char *get_sort_field_key (GSortField field); const char *get_sort_field_str (GSortField field); const char *get_sort_order_str (GSortOrder order); int can_sort_module (GModule module, int field); int get_sort_field_enum (const char *str); int get_sort_order_enum (const char *str); int strcmp_asc (const void *a, const void *b); int cmp_ui32_asc (const void *a, const void *b); int cmp_ui32_desc (const void *a, const void *b); void parse_initial_sort (void); void set_initial_sort (const char *smod, const char *sfield, const char *ssort); void sort_holder_items (GHolderItem * items, int size, GSort sort); #endif goaccess-1.9.3/src/opesys.c0000644000175000017300000003064214624731651011265 /** * opesys.c -- functions for dealing with operating systems * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include "opesys.h" #include "error.h" #include "settings.h" #include "util.h" #include "xmalloc.h" /* ###NOTE: The size of the list is proportional to the run time, * which makes this pretty slow */ /* {"search string", "belongs to"} */ static const char *const os[][2] = { {"Android", "Android"}, {"Windows NT 10.0", "Windows"}, {"Windows NT 6.3; ARM", "Windows"}, {"Windows NT 6.3", "Windows"}, {"Windows NT 6.2; ARM", "Windows"}, {"Windows NT 6.2", "Windows"}, {"Windows NT 6.1", "Windows"}, {"Windows NT 6.0", "Windows"}, {"Windows NT 5.2", "Windows"}, {"Windows NT 5.1", "Windows"}, {"Windows NT 5.01", "Windows"}, {"Windows NT 5.0", "Windows"}, {"Windows NT 4.0", "Windows"}, {"Windows NT", "Windows"}, {"Win 9x 4.90", "Windows"}, {"Windows 98", "Windows"}, {"Windows 95", "Windows"}, {"Windows CE", "Windows"}, {"Windows Phone 8.1", "Windows"}, {"Windows Phone 8.0", "Windows"}, {"Windows", "Windows"}, {"Googlebot", "Unix-like"}, {"Mastodon", "Unix-like"}, {"bingbot", "Windows"}, {"iPad", "iOS"}, {"iPod", "iOS"}, {"iPhone", "iOS"}, {"CFNetwork", "iOS"}, {"AppleTV", "iOS"}, {"iTunes", "macOS"}, {"OS X", "macOS"}, {"macOS", "macOS"}, {"Darwin", "Darwin"}, {"Debian", "Linux"}, {"Ubuntu", "Linux"}, {"Fedora", "Linux"}, {"Mint", "Linux"}, {"SUSE", "Linux"}, {"Mandriva", "Linux"}, {"Red Hat", "Linux"}, {"Gentoo", "Linux"}, {"CentOS", "Linux"}, {"PCLinuxOS", "Linux"}, {"Arch", "Linux"}, {"Parabola", "Linux"}, {"FreeBSD", "BSD"}, {"NetBSD", "BSD"}, {"OpenBSD", "BSD"}, {"DragonFly", "BSD"}, {"PlayStation", "BSD"}, {"Linux", "Linux"}, {"linux", "Linux"}, {"CrOS", "Chrome OS"}, {"QNX", "Unix-like"}, {"BB10", "Unix-like"}, {"AIX", "Unix"}, {"SunOS", "Unix"}, {"BlackBerry", "Others"}, {"Sony", "Others"}, {"AmigaOS", "Others"}, {"SymbianOS", "Others"}, {"Nokia", "Others"}, {"Nintendo", "Others"}, {"Apache", "Others"}, {"Xbox One", "Windows"}, {"Xbox", "Windows"}, }; /* Get the Android code name (if applicable). * * On error, the given name is allocated and returned. * On success, the matching Android codename is allocated and * returned. */ static char * get_real_android (const char *droid) { if (strstr (droid, "14")) return alloc_string ("Android 14"); else if (strstr (droid, "13")) return alloc_string ("Android 13"); else if (strstr (droid, "12")) return alloc_string ("Android 12"); else if (strstr (droid, "12.1")) return alloc_string ("Android 12.1"); else if (strstr (droid, "11")) return alloc_string ("Android 11"); else if (strstr (droid, "10")) return alloc_string ("Android 10"); else if (strstr (droid, "9")) return alloc_string ("Pie 9"); else if (strstr (droid, "8.1")) return alloc_string ("Oreo 8.1"); else if (strstr (droid, "8.0")) return alloc_string ("Oreo 8.0"); else if (strstr (droid, "7.1")) return alloc_string ("Nougat 7.1"); else if (strstr (droid, "7.0")) return alloc_string ("Nougat 7.0"); else if (strstr (droid, "6.0.1")) return alloc_string ("Marshmallow 6.0.1"); else if (strstr (droid, "6.0")) return alloc_string ("Marshmallow 6.0"); else if (strstr (droid, "5.1")) return alloc_string ("Lollipop 5.1"); else if (strstr (droid, "5.0")) return alloc_string ("Lollipop 5.0"); else if (strstr (droid, "4.4")) return alloc_string ("KitKat 4.4"); else if (strstr (droid, "4.3")) return alloc_string ("Jelly Bean 4.3"); else if (strstr (droid, "4.2")) return alloc_string ("Jelly Bean 4.2"); else if (strstr (droid, "4.1")) return alloc_string ("Jelly Bean 4.1"); else if (strstr (droid, "4.0")) return alloc_string ("Ice Cream Sandwich 4.0"); else if (strstr (droid, "3.")) return alloc_string ("Honeycomb 3"); else if (strstr (droid, "2.3")) return alloc_string ("Gingerbread 2.3"); else if (strstr (droid, "2.2")) return alloc_string ("Froyo 2.2"); else if (strstr (droid, "2.0") || strstr (droid, "2.1")) return alloc_string ("Eclair 2"); else if (strstr (droid, "1.6")) return alloc_string ("Donut 1.6"); else if (strstr (droid, "1.5")) return alloc_string ("Cupcake 1.5"); return alloc_string (droid); } /* Get the Windows marketing name (if applicable). * * On error, the given name is allocated and returned. * On success, the matching Windows marketing name is allocated and * returned. */ static char * get_real_win (const char *win) { if (strstr (win, "10.0")) return alloc_string ("Windows 10"); else if (strstr (win, "6.3")) return alloc_string ("Windows 8.1"); else if (strstr (win, "6.3; ARM")) return alloc_string ("Windows RT"); else if (strstr (win, "6.2; ARM")) return alloc_string ("Windows RT"); else if (strstr (win, "6.2")) return alloc_string ("Windows 8"); else if (strstr (win, "6.1")) return alloc_string ("Windows 7"); else if (strstr (win, "6.0")) return alloc_string ("Windows Vista"); else if (strstr (win, "5.2")) return alloc_string ("Windows XP x64"); else if (strstr (win, "5.1")) return alloc_string ("Windows XP"); else if (strstr (win, "5.0")) return alloc_string ("Windows 2000"); return NULL; } /* Get the Mac OS X code name (if applicable). * * On error, the given name is allocated and returned. * On success, the matching Mac OS X codename is allocated and * returned. */ static char * get_real_mac_osx (const char *osx) { if (strstr (osx, "14.0")) return alloc_string ("macOS 14 Sonoma"); else if (strstr (osx, "13.0")) return alloc_string ("macOS 13 Ventura"); else if (strstr (osx, "12.0")) return alloc_string ("macOS 12 Monterey"); else if (strstr (osx, "11.0")) return alloc_string ("macOS 11 Big Sur"); else if (strstr (osx, "10.15")) return alloc_string ("macOS 10.15 Catalina"); else if (strstr (osx, "10.14")) return alloc_string ("macOS 10.14 Mojave"); else if (strstr (osx, "10.13")) return alloc_string ("macOS 10.13 High Sierra"); else if (strstr (osx, "10.12")) return alloc_string ("macOS 10.12 Sierra"); else if (strstr (osx, "10.11")) return alloc_string ("OS X 10.11 El Capitan"); else if (strstr (osx, "10.10")) return alloc_string ("OS X 10.10 Yosemite"); else if (strstr (osx, "10.9")) return alloc_string ("OS X 10.9 Mavericks"); else if (strstr (osx, "10.8")) return alloc_string ("OS X 10.8 Mountain Lion"); else if (strstr (osx, "10.7")) return alloc_string ("OS X 10.7 Lion"); else if (strstr (osx, "10.6")) return alloc_string ("OS X 10.6 Snow Leopard"); else if (strstr (osx, "10.5")) return alloc_string ("OS X 10.5 Leopard"); else if (strstr (osx, "10.4")) return alloc_string ("OS X 10.4 Tiger"); else if (strstr (osx, "10.3")) return alloc_string ("OS X 10.3 Panther"); else if (strstr (osx, "10.2")) return alloc_string ("OS X 10.2 Jaguar"); else if (strstr (osx, "10.1")) return alloc_string ("OS X 10.1 Puma"); else if (strstr (osx, "10.0")) return alloc_string ("OS X 10.0 Cheetah"); return alloc_string (osx); } /* Parse all other operating systems. * * On error, the given name is returned. * On success, the parsed OS is returned. */ static char * parse_others (char *agent, int spaces) { char *p; int space = 0; p = agent; /* assume the following chars are within the given agent */ while (*p != ';' && *p != ')' && *p != '(' && *p != '\0') { if (*p == ' ') space++; if (space > spaces) break; p++; } *p = 0; return agent; } /* Parse iOS string including version number. * * On error, the matching token is returned (no version). * On success, the parsed iOS is returned. */ static char * parse_ios (char *agent, int tlen) { char *p = NULL, *q = NULL; ptrdiff_t offset; if ((p = strstr (agent, " OS ")) == NULL) goto out; if ((offset = p - agent) <= 0) goto out; if ((q = strstr (p, " like Mac")) == NULL) goto out; *q = 0; memmove (agent + tlen, agent + offset, offset); return char_replace (agent, '_', '.'); out: agent[tlen] = 0; return agent; } /* Parse a Mac OS X string. * * On error, the given name is returned. * On success, the parsed Mac OS X is returned. */ static char * parse_osx (char *agent) { int space = 0; char *p; p = agent; /* assume the following chars are within the given agent */ while (*p != ';' && *p != ')' && *p != '(' && *p != '\0') { if (*p == '_') *p = '.'; if (*p == ' ') space++; if (space > 3) break; p++; } *p = 0; return agent; } /* Parse an Android string. * * On error, the given name is returned. * On success, the parsed Android is returned. */ static char * parse_android (char *agent) { char *p; p = agent; /* assume the following chars are within the given agent */ while (*p != ';' && *p != ')' && *p != '(' && *p != '\0') p++; *p = 0; return agent; } /* Attempt to parse specific OS. * * On success, a malloc'd string containing the OS is returned. */ static char * parse_os (char *str, char *tkn, char *os_type, int idx) { char *b; int spaces = 0; xstrncpy (os_type, os[idx][1], OPESYS_TYPE_LEN); /* Windows */ if ((strstr (str, "Windows")) != NULL) return conf.real_os && (b = get_real_win (tkn)) ? b : xstrdup (os[idx][0]); /* Android */ if ((strstr (tkn, "Android")) != NULL) { tkn = parse_android (tkn); return conf.real_os ? get_real_android (tkn) : xstrdup (tkn); } /* iOS */ if ((strstr (tkn, "CFNetwork")) != NULL) { if ((b = strchr (str, ' '))) *b = 0; return xstrdup (str); } if (strstr (tkn, "iPad") || strstr (tkn, "iPod")) return xstrdup (parse_ios (tkn, 4)); if (strstr (tkn, "iPhone")) return xstrdup (parse_ios (tkn, 6)); /* Mac OS X */ if (strstr (tkn, "OS X") || strstr (tkn, "macOS")) { tkn = parse_osx (tkn); return conf.real_os ? get_real_mac_osx (tkn) : xstrdup (tkn); } /* Darwin - capture the first part of agents such as: * Slack/248000 CFNetwork/808.0.2 Darwin/16.0.0 */ if ((strstr (tkn, "Darwin")) != NULL) { if ((b = strchr (str, ' '))) *b = 0; return xstrdup (str); } /* all others */ spaces = count_matches (os[idx][0], ' '); return alloc_string (parse_others (tkn, spaces)); } /* Given a user agent, determine the operating system used. * * ###NOTE: The size of the list is proportional to the run time, * which makes this pretty slow * * On error, NULL is returned. * On success, a malloc'd string containing the OS is returned. */ char * verify_os (char *str, char *os_type) { char *a; size_t i; if (str == NULL || *str == '\0') return NULL; str = char_replace (str, '+', ' '); for (i = 0; i < ARRAY_SIZE (os); i++) { if ((a = strstr (str, os[i][0])) != NULL) return parse_os (str, a, os_type, i); } if (conf.unknowns_as_crawlers && strcmp (os_type, "Crawlers")) xstrncpy (os_type, "Crawlers", OPESYS_TYPE_LEN); else xstrncpy (os_type, "Unknown", OPESYS_TYPE_LEN); if (conf.unknowns_log) LOG_UNKNOWNS (("%-7s%s\n", "[OS]", str)); return alloc_string ("Unknown"); } goaccess-1.9.3/src/websocket.h0000644000175000017300000002370414624731651011737 /** * _______ _______ __ __ * / ____/ | / / ___/____ _____/ /_____ / /_ * / / __ | | /| / /\__ \/ __ \/ ___/ //_/ _ \/ __/ * / /_/ / | |/ |/ /___/ / /_/ / /__/ ,< / __/ /_ * \____/ |__/|__//____/\____/\___/_/|_|\___/\__/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include #endif #ifndef WEBSOCKET_H_INCLUDED #define WEBSOCKET_H_INCLUDED #include #include #include #include #if HAVE_LIBSSL #include #include #include #endif #if defined(__linux__) || defined(__CYGWIN__) # include #if ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 9)) #if defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN) # include # define htobe16(x) htons(x) # define htobe64(x) (((uint64_t)htonl(((uint32_t)(((uint64_t)(x)) >> 32)))) | \ (((uint64_t)htonl(((uint32_t)(x)))) << 32)) # define be16toh(x) ntohs(x) # define be32toh(x) ntohl(x) # define be64toh(x) (((uint64_t)ntohl(((uint32_t)(((uint64_t)(x)) >> 32)))) | \ (((uint64_t)ntohl(((uint32_t)(x)))) << 32)) #else # error Byte Order not supported! #endif #endif #elif defined(__sun__) # include # define htobe16(x) BE_16(x) # define htobe64(x) BE_64(x) # define be16toh(x) BE_IN16(x) # define be32toh(x) BE_IN32(x) # define be64toh(x) BE_IN64(x) #elif defined(__FreeBSD__) || defined(__NetBSD__) # include #elif defined(__OpenBSD__) # include # if !defined(be16toh) # define be16toh(x) betoh16(x) # endif # if !defined(be32toh) # define be32toh(x) betoh32(x) # endif # if !defined(be64toh) # define be64toh(x) betoh64(x) # endif #elif defined(__APPLE__) # include # define htobe16(x) OSSwapHostToBigInt16(x) # define htobe64(x) OSSwapHostToBigInt64(x) # define be16toh(x) OSSwapBigToHostInt16(x) # define be32toh(x) OSSwapBigToHostInt32(x) # define be64toh(x) OSSwapBigToHostInt64(x) #else # error Platform not supported! #endif #define MAX(a,b) (((a)>(b))?(a):(b)) #include "gslist.h" #define WS_BAD_REQUEST_STR "HTTP/1.1 400 Invalid Request\r\n\r\n" #define WS_SWITCH_PROTO_STR "HTTP/1.1 101 Switching Protocols" #define WS_TOO_BUSY_STR "HTTP/1.1 503 Service Unavailable\r\n\r\n" #define CRLF "\r\n" #define SHA_DIGEST_LENGTH 20 /* packet header is 3 unit32_t : type, size, listener */ #define HDR_SIZE 3 * 4 #define WS_MAX_FRM_SZ 1048576 /* 1 MiB max frame size */ #define WS_THROTTLE_THLD 2097152 /* 2 MiB throttle threshold */ #define WS_MAX_HEAD_SZ 8192 /* a reasonable size for request headers */ #define WS_MAGIC_STR "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" #define WS_PAYLOAD_EXT16 126 #define WS_PAYLOAD_EXT64 127 #define WS_PAYLOAD_FULL 125 #define WS_FRM_HEAD_SZ 16 /* frame header size */ #define WS_FRM_FIN(x) (((x) >> 7) & 0x01) #define WS_FRM_MASK(x) (((x) >> 7) & 0x01) #define WS_FRM_R1(x) (((x) >> 6) & 0x01) #define WS_FRM_R2(x) (((x) >> 5) & 0x01) #define WS_FRM_R3(x) (((x) >> 4) & 0x01) #define WS_FRM_OPCODE(x) ((x) & 0x0F) #define WS_FRM_PAYLOAD(x) ((x) & 0x7F) #define WS_CLOSE_NORMAL 1000 #define WS_CLOSE_GOING_AWAY 1001 #define WS_CLOSE_PROTO_ERR 1002 #define WS_CLOSE_INVALID_UTF8 1007 #define WS_CLOSE_TOO_LARGE 1009 #define WS_CLOSE_UNEXPECTED 1011 typedef enum WSSTATUS { WS_OK = 0, WS_ERR = (1 << 0), WS_CLOSE = (1 << 1), WS_READING = (1 << 2), WS_SENDING = (1 << 3), WS_THROTTLING = (1 << 4), WS_TLS_ACCEPTING = (1 << 5), WS_TLS_READING = (1 << 6), WS_TLS_WRITING = (1 << 7), WS_TLS_SHUTTING = (1 << 8), } WSStatus; typedef enum WSOPCODE { WS_OPCODE_CONTINUATION = 0x00, WS_OPCODE_TEXT = 0x01, WS_OPCODE_BIN = 0x02, WS_OPCODE_END = 0x03, WS_OPCODE_CLOSE = 0x08, WS_OPCODE_PING = 0x09, WS_OPCODE_PONG = 0x0A, } WSOpcode; typedef struct WSQueue_ { char *queued; /* queue data */ int qlen; /* queue length */ } WSQueue; typedef struct WSPacket_ { uint32_t type; /* packet type (fixed-size) */ uint32_t size; /* payload size in bytes (fixed-size) */ char *data; /* payload */ int len; /* payload buffer len */ } WSPacket; /* WS HTTP Headers */ typedef struct WSHeaders_ { int reading; int buflen; char buf[WS_MAX_HEAD_SZ + 1]; char *agent; char *path; char *method; char *protocol; char *host; char *origin; char *upgrade; char *referer; char *connection; char *ws_protocol; char *ws_key; char *ws_sock_ver; char *ws_accept; char *ws_resp; } WSHeaders; /* A WebSocket Message */ typedef struct WSFrame_ { /* frame format */ WSOpcode opcode; /* frame opcode */ unsigned char fin; /* frame fin flag */ unsigned char mask[4]; /* mask key */ uint8_t res; /* extensions */ int payload_offset; /* end of header/start of payload */ int payloadlen; /* payload length (for each frame) */ /* status flags */ int reading; /* still reading frame's header part? */ int masking; /* are we masking the frame? */ char buf[WS_FRM_HEAD_SZ + 1]; /* frame's header */ int buflen; /* recv'd buf length so far (for each frame) */ } WSFrame; /* A WebSocket Message */ typedef struct WSMessage_ { WSOpcode opcode; /* frame opcode */ int fragmented; /* reading a fragmented frame */ int mask_offset; /* for fragmented frames */ char *payload; /* payload message */ int payloadsz; /* total payload size (whole message) */ int buflen; /* recv'd buf length so far (for each frame) */ } WSMessage; /* A WebSocket Client */ typedef struct WSClient_ { /* socket data */ int listener; /* socket */ char remote_ip[INET6_ADDRSTRLEN]; /* client IP */ WSQueue *sockqueue; /* sending buffer */ WSHeaders *headers; /* HTTP headers */ WSFrame *frame; /* frame headers */ WSMessage *message; /* message */ WSStatus status; /* connection status */ struct timeval start_proc; struct timeval end_proc; #ifdef HAVE_LIBSSL SSL *ssl; WSStatus sslstatus; /* ssl connection status */ #endif } WSClient; /* Config OOptions */ typedef struct WSPipeIn_ { int fd; /* named pipe FD */ WSPacket *packet; /* FIFO data's buffer */ char hdr[HDR_SIZE]; /* FIFO header's buffer */ int hlen; } WSPipeIn; /* Pipe Out */ typedef struct WSPipeOut_ { int fd; /* named pipe FD */ WSQueue *fifoqueue; /* FIFO out queue */ WSStatus status; /* connection status */ } WSPipeOut; /* Config OOptions */ typedef struct WSConfig_ { /* Config Options */ const char *accesslog; const char *host; const char *origin; const char *pipein; const char *pipeout; const char *port; const char *sslcert; const char *sslkey; const char *unix_socket; int echomode; int strict; int max_frm_size; int use_ssl; } WSConfig; /* A WebSocket Instance */ typedef struct WSServer_ { /* Server Status */ int closing; /* Callbacks */ int (*onclose) (WSPipeOut * pipeout, WSClient * client); int (*onmessage) (WSPipeOut * pipeout, WSClient * client); int (*onopen) (WSPipeOut * pipeout, WSClient * client); /* self-pipe */ int self_pipe[2]; /* FIFO reader */ WSPipeIn *pipein; /* FIFO writer */ WSPipeOut *pipeout; /* Connected Clients */ GSLList *colist; #ifdef HAVE_LIBSSL SSL_CTX *ctx; #endif } WSServer; int ws_read_fifo (int fd, char *buf, int *buflen, int pos, int need); int ws_send_data (WSClient * client, WSOpcode opcode, const char *p, int sz); int ws_setfifo (const char *pipename); int ws_validate_string (const char *str, int len); int ws_write_fifo (WSPipeOut * pipeout, char *buffer, int len); size_t pack_uint32 (void *buf, uint32_t val); size_t unpack_uint32 (const void *buf, uint32_t * val); void set_nonblocking (int listener); void ws_set_config_accesslog (const char *accesslog); void ws_set_config_echomode (int echomode); void ws_set_config_frame_size (int max_frm_size); void ws_set_config_host (const char *host); void ws_set_config_unix_socket (const char *unix_socket); void ws_set_config_origin (const char *origin); void ws_set_config_pipein (const char *pipein); void ws_set_config_pipeout (const char *pipeout); void ws_set_config_port (const char *port); void ws_set_config_sslcert (const char *sslcert); void ws_set_config_sslkey (const char *sslkey); void ws_set_config_strict (int strict); void ws_start (WSServer * server); void ws_stop (WSServer * server); WSServer *ws_init (const char *host, const char *port, void (*initopts) (void)); #endif // for #ifndef WEBSOCKET_H goaccess-1.9.3/src/gkmhash.c0000644000175000017300000011672214624731651011371 /** * gkhash.c -- default hash table functions * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include "gkmhash.h" #include "error.h" #include "gkhash.h" #include "persistence.h" #include "sort.h" #include "util.h" #include "xmalloc.h" /* *INDENT-OFF* */ /* Per module - These metrics are not dated */ const GKHashMetric global_metrics[] = { { .metric.storem=MTRC_UNIQUE_KEYS , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , 1 , NULL , "SI32_UNIQUE_KEYS.db" } , { .metric.storem=MTRC_AGENT_KEYS , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , 0 , NULL , "II32_AGENT_KEYS.db" } , { .metric.storem=MTRC_AGENT_VALS , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , 1 , NULL , "IS32_AGENT_VALS.db" } , { .metric.storem=MTRC_CNT_VALID , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , 1 , NULL , "II32_CNT_VALID.db" } , { .metric.storem=MTRC_CNT_BW , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , 1 , NULL , "IU64_CNT_BW.db" } , }; /* Per module & per date */ const GKHashMetric module_metrics[] = { { .metric.storem=MTRC_KEYMAP , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , 1 , NULL , NULL } , { .metric.storem=MTRC_ROOTMAP , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , 1 , NULL , NULL } , { .metric.storem=MTRC_DATAMAP , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , 1 , NULL , NULL } , { .metric.storem=MTRC_UNIQMAP , MTRC_TYPE_U648 , new_u648_ht , des_u648 , del_u648 , 1 , NULL , NULL } , { .metric.storem=MTRC_ROOT , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , 1 , NULL , NULL } , { .metric.storem=MTRC_HITS , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , 1 , NULL , NULL } , { .metric.storem=MTRC_VISITORS , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , 1 , NULL , NULL } , { .metric.storem=MTRC_BW , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , 1 , NULL , NULL } , { .metric.storem=MTRC_CUMTS , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , 1 , NULL , NULL } , { .metric.storem=MTRC_MAXTS , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , 1 , NULL , NULL } , { .metric.storem=MTRC_METHODS , MTRC_TYPE_II08 , new_ii08_ht , des_ii08 , del_ii08 , 0 , NULL , NULL } , { .metric.storem=MTRC_PROTOCOLS , MTRC_TYPE_II08 , new_ii08_ht , des_ii08 , del_ii08 , 0 , NULL , NULL } , { .metric.storem=MTRC_AGENTS , MTRC_TYPE_IGSL , new_igsl_ht , des_igsl_free , del_igsl_free , 1 , NULL , NULL } , { .metric.storem=MTRC_METADATA , MTRC_TYPE_SU64 , new_su64_ht , des_su64_free , del_su64_free , 1 , NULL , NULL } , }; const size_t module_metrics_len = ARRAY_SIZE (module_metrics); const size_t global_metrics_len = ARRAY_SIZE (global_metrics); /* *INDENT-ON* */ /* Allocate memory for a new store container GKHashStorage instance. * * On success, the newly allocated GKHashStorage is returned . */ static GKHashStorage * new_gkhstorage (void) { GKHashStorage *storage = xcalloc (1, sizeof (GKHashStorage)); return storage; } /* Allocate memory for a new module GKHashModule instance. * * On success, the newly allocated GKHashStorage is returned . */ static GKHashModule * new_gkhmodule (uint32_t size) { GKHashModule *storage = xcalloc (size, sizeof (GKHashModule)); return storage; } /* Allocate memory for a new global GKHashGlobal instance. * * On success, the newly allocated GKHashGlobal is returned . */ static GKHashGlobal * new_gkhglobal (void) { GKHashGlobal *storage = xcalloc (1, sizeof (GKHashGlobal)); return storage; } /* Initialize a global hash structure. * * On success, a pointer to that hash structure is returned. */ static GKHashGlobal * init_gkhashglobal (void) { GKHashGlobal *storage = NULL; int n = 0, i; storage = new_gkhglobal (); n = global_metrics_len; for (i = 0; i < n; i++) { storage->metrics[i] = global_metrics[i]; storage->metrics[i].hash = global_metrics[i].alloc (); } return storage; } /* Initialize module metrics and mallocs its hash structure */ static void init_tables (GModule module, GKHashModule *storage) { int n = 0, i; n = module_metrics_len; for (i = 0; i < n; i++) { storage[module].metrics[i] = module_metrics[i]; storage[module].metrics[i].hash = module_metrics[i].alloc (); } } /* Initialize a module hash structure. * * On success, a pointer to that hash structure is returned. */ static GKHashModule * init_gkhashmodule (void) { GKHashModule *storage = NULL; GModule module; size_t idx = 0; storage = new_gkhmodule (TOTAL_MODULES); FOREACH_MODULE (idx, module_list) { module = module_list[idx]; storage[module].module = module; init_tables (module, storage); } return storage; } /* Destroys malloc'd global metrics */ static void free_global_metrics (GKHashGlobal *ghash) { int i, n = 0; GKHashMetric mtrc; if (!ghash) return; n = global_metrics_len; for (i = 0; i < n; i++) { mtrc = ghash->metrics[i]; mtrc.des (mtrc.hash, mtrc.free_data); } } /* Destroys malloc'd module metrics */ static void free_module_metrics (GKHashModule *mhash, GModule module, uint8_t free_data) { int i, n = 0; GKHashMetric mtrc; if (!mhash) return; n = module_metrics_len; for (i = 0; i < n; i++) { mtrc = mhash[module].metrics[i]; mtrc.des (mtrc.hash, free_data ? mtrc.free_data : 0); } } /* For each module metric, deletes all entries from the hash table */ static void del_module_metrics (GKHashModule *mhash, GModule module, uint8_t free_data) { int i, n = 0; GKHashMetric mtrc; n = module_metrics_len; for (i = 0; i < n; i++) { mtrc = mhash[module].metrics[i]; mtrc.del (mtrc.hash, free_data); } } /* Destroys all hash tables and possibly all the malloc'd data within */ static void free_stores (GKHashStorage *store) { GModule module; size_t idx = 0; free_global_metrics (store->ghash); FOREACH_MODULE (idx, module_list) { module = module_list[idx]; free_module_metrics (store->mhash, module, 1); } free (store->ghash); free (store->mhash); free (store); } /* Insert an uint32_t key (date) and a GKHashStorage payload * * On error, -1 is returned. * On key found, 1 is returned. * On success 0 is returned */ static int ins_igkh (khash_t (igkh) *hash, uint32_t key) { GKHashStorage *store = NULL; khint_t k; int ret; if (!hash) return -1; k = kh_put (igkh, hash, key, &ret); /* operation failed */ if (ret == -1) return -1; /* the key is present in the hash table */ if (ret == 0) return 1; store = new_gkhstorage (); store->mhash = init_gkhashmodule (); store->ghash = init_gkhashglobal (); kh_val (hash, k) = store; return 0; } /* Given a hash and a key (date), get the relevant store * * On error or not found, NULL is returned. * On success, a pointer to that store is returned. */ static void * get_store (khash_t (igkh) *hash, uint32_t key) { GKHashStorage *store = NULL; khint_t k; k = kh_get (igkh, hash, key); /* key not found, return NULL */ if (k == kh_end (hash)) return NULL; store = kh_val (hash, k); return store; } /* Given a store, a module and the metric, get the hash table * * On error or not found, NULL is returned. * On success, a pointer to that hash table is returned. */ static void * get_hash_from_store (GKHashStorage *store, int module, GSMetric metric) { int mtrc = 0, cnt = 0; if (!store) return NULL; if (module == -1) { mtrc = metric - MTRC_METADATA - 1; cnt = MTRC_CNT_BW - MTRC_UNIQUE_KEYS + 1; if (mtrc >= cnt) { LOG_DEBUG (("Out of bounds when attempting to get hash %d\n", metric)); return NULL; } } /* ###NOTE: BE CAREFUL here, to avoid the almost unnecessary loop, we simply * use the index from the enum to make it O(1). The metrics array has to be * created in the same order as the GSMetric enum */ if (module < 0) return store->ghash->metrics[mtrc].hash; return store->mhash[module].metrics[metric].hash; } /* Given a module a key (date) and the metric, get the hash table * * On error or not found, NULL is returned. * On success, a pointer to that hash table is returned. */ void * get_hash (int module, uint64_t key, GSMetric metric) { GKHashStorage *store = NULL; GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * hash = get_hdb (db, MTRC_DATES); if ((store = get_store (hash, key)) == NULL) return NULL; return get_hash_from_store (store, module, metric); } /* Given a module and a metric, get the cache hash table * * On success, a pointer to that hash table is returned. */ static void * get_hash_from_cache (GModule module, GSMetric metric) { GKDB *db = get_db_instance (DB_INSTANCE); return db->cache[module].metrics[metric].hash; } GSLList * ht_get_keymap_list_from_key (GModule module, uint32_t key) { GKDB *db = get_db_instance (DB_INSTANCE); GSLList *list = NULL; khiter_t kv; khint_t k; khash_t (ii32) * hash = NULL; khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); if (!dates) return NULL; for (k = kh_begin (dates); k != kh_end (dates); ++k) { if (!kh_exist (dates, k)) continue; if (!(hash = get_hash (module, kh_key (dates, k), MTRC_KEYMAP))) continue; if ((kv = kh_get (ii32, hash, key)) == kh_end (hash)) continue; list = list_insert_prepend (list, i322ptr (kh_val (hash, kv))); } return list; } /* Insert a unique visitor key string (IP/DATE/UA), mapped to an auto * incremented value. * * If the given key exists, its value is returned. * On error, 0 is returned. * On success the value of the key inserted is returned */ uint32_t ht_insert_unique_key (uint32_t date, const char *key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * seqs = get_hdb (db, MTRC_SEQS); khash_t (si32) * hash = get_hash (-1, date, MTRC_UNIQUE_KEYS); uint32_t val = 0; char *dupkey = NULL; if (!hash) return 0; if ((val = get_si32 (hash, key)) != 0) return val; dupkey = xstrdup (key); if ((val = ins_si32_inc (hash, dupkey, ht_ins_seq, seqs, "ht_unique_keys")) == 0) free (dupkey); return val; } /* Insert a user agent key string, mapped to an auto incremented value. * * If the given key exists, its value is returned. * On error, 0 is returned. * On success the value of the key inserted is returned */ uint32_t ht_insert_agent_key (uint32_t date, uint32_t key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * seqs = get_hdb (db, MTRC_SEQS); khash_t (ii32) * hash = get_hash (-1, date, MTRC_AGENT_KEYS); uint32_t val = 0; if (!hash) return 0; if ((val = get_ii32 (hash, key)) != 0) return val; return ins_ii32_inc (hash, key, ht_ins_seq, seqs, "ht_agent_keys"); } /* Insert a user agent uint32_t key, mapped to a user agent string value. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_agent_value (uint32_t date, uint32_t key, char *value) { khash_t (is32) * hash = get_hash (-1, date, MTRC_AGENT_VALS); char *dupval = NULL; if (!hash) return -1; if ((kh_get (is32, hash, key)) != kh_end (hash)) return 0; dupval = xstrdup (value); if (ins_is32 (hash, key, dupval) != 0) free (dupval); return 0; } /* Insert a keymap string key. * * If the given key exists, its value is returned. * On error, 0 is returned. * On success the value of the key inserted is returned */ uint32_t ht_insert_keymap (GModule module, uint32_t date, uint32_t key, uint32_t *ckey) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si32) * seqs = get_hdb (db, MTRC_SEQS); khash_t (ii32) * hash = get_hash (module, date, MTRC_KEYMAP); khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_KEYMAP); uint32_t val = 0; const char *modstr; if (!hash) return 0; if ((val = get_ii32 (hash, key)) != 0) { *ckey = get_ii32 (cache, key); return val; } modstr = get_module_str (module); if ((val = ins_ii32_inc (hash, key, ht_ins_seq, seqs, modstr)) == 0) { return val; } *ckey = ins_ii32_ai (cache, key); return val; } /* Insert a rootmap uint32_t key from the keymap store mapped to its string * value. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_rootmap (GModule module, uint32_t date, uint32_t key, const char *value, uint32_t ckey) { khash_t (is32) * hash = get_hash (module, date, MTRC_ROOTMAP); khash_t (is32) * cache = get_hash_from_cache (module, MTRC_ROOTMAP); char *dupval = NULL; int ret = 0; if (!hash) return -1; dupval = xstrdup (value); if ((ret = ins_is32 (hash, key, dupval)) == 0) ins_is32 (cache, ckey, dupval); else free (dupval); return ret; } /* Insert a datamap uint32_t key and string value. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_datamap (GModule module, uint32_t date, uint32_t key, const char *value, uint32_t ckey) { khash_t (is32) * hash = get_hash (module, date, MTRC_DATAMAP); khash_t (is32) * cache = get_hash_from_cache (module, MTRC_DATAMAP); char *dupval = NULL; int ret = 0; if (!hash) return -1; dupval = xstrdup (value); if ((ret = ins_is32 (hash, key, dupval)) == 0) ins_is32 (cache, ckey, dupval); else free (dupval); return ret; } /* Insert a uniqmap string key. * * If the given key exists, 0 is returned. * On error, 0 is returned. * On success the value of the key inserted is returned */ int ht_insert_uniqmap (GModule module, uint32_t date, uint32_t key, uint32_t value) { khash_t (u648) * hash = get_hash (module, date, MTRC_UNIQMAP); uint64_t k = 0; if (!hash) return 0; k = u64encode (key, value); return ins_u648 (hash, k, 1) == 0 ? 1 : 0; } /* Insert a data uint32_t key mapped to the corresponding uint32_t root key. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_root (GModule module, uint32_t date, uint32_t key, uint32_t value, uint32_t dkey, uint32_t rkey) { khash_t (ii32) * hash = get_hash (module, date, MTRC_ROOT); khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_ROOT); if (!hash) return -1; ins_ii32 (cache, dkey, rkey); return ins_ii32 (hash, key, value); } /* Increases hits counter from a uint32_t key. * * On error, 0 is returned. * On success the inserted value is returned */ uint32_t ht_insert_hits (GModule module, uint32_t date, uint32_t key, uint32_t inc, uint32_t ckey) { khash_t (ii32) * hash = get_hash (module, date, MTRC_HITS); khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_HITS); if (!hash) return 0; inc_ii32 (cache, ckey, inc); return inc_ii32 (hash, key, inc); } /* Increases visitors counter from a uint32_t key. * * On error, 0 is returned. * On success the inserted value is returned */ uint32_t ht_insert_visitor (GModule module, uint32_t date, uint32_t key, uint32_t inc, uint32_t ckey) { khash_t (ii32) * hash = get_hash (module, date, MTRC_VISITORS); khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_VISITORS); if (!hash) return 0; inc_ii32 (cache, ckey, inc); return inc_ii32 (hash, key, inc); } /* Increases bandwidth counter from a uint32_t key. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_bw (GModule module, uint32_t date, uint32_t key, uint64_t inc, uint32_t ckey) { khash_t (iu64) * hash = get_hash (module, date, MTRC_BW); khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_BW); if (!hash) return -1; inc_iu64 (cache, ckey, inc); return inc_iu64 (hash, key, inc); } /* Increases cumulative time served counter from a uint32_t key. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_cumts (GModule module, uint32_t date, uint32_t key, uint64_t inc, uint32_t ckey) { khash_t (iu64) * hash = get_hash (module, date, MTRC_CUMTS); khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_CUMTS); if (!hash) return -1; inc_iu64 (cache, ckey, inc); return inc_iu64 (hash, key, inc); } /* Insert the maximum time served counter from a uint32_t key. * Note: it compares the current value with the given value. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_maxts (GModule module, uint32_t date, uint32_t key, uint64_t value, uint32_t ckey) { khash_t (iu64) * hash = get_hash (module, date, MTRC_MAXTS); khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_MAXTS); if (!hash) return -1; if (get_iu64 (cache, ckey) < value) ins_iu64 (cache, ckey, value); if (get_iu64 (hash, key) < value) ins_iu64 (hash, key, value); return 0; } /* Insert a method given an uint32_t key and string value. * * On error, or if key exists, -1 is returned. * On success 0 is returned */ int ht_insert_method (GModule module, uint32_t date, uint32_t key, const char *value, uint32_t ckey) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (ii08) * hash = get_hash (module, date, MTRC_METHODS); khash_t (ii08) * cache = get_hash_from_cache (module, MTRC_METHODS); khash_t (si08) * mtpr = get_hdb (db, MTRC_METH_PROTO); int ret = 0; uint8_t val = 0; if (!hash) return -1; if (!(val = get_si08 (mtpr, value))) return -1; if ((ret = ins_ii08 (hash, key, val)) == 0) ins_ii08 (cache, ckey, val); return ret; } /* Insert a protocol given an uint32_t key and string value. * * On error, or if key exists, -1 is returned. * On success 0 is returned */ int ht_insert_protocol (GModule module, uint32_t date, uint32_t key, const char *value, uint32_t ckey) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (ii08) * hash = get_hash (module, date, MTRC_PROTOCOLS); khash_t (ii08) * cache = get_hash_from_cache (module, MTRC_PROTOCOLS); khash_t (si08) * mtpr = get_hdb (db, MTRC_METH_PROTO); int ret = 0; uint8_t val = 0; if (!hash) return -1; if (!(val = get_si08 (mtpr, value))) return -1; if ((ret = ins_ii08 (hash, key, val)) == 0) ins_ii08 (cache, ckey, val); return ret; } /* Insert an agent for a hostname given an uint32_t key and uint32_t value. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_agent (GModule module, uint32_t date, uint32_t key, uint32_t value) { khash_t (igsl) * hash = get_hash (module, date, MTRC_AGENTS); if (!hash) return -1; return ins_igsl (hash, key, value); } /* Insert meta data counters from a string key. * * On error, -1 is returned. * On success 0 is returned */ int ht_insert_meta_data (GModule module, uint32_t date, const char *key, uint64_t value) { khash_t (su64) * hash = get_hash (module, date, MTRC_METADATA); if (!hash) return -1; return inc_su64 (hash, key, value); } int ht_insert_date (uint32_t key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * hash = get_hdb (db, MTRC_DATES); if (!hash) return -1; return ins_igkh (hash, key); } uint32_t ht_inc_cnt_valid (uint32_t date, uint32_t inc) { khash_t (ii32) * hash = get_hash (-1, date, MTRC_CNT_VALID); if (!hash) return 0; return inc_ii32 (hash, 1, inc); } int ht_inc_cnt_bw (uint32_t date, uint64_t inc) { khash_t (iu64) * hash = get_hash (-1, date, MTRC_CNT_BW); if (!hash) return 0; return inc_iu64 (hash, 1, inc); } uint32_t ht_sum_valid (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (ii32) * hash = NULL; uint32_t k = 0; uint32_t sum = 0; if (!dates) return 0; /* *INDENT-OFF* */ HT_SUM_VAL (dates, k, { if ((hash = get_hash (-1, k, MTRC_CNT_VALID))) sum += get_ii32 (hash, 1); }); /* *INDENT-ON* */ return sum; } uint64_t ht_sum_bw (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (iu64) * hash = NULL; uint32_t k = 0; uint64_t sum = 0; if (!dates) return 0; /* *INDENT-OFF* */ HT_SUM_VAL (dates, k, { if ((hash = get_hash (-1, k, MTRC_CNT_BW))) sum += get_iu64 (hash, 1); }); /* *INDENT-ON* */ return sum; } /* Get the number of elements in a dates hash. * * Return 0 if the operation fails, else number of elements. */ uint32_t ht_get_size_dates (void) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * hash = get_hdb (db, MTRC_DATES); if (!hash) return 0; return kh_size (hash); } /* Get the number of elements in a datamap. * * Return -1 if the operation fails, else number of elements. */ uint32_t ht_get_size_datamap (GModule module) { khash_t (is32) * cache = get_hash_from_cache (module, MTRC_DATAMAP); if (!cache) return 0; return kh_size (cache); } /* Get the number of elements in a uniqmap. * * On error, 0 is returned. * On success the number of elements in MTRC_UNIQMAP is returned */ uint32_t ht_get_size_uniqmap (GModule module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (u648) * hash = NULL; uint32_t k = 0; uint32_t sum = 0; if (!dates) return 0; /* *INDENT-OFF* */ HT_SUM_VAL (dates, k, { if ((hash = get_hash (module, k, MTRC_UNIQMAP))) sum += kh_size (hash); }); /* *INDENT-ON* */ return sum; } /* Get the string data value of a given uint32_t key. * * On error, NULL is returned. * On success the string value for the given key is returned */ char * ht_get_datamap (GModule module, uint32_t key) { khash_t (is32) * cache = get_hash_from_cache (module, MTRC_DATAMAP); if (!cache) return NULL; return get_is32 (cache, key); } /* Get the string root from MTRC_ROOTMAP given an uint32_t data key. * * On error, NULL is returned. * On success the string value for the given key is returned */ char * ht_get_root (GModule module, uint32_t key) { int root_key = 0; khash_t (ii32) * hashroot = get_hash_from_cache (module, MTRC_ROOT); khash_t (is32) * hashrootmap = get_hash_from_cache (module, MTRC_ROOTMAP); if (!hashroot || !hashrootmap) return NULL; /* not found */ if ((root_key = get_ii32 (hashroot, key)) == 0) return NULL; return get_is32 (hashrootmap, root_key); } /* Get the int visitors value from MTRC_VISITORS given an int key. * * If key is not found, 0 is returned. * On error, -1 is returned. * On success the int value for the given key is returned */ uint32_t ht_get_hits (GModule module, int key) { khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_HITS); if (!cache) return 0; return get_ii32 (cache, key); } /* Get the uint32_t visitors value from MTRC_VISITORS given an uint32_t key. * * If key is not found, 0 is returned. * On error, -1 is returned. * On success the uint32_t value for the given key is returned */ uint32_t ht_get_visitors (GModule module, uint32_t key) { khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_VISITORS); if (!cache) return 0; return get_ii32 (cache, key); } /* Get the uint64_t value from MTRC_BW given an uint32_t key. * * On error, or if key is not found, 0 is returned. * On success the uint64_t value for the given key is returned */ uint64_t ht_get_bw (GModule module, uint32_t key) { khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_BW); if (!cache) return 0; return get_iu64 (cache, key); } /* Get the uint64_t value from MTRC_CUMTS given an uint32_t key. * * On error, or if key is not found, 0 is returned. * On success the uint64_t value for the given key is returned */ uint64_t ht_get_cumts (GModule module, uint32_t key) { khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_CUMTS); if (!cache) return 0; return get_iu64 (cache, key); } /* Get the uint64_t value from MTRC_MAXTS given an uint32_t key. * * On error, or if key is not found, 0 is returned. * On success the uint64_t value for the given key is returned */ uint64_t ht_get_maxts (GModule module, uint32_t key) { khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_MAXTS); if (!cache) return 0; return get_iu64 (cache, key); } uint8_t get_method_proto (const char *value) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (si08) * mtpr = get_hdb (db, MTRC_METH_PROTO); uint8_t val = 0; if (!mtpr) return 0; if ((val = get_si08 (mtpr, value)) != 0) return val; return 0; } /* Get the string value from MTRC_METHODS given an uint32_t key. * * On error, NULL is returned. * On success the string value for the given key is returned */ char * ht_get_method (GModule module, uint32_t key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (ii08) * cache = get_hash_from_cache (module, MTRC_METHODS); khash_t (si08) * mtpr = get_hdb (db, MTRC_METH_PROTO); uint8_t val = 0; khint_t k; if (!(val = get_ii08 (cache, key))) return NULL; for (k = kh_begin (mtpr); k != kh_end (mtpr); ++k) { if (kh_exist (mtpr, k) && kh_val (mtpr, k) == val) return xstrdup (kh_key (mtpr, k)); } return NULL; } /* Get the string value from MTRC_PROTOCOLS given an uint32_t key. * * On error, NULL is returned. * On success the string value for the given key is returned */ char * ht_get_protocol (GModule module, uint32_t key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (ii08) * cache = get_hash_from_cache (module, MTRC_PROTOCOLS); khash_t (si08) * mtpr = get_hdb (db, MTRC_METH_PROTO); uint8_t val = 0; khint_t k; if (!(val = get_ii08 (cache, key))) return NULL; for (k = kh_begin (mtpr); k != kh_end (mtpr); ++k) { if (kh_exist (mtpr, k) && kh_val (mtpr, k) == val) return xstrdup (kh_key (mtpr, k)); } return NULL; } /* Get the string value from ht_agent_vals (user agent) given an uint32_t key. * * On error, NULL is returned. * On success the string value for the given key is returned */ char * ht_get_host_agent_val (uint32_t key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (is32) * hash = NULL; char *data = NULL; uint32_t k = 0; if (!dates) return NULL; /* *INDENT-OFF* */ HT_FIRST_VAL (dates, k, { if ((hash = get_hash (-1, k, MTRC_AGENT_VALS))) if ((data = get_is32 (hash, key))) return data; }); /* *INDENT-ON* */ return NULL; } /* Get the list value from MTRC_AGENTS given an uint32_t key. * * On error, or if key is not found, NULL is returned. * On success the GSLList value for the given key is returned */ GSLList * ht_get_host_agent_list (GModule module, uint32_t key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); GSLList *res = NULL, *list = NULL; khiter_t kv; khint_t k; khash_t (igsl) * hash = NULL; void *data = NULL; if (!dates) return NULL; for (k = kh_begin (dates); k != kh_end (dates); ++k) { if (!kh_exist (dates, k)) continue; if (!(hash = get_hash (module, kh_key (dates, k), MTRC_AGENTS))) continue; if ((kv = kh_get (igsl, hash, key)) == kh_end (hash)) continue; list = kh_val (hash, kv); /* *INDENT-OFF* */ GSLIST_FOREACH (list, data, { res = list_insert_prepend (res, i322ptr ((*(uint32_t *) data))); }); /* *INDENT-ON* */ } return res; } uint32_t ht_get_keymap (GModule module, const char *key) { khash_t (si32) * cache = get_hash_from_cache (module, MTRC_KEYMAP); if (!cache) return 0; return get_si32 (cache, key); } /* Get the meta data uint64_t from MTRC_METADATA given a string key. * * On error, or if key is not found, 0 is returned. * On success the uint64_t value for the given key is returned */ uint64_t ht_get_meta_data (GModule module, const char *key) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * dates = get_hdb (db, MTRC_DATES); khash_t (su64) * hash = NULL; uint32_t k = 0; uint64_t sum = 0; /* *INDENT-OFF* */ HT_SUM_VAL (dates, k, { if ((hash = get_hash (module, k, MTRC_METADATA))) sum += get_su64 (hash, key); }); /* *INDENT-ON* */ return sum; } /* Set the maximum and minimum values found on an integer key and * integer value found on the MTRC_VISITORS hash structure. * * If the hash structure is empty, no values are set. * On success the minimum and maximum values are set. */ void ht_get_hits_min_max (GModule module, uint32_t *min, uint32_t *max) { khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_HITS); if (!cache) return; get_ii32_min_max (cache, min, max); } /* Set the maximum and minimum values found on an integer key and * integer value found on the MTRC_VISITORS hash structure. * * If the hash structure is empty, no values are set. * On success the minimum and maximum values are set. */ void ht_get_visitors_min_max (GModule module, uint32_t *min, uint32_t *max) { khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_VISITORS); if (!cache) return; get_ii32_min_max (cache, min, max); } /* Set the maximum and minimum values found on an integer key and * a uint64_t value found on the MTRC_BW hash structure. * * If the hash structure is empty, no values are set. * On success the minimum and maximum values are set. */ void ht_get_bw_min_max (GModule module, uint64_t *min, uint64_t *max) { khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_BW); if (!cache) return; get_iu64_min_max (cache, min, max); } /* Set the maximum and minimum values found on an integer key and * a uint64_t value found on the MTRC_CUMTS hash structure. * * If the hash structure is empty, no values are set. * On success the minimum and maximum values are set. */ void ht_get_cumts_min_max (GModule module, uint64_t *min, uint64_t *max) { khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_CUMTS); if (!cache) return; get_iu64_min_max (cache, min, max); } /* Set the maximum and minimum values found on an integer key and * a uint64_t value found on the MTRC_MAXTS hash structure. * * If the hash structure is empty, no values are set. * On success the minimum and maximum values are set. */ void ht_get_maxts_min_max (GModule module, uint64_t *min, uint64_t *max) { khash_t (iu64) * cache = get_hash_from_cache (module, MTRC_MAXTS); if (!cache) return; get_iu64_min_max (cache, min, max); } static void destroy_date_stores (int date) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * hash = get_hdb (db, MTRC_DATES); khiter_t k; k = kh_get (igkh, hash, date); free_stores (kh_value (hash, k)); kh_del (igkh, hash, k); } int invalidate_date (int date) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * hash = get_hdb (db, MTRC_DATES); GModule module; size_t idx = 0; if (!hash) return -1; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; del_module_metrics (db->cache, module, 0); } destroy_date_stores (date); return 0; } static uint32_t ins_cache_map (GModule module, GSMetric metric, uint32_t key) { khash_t (ii32) * cache = get_hash_from_cache (module, metric); if (!cache) return 0; return ins_ii32_ai (cache, key); } static int ins_cache_ii08 (GKHashStorage *store, GModule module, GSMetric metric, uint32_t key, uint32_t ckey) { khash_t (ii08) * hash = get_hash_from_store (store, module, metric); khash_t (ii08) * cache = get_hash_from_cache (module, metric); khint_t k; if ((k = kh_get (ii08, hash, key)) == kh_end (hash)) return -1; return ins_ii08 (cache, ckey, kh_val (hash, k)); } static int ins_cache_is32 (GKHashStorage *store, GModule module, GSMetric metric, uint32_t key, uint32_t ckey) { khash_t (is32) * hash = get_hash_from_store (store, module, metric); khash_t (is32) * cache = get_hash_from_cache (module, metric); khint_t k; if ((k = kh_get (is32, hash, key)) == kh_end (hash)) return -1; return ins_is32 (cache, ckey, kh_val (hash, k)); } static int inc_cache_ii32 (GKHashStorage *store, GModule module, GSMetric metric, uint32_t key, uint32_t ckey) { khash_t (ii32) * hash = get_hash_from_store (store, module, metric); khash_t (ii32) * cache = get_hash_from_cache (module, metric); khint_t k; if ((k = kh_get (ii32, hash, key)) == kh_end (hash)) return -1; return inc_ii32 (cache, ckey, kh_val (hash, k)); } static int max_cache_iu64 (GKHashStorage *store, GModule module, GSMetric metric, uint32_t key, uint32_t ckey) { khash_t (iu64) * hash = get_hash_from_store (store, module, metric); khash_t (iu64) * cache = get_hash_from_cache (module, metric); khint_t k; if ((k = kh_get (iu64, hash, key)) == kh_end (hash)) return -1; if (get_iu64 (cache, ckey) < kh_val (hash, k)) return ins_iu64 (cache, ckey, kh_val (hash, k)); return -1; } static int inc_cache_iu64 (GKHashStorage *store, GModule module, GSMetric metric, uint32_t key, uint32_t ckey) { khash_t (iu64) * hash = get_hash_from_store (store, module, metric); khash_t (iu64) * cache = get_hash_from_cache (module, metric); khint_t k; if ((k = kh_get (iu64, hash, key)) == kh_end (hash)) return -1; return inc_iu64 (cache, ckey, kh_val (hash, k)); } static int ins_raw_num_data (GModule module, uint32_t date) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * hash = get_hdb (db, MTRC_DATES); GKHashStorage *store = get_store (hash, date); khiter_t k, kr; uint32_t ckey = 0, rkey = 0, nrkey = 0; char *val = NULL; khash_t (ii32) * kmap = get_hash_from_store (store, module, MTRC_KEYMAP); khash_t (ii32) * root = get_hash_from_store (store, module, MTRC_ROOT); khash_t (is32) * rmap = get_hash_from_store (store, module, MTRC_ROOTMAP); khash_t (ii32) * cache = get_hash_from_cache (module, MTRC_ROOT); if (!kmap) return -1; for (k = kh_begin (kmap); k != kh_end (kmap); ++k) { if (!kh_exist (kmap, k)) continue; if ((ckey = ins_cache_map (module, MTRC_KEYMAP, kh_key (kmap, k))) == 0) continue; if ((rkey = get_ii32 (root, kh_val (kmap, k)))) { kr = kh_get (is32, rmap, rkey); if (kr != kh_end (rmap) && (val = kh_val (rmap, kr))) { nrkey = ins_cache_map (module, MTRC_KEYMAP, djb2 ((unsigned char *) val)); ins_cache_is32 (store, module, MTRC_ROOTMAP, rkey, nrkey); ins_ii32 (cache, ckey, nrkey); } } ins_cache_is32 (store, module, MTRC_DATAMAP, kh_val (kmap, k), ckey); inc_cache_ii32 (store, module, MTRC_HITS, kh_val (kmap, k), ckey); inc_cache_ii32 (store, module, MTRC_VISITORS, kh_val (kmap, k), ckey); inc_cache_iu64 (store, module, MTRC_BW, kh_val (kmap, k), ckey); inc_cache_iu64 (store, module, MTRC_CUMTS, kh_val (kmap, k), ckey); max_cache_iu64 (store, module, MTRC_MAXTS, kh_val (kmap, k), ckey); ins_cache_ii08 (store, module, MTRC_METHODS, kh_val (kmap, k), ckey); ins_cache_ii08 (store, module, MTRC_PROTOCOLS, kh_val (kmap, k), ckey); } return 0; } static int set_raw_num_data_date (GModule module) { GKDB *db = get_db_instance (DB_INSTANCE); khash_t (igkh) * hash = get_hdb (db, MTRC_DATES); khiter_t k; if (!hash) return -1; /* iterate over the stored dates */ for (k = kh_begin (hash); k != kh_end (hash); ++k) { if (kh_exist (hash, k)) ins_raw_num_data (module, kh_key (hash, k)); } return 0; } int rebuild_rawdata_cache (void) { GModule module; size_t idx = 0; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; set_raw_num_data_date (module); } return 2; } /* Initialize hash tables */ void init_storage (void) { GKDB *db = get_db_instance (DB_INSTANCE); db->cache = init_gkhashmodule (); if (conf.restore) restore_data (); } /* Destroys the hash structure */ void des_igkh (void *h) { khint_t k; khash_t (igkh) * hash = h; if (!hash) return; for (k = kh_begin (hash); k != kh_end (hash); ++k) { if (!kh_exist (hash, k)) continue; free_stores (kh_value (hash, k)); } kh_destroy (igkh, hash); } void free_cache (GKHashModule *cache) { GModule module; size_t idx = 0; FOREACH_MODULE (idx, module_list) { module = module_list[idx]; free_module_metrics (cache, module, 0); } free (cache); } /* A wrapper to initialize a raw data structure. * * On success a GRawData structure is returned. */ static GRawData * init_new_raw_data (GModule module, uint32_t ht_size) { GRawData *raw_data; raw_data = new_grawdata (); raw_data->idx = 0; raw_data->module = module; raw_data->size = ht_size; raw_data->items = new_grawdata_item (ht_size); return raw_data; } static GRawData * get_u32_raw_data (GModule module) { khash_t (ii32) * hash = get_hash_from_cache (module, MTRC_HITS); GRawData *raw_data; khiter_t key; uint32_t ht_size = 0; if (!hash) return NULL; ht_size = kh_size (hash); raw_data = init_new_raw_data (module, ht_size); raw_data->type = U32; for (key = kh_begin (hash); key != kh_end (hash); ++key) { if (!kh_exist (hash, key)) continue; raw_data->items[raw_data->idx].nkey = kh_key (hash, key); raw_data->items[raw_data->idx].hits = kh_val (hash, key); raw_data->idx++; } return raw_data; } /* Store the key/value pairs from a hash table into raw_data and sorts * the hits (numeric) value. * * On error, NULL is returned. * On success the GRawData sorted is returned */ static GRawData * get_str_raw_data (GModule module) { khash_t (is32) * hash = get_hash_from_cache (module, MTRC_DATAMAP); GRawData *raw_data; khiter_t key; uint32_t ht_size = 0; if (!hash) return NULL; ht_size = kh_size (hash); raw_data = init_new_raw_data (module, ht_size); raw_data->type = STR; for (key = kh_begin (hash); key != kh_end (hash); ++key) { if (!kh_exist (hash, key)) continue; raw_data->items[raw_data->idx].nkey = kh_key (hash, key); raw_data->items[raw_data->idx].data = kh_val (hash, key); raw_data->idx++; } return raw_data; } /* Entry point to load the raw data from the data store into our * GRawData structure. * * On error, NULL is returned. * On success the GRawData sorted is returned */ GRawData * parse_raw_data (GModule module) { GRawData *raw_data = NULL; #ifdef _DEBUG clock_t begin = clock (); double taken; const char *modstr = NULL; LOG_DEBUG (("== parse_raw_data ==\n")); #endif switch (module) { case VISITORS: raw_data = get_str_raw_data (module); if (raw_data) sort_raw_str_data (raw_data, raw_data->idx); break; default: raw_data = get_u32_raw_data (module); if (raw_data) sort_raw_num_data (raw_data, raw_data->idx); } #ifdef _DEBUG modstr = get_module_str (module); taken = (double) (clock () - begin) / CLOCKS_PER_SEC; LOG_DEBUG (("== %-30s%f\n\n", modstr, taken)); #endif return raw_data; } goaccess-1.9.3/src/commons.h0000644000175000017300000001573714626464512011434 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include #endif #ifndef COMMONS_H_INCLUDED #define COMMONS_H_INCLUDED #include #include #include "gslist.h" /* Remove the __attribute__ stuff when the compiler is not GCC. */ #if !__GNUC__ #define __attribute__(x) /**/ #endif #define GO_UNUSED __attribute__((unused)) #define GO_VERSION "1.9.3" #define GO_WEBSITE "https://goaccess.io/" extern struct tm now_tm; /* common char array buffer size */ #define INIT_BUF_SIZE 1024 /* total number of modules */ #ifdef HAVE_GEOLOCATION #define TOTAL_MODULES 19 #else #define TOTAL_MODULES 17 #endif /* maximum number of items within a panel */ #define MAX_CHOICES 366 /* real-time */ #define MAX_CHOICES_RT 50 /* max default items when date-spec = min */ #define MAX_CHOICES_MINUTE 1440 /* 24hrs */ /* date and time length - e.g., 2016/12/12 12:12:12 -0600 */ #define DATE_TIME 25 + 1 /* date length - e.g., 2016/12/12 */ #define DATE_LEN 10 + 1 /* date length - e.g., 12:12:12 */ #define TIME_LEN 8 + 1 /* hour + ':' + min length - e.g., 12:12 */ #define HRMI_LEN 4 + 1 + 1 #define YR_FMT "%Y" #define MO_FMT "%M" #define DT_FMT "%d" /* maximum protocol string length */ #define REQ_PROTO_LEN 9 #define IGNORE_LEVEL_PANEL 1 #define IGNORE_LEVEL_REQ 2 /* Type of IP */ typedef enum { TYPE_IPINV, TYPE_IPV4, TYPE_IPV6 } GTypeIP; /* Type of Modules */ typedef enum MODULES { VISITORS, REQUESTS, REQUESTS_STATIC, NOT_FOUND, HOSTS, OS, BROWSERS, VISIT_TIMES, VIRTUAL_HOSTS, REFERRERS, REFERRING_SITES, KEYPHRASES, STATUS_CODES, REMOTE_USER, CACHE_STATUS, #ifdef HAVE_GEOLOCATION GEO_LOCATION, ASN, #endif MIME_TYPE, TLS_TYPE, } GModule; /* Total number of storage metrics (GSMetric) */ #define GSMTRC_TOTAL 19 /* Enumerated Storage Metrics */ typedef enum GSMetric_ { MTRC_KEYMAP, MTRC_ROOTMAP, MTRC_DATAMAP, MTRC_UNIQMAP, MTRC_ROOT, MTRC_HITS, MTRC_VISITORS, MTRC_BW, MTRC_CUMTS, MTRC_MAXTS, MTRC_METHODS, MTRC_PROTOCOLS, MTRC_AGENTS, MTRC_METADATA, MTRC_UNIQUE_KEYS, MTRC_AGENT_KEYS, MTRC_AGENT_VALS, MTRC_CNT_VALID, MTRC_CNT_BW, } GSMetric; /* Metric totals. These are metrics that have a percent value and are * calculated values. */ typedef struct GPercTotals_ { uint32_t hits; /* total valid hits */ uint32_t visitors; /* total visitors */ uint64_t bw; /* total bandwidth */ } GPercTotals; /* Metrics within GHolder or GDashData */ typedef struct GMetrics { /* metric id can be used to identify * a specific data field */ uint8_t id; char *data; char *method; char *protocol; float hits_perc; float visitors_perc; float bw_perc; uint64_t hits; uint64_t visitors; /* holder has a numeric value, while * dashboard has a displayable string value */ union { char *sbw; uint64_t nbw; } bw; /* holder has a numeric value, while * dashboard has a displayable string value */ union { char *sts; uint64_t nts; } avgts; /* holder has a numeric value, while * dashboard has a displayable string value */ union { char *sts; uint64_t nts; } cumts; /* holder has a numeric value, while * dashboard has a displayable string value */ union { char *sts; uint64_t nts; } maxts; } GMetrics; /* Holder sub item */ typedef struct GSubItem_ { GModule module; GMetrics *metrics; struct GSubItem_ *prev; struct GSubItem_ *next; } GSubItem; /* Double linked-list of sub items */ typedef struct GSubList_ { int size; struct GSubItem_ *head; struct GSubItem_ *tail; } GSubList; /* Holder item */ typedef struct GHolderItem_ { GSubList *sub_list; GMetrics *metrics; } GHolderItem; /* Holder of GRawData */ typedef struct GHolder_ { GHolderItem *items; /* holder items */ GModule module; /* current module */ int idx; /* holder index */ int holder_size; /* number of allocated items */ uint32_t ht_size; /* size of the hash table/store */ int sub_items_size; /* number of sub items */ } GHolder; /* Enum-to-string */ typedef struct GEnum_ { const char *str; int idx; } GEnum; /* A metric can contain a root/data/uniq node id */ typedef struct GDataMap_ { int data; int root; } GDataMap; typedef struct GAgentItem_ { char *agent; } GAgentItem; typedef struct GAgents_ { int size; int idx; struct GAgentItem_ *items; } GAgents; #define FOREACH_MODULE(item, array) \ for (; (item < ARRAY_SIZE(array)) && array[item] != -1; ++item) /* Processing time */ extern time_t end_proc; extern time_t timestamp; extern time_t start_proc; /* list of available modules/panels */ extern int module_list[TOTAL_MODULES]; /* *INDENT-OFF* */ GAgents *new_gagents (uint32_t size); void free_agents_array (GAgents *agents); const char *enum2str (const GEnum map[], int len, int idx); const char *get_module_str (GModule module); float get_percentage (unsigned long long total, unsigned long long hit); int get_max_choices (void); int get_module_enum (const char *str); int has_timestamp (const char *fmt); int str2enum (const GEnum map[], int len, const char *str); int enable_panel (GModule mod); int get_module_index (int module); int get_next_module (GModule module); int get_prev_module (GModule module); int ignore_panel (GModule mod); int init_modules (void); int remove_module(GModule module); uint32_t get_num_modules (void); void verify_panels (void); char *get_log_source_str (int max_len); intmax_t get_log_sizes (void); void display_default_config_file (void); void display_storage (void); void display_version (void); /* *INDENT-ON* */ #endif goaccess-1.9.3/src/labels.h0000644000175000017300000005527314624731651011221 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef LABELS_H_INCLUDED #define LABELS_H_INCLUDED #ifdef ENABLE_NLS #include #define _(String) dgettext (PACKAGE , String) #else #define _(String) (String) #endif #define gettext_noop(String) String #define N_(String) gettext_noop (String) /* global lang attribute */ #define DOC_LANG _( "en") /* General */ #define GEN_EXPAND_PANEL _( "Exp. Panel") #define GEN_HELP _( "Help") #define GEN_QUIT _( "Quit") #define GEN_TOTAL _( "Total") /* Sort Labels */ #define SORT_ASC_SEL _( "[x] ASC [ ] DESC") #define SORT_DESC_SEL _( "[ ] ASC [x] DESC") /* Overall Stats Labels */ #define T_ACTIVE_PANEL _("[Active Panel: %1$s]") #define T_QUIT _("[q]uit GoAccess") #define T_HELP_ENTER _("[?] Help [Enter] Exp. Panel") #define T_DASH _( "Dashboard") #define T_DASH_HEAD _( "Dashboard - Overall Analyzed Requests") #define T_HEAD N_( "Overall Analyzed Requests") #define T_BW _( "Tx. Amount") #define T_DATETIME _( "Date/Time") #define T_EXCLUDE_IP _( "Excl. IP Hits") #define T_FAILED _( "Failed Requests") #define T_GEN_TIME _( "Log Parsing Time") #define T_LOG _( "Log Size") #define T_LOG_PATH _( "Log Source") #define T_REFERRER _( "Referrers") #define T_REQUESTS _( "Total Requests") #define T_STATIC_FILES _( "Static Files") #define T_UNIQUE404 _( "Not Found") #define T_UNIQUE_FILES _( "Requested Files") #define T_UNIQUE_VISITORS _( "Unique Visitors") #define T_VALID _( "Valid Requests") /* Metric Labels */ #define MTRC_HITS_LBL _( "Hits") #define MTRC_HITS_PERC_LBL _( "h%") #define MTRC_VISITORS_LBL _( "Visitors") #define MTRC_VISITORS_SHORT_LBL _( "Vis.") #define MTRC_VISITORS_PERC_LBL _( "v%") #define MTRC_BW_LBL _( "Tx. Amount") #define MTRC_AVGTS_LBL _( "Avg. T.S.") #define MTRC_CUMTS_LBL _( "Cum. T.S.") #define MTRC_MAXTS_LBL _( "Max. T.S.") #define MTRC_METHODS_LBL _( "Method") #define MTRC_METHODS_SHORT_LBL _( "Mtd") #define MTRC_PROTOCOLS_LBL _( "Protocol") #define MTRC_PROTOCOLS_SHORT_LBL _( "Proto") #define MTRC_CITY_LBL _( "City") #define MTRC_ASB_LBL _( "ASN") #define MTRC_COUNTRY_LBL _( "Country") #define MTRC_HOSTNAME_LBL _( "Hostname") #define MTRC_DATA_LBL _( "Data") #define HTML_PLOT_HITS_VIS _( "Hits/Visitors") /* Panel Labels and Descriptions */ #define VISITORS_HEAD \ N_("Unique visitors per day") #define VISITORS_HEAD_BOTS \ N_("Unique visitors per day - Including spiders") #define VISITORS_DESC \ N_("Hits having the same IP, date and agent are a unique visit.") #define VISITORS_LABEL \ N_("Visitors") #define REQUESTS_HEAD \ N_("Requested Files (URLs)") #define REQUESTS_DESC \ N_("Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]") #define REQUESTS_LABEL \ N_("Requests") #define REQUESTS_STATIC_HEAD \ N_("Static Requests") #define REQUESTS_STATIC_DESC \ N_("Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]") #define REQUESTS_STATIC_LABEL \ N_("Static Requests") #define VISIT_TIMES_HEAD \ N_("Time Distribution") #define VISIT_TIMES_DESC \ N_("Data sorted by hour [, avgts, cumts, maxts]") #define VISIT_TIMES_LABEL \ N_("Time") #define VIRTUAL_HOSTS_HEAD \ N_("Virtual Hosts") #define VIRTUAL_HOSTS_DESC \ N_("Data sorted by hits [, avgts, cumts, maxts]") #define VIRTUAL_HOSTS_LABEL \ N_("Virtual Hosts") #define REMOTE_USER_HEAD \ N_("Remote User (HTTP authentication)") #define REMOTE_USER_DESC \ N_("Data sorted by hits [, avgts, cumts, maxts]") #define REMOTE_USER_LABEL \ N_("Remote User") #define CACHE_STATUS_HEAD \ N_("The cache status of the object served") #define CACHE_STATUS_DESC \ N_("Data sorted by hits [, avgts, cumts, maxts]") #define CACHE_STATUS_LABEL \ N_("Cache Status") #define NOT_FOUND_HEAD \ N_("Not Found URLs (404s)") #define NOT_FOUND_DESC \ N_("Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]") #define NOT_FOUND_LABEL \ N_("Not Found") #define HOSTS_HEAD \ N_("Visitor Hostnames and IPs") #define HOSTS_DESC \ N_("Top visitor hosts sorted by hits [, avgts, cumts, maxts]") #define HOSTS_LABEL \ N_("Hosts") #define OS_HEAD \ N_("Operating Systems") #define OS_DESC \ N_("Top Operating Systems sorted by hits [, avgts, cumts, maxts]") #define OS_LABEL \ N_("OS") #define BROWSERS_HEAD \ N_("Browsers") #define BROWSERS_DESC \ N_("Top Browsers sorted by hits [, avgts, cumts, maxts]") #define BROWSERS_LABEL \ N_("Browsers") #define REFERRERS_HEAD \ N_("Referrer URLs") #define REFERRERS_DESC \ N_("Top Requested Referrers sorted by hits [, avgts, cumts, maxts]") #define REFERRERS_LABEL \ N_("Referrers") #define REFERRING_SITES_HEAD \ N_("Referring Sites") #define REFERRING_SITES_DESC \ N_("Top Referring Sites sorted by hits [, avgts, cumts, maxts]") #define REFERRING_SITES_LABEL \ N_("Referring Sites") #define KEYPHRASES_HEAD \ N_("Keyphrases from Google's search engine") #define KEYPHRASES_DESC \ N_("Top Keyphrases sorted by hits [, avgts, cumts, maxts]") #define KEYPHRASES_LABEL \ N_("Keyphrases") #define GEO_LOCATION_HEAD \ N_("Geo Location") #define GEO_LOCATION_DESC \ N_("Continent > Country sorted by unique hits [, avgts, cumts, maxts]") #define GEO_LOCATION_LABEL \ N_("Geo Location") #define ASN_HEAD \ N_("ASN") #define ASN_DESC \ N_("Autonomous System Numbers/Organizations (ASNs)") #define ASN_LABEL \ N_("ASN") #define STATUS_CODES_HEAD \ N_("HTTP Status Codes") #define STATUS_CODES_DESC \ N_("Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]") #define STATUS_CODES_LABEL \ N_("Status Codes") #define MIME_TYPE_HEAD \ N_("MIME Types") #define MIME_TYPE_DESC \ N_("File types shipped out") #define MIME_TYPE_LABEL \ N_("MIME Types") #define TLS_TYPE_HEAD \ N_("Encryption settings") #define TLS_TYPE_DESC \ N_("TLS version and picked algorithm") #define TLS_TYPE_LABEL \ N_("TLS Settings") /* Find Labels */ #define CISENSITIVE \ _("[ ] case sensitive") #define CSENSITIVE \ _("[x] case sensitive") #define FIND_DESC \ _("Regex allowed - ^g to cancel - TAB switch case") #define FIND_HEAD \ _("Find pattern in all views") /* Config Dialog */ #define CONFDLG_HEAD \ _("Log Format Configuration") #define CONFDLG_KEY_HINTS \ _("[SPACE] to toggle - [ENTER] to proceed - [q] to quit") #define CONFDLG_LOG_FORMAT \ _("Log Format - [c] to add/edit format") #define CONFDLG_DATE_FORMAT \ _("Date Format - [d] to add/edit format") #define CONFDLG_TIME_FORMAT \ _("Time Format - [t] to add/edit format") #define CONFDLG_DESC \ _("[UP/DOWN] to scroll - [q] to close window") /* Agents Dialog */ #define AGENTSDLG_DESC \ _("[UP/DOWN] to scroll - [q] to close window") #define AGENTSDLG_HEAD \ _("User Agents for %1$s") /* Color Scheme Dialog */ #define SCHEMEDLG_HEAD \ _("Scheme Configuration") #define SCHEMEDLG_DESC \ _("[ENTER] to use scheme - [q]uit") /* Sort Dialog */ #define SORTDLG_HEAD \ _("Sort active module by") #define SORTDLG_DESC \ _("[ENTER] select - [TAB] sort - [q]uit") /* Help TUI Dialog */ #define HELPDLG_HEAD \ _("GoAccess Quick Help") #define HELPDLG_DESC \ _("[UP/DOWN] to scroll - [q] to quit") /* Storage Built-in Option */ #define BUILT_WITH_DEFHASH \ _("In-Memory with On-Disk Persistent Storage.") /* Common UI Errors */ #define ERR_FORMAT_HEADER \ _("Format Errors - Verify your log/date/time format") #define ERR_FORMAT_NO_DATE_FMT \ _("No date format was found on your conf file.") #define ERR_FORMAT_NO_LOG_FMT \ _("No log format was found on your conf file.") #define ERR_FORMAT_NO_TIME_FMT \ _("No time format was found on your conf file.") #define ERR_NODEF_CONF_FILE \ _("No default config file found.") #define ERR_NODEF_CONF_FILE_DESC \ _("You may specify one with") #define ERR_PARSED_NLINES_DESC \ _("producing the following errors") #define ERR_PARSED_NLINES \ _("Parsed %1$d lines") #define ERR_PLEASE_REPORT \ _("Please report it by opening an issue on GitHub") #define ERR_FORMAT_NO_TIME_FMT_DLG \ _("Select a time format.") #define ERR_FORMAT_NO_DATE_FMT_DLG \ _("Select a date format.") #define ERR_FORMAT_NO_LOG_FMT_DLG \ _("Select a log format.") #define ERR_PANEL_DISABLED \ _("'%1$s' panel is disabled") #define ERR_NO_DATA_PASSED \ _("No input data was provided nor there's data to restore.") #define ERR_LOG_REALLOC_FAILURE_MSG \ _("Unable to allocate memory for a log instance.") #define ERR_LOG_NOT_FOUND_MSG \ _("Unable to find the given log.") /* Other */ #define INFO_MORE_INFO \ _("For more details visit") #define INFO_LAST_UPDATED \ _("Last Updated") #define INFO_WS_READY_FOR_CONN \ _("WebSocket server ready to accept new client connections") #define INFO_HELP_FOLLOWING_OPTS \ _("The following options can also be supplied to the command") #define INFO_HELP_EXAMPLES \ _("Examples can be found by running") #define HTML_REPORT_TITLE \ _( "Server Statistics") #define HTML_REPORT_NAV_THEME \ N_("Theme") #define HTML_REPORT_NAV_DARK_GRAY \ N_("Dark Gray") #define HTML_REPORT_NAV_BRIGHT \ N_("Bright") #define HTML_REPORT_NAV_DARK_BLUE \ N_("Dark Blue") #define HTML_REPORT_NAV_DARK_PURPLE \ N_("Dark Purple") #define HTML_REPORT_NAV_PANELS \ N_("Panels") #define HTML_REPORT_NAV_ITEMS_PER_PAGE \ N_("Items per Page") #define HTML_REPORT_NAV_TABLES \ N_("Tables") #define HTML_REPORT_NAV_DISPLAY_TABLES \ N_("Display Tables") #define HTML_REPORT_NAV_AH_SMALL \ N_("Auto-Hide on Small Devices") #define HTML_REPORT_NAV_AH_SMALL_TITLE \ N_("Automatically hide tables on small screen devices") #define HTML_REPORT_NAV_TOGGLE_PANEL \ N_("Toggle Panel") #define HTML_REPORT_NAV_LAYOUT \ N_("Layout") #define HTML_REPORT_NAV_HOR \ N_("Horizontal") #define HTML_REPORT_NAV_VER \ N_("Vertical") #define HTML_REPORT_NAV_WIDE \ N_("WideScreen") #define HTML_REPORT_NAV_FILE_OPTS \ N_("File Options") #define HTML_REPORT_NAV_EXPORT_JSON \ N_("Export as JSON") #define HTML_REPORT_PANEL_PANEL_OPTS \ N_("Panel Options") #define HTML_REPORT_PANEL_PREVIOUS \ N_("Previous") #define HTML_REPORT_PANEL_NEXT \ N_("Next") #define HTML_REPORT_PANEL_FIRST \ N_("First") #define HTML_REPORT_PANEL_LAST \ N_("Last") #define HTML_REPORT_PANEL_CHART_OPTS \ N_("Chart Options") #define HTML_REPORT_PANEL_CHART \ N_("Chart") #define HTML_REPORT_PANEL_TYPE \ N_("Type") #define HTML_REPORT_PANEL_AREA_SPLINE \ N_("Area Spline") #define HTML_REPORT_PANEL_BAR \ N_("Bar") #define HTML_REPORT_PANEL_WMAP \ N_("World Map") #define HTML_REPORT_PANEL_PLOT_METRIC \ N_("Plot Metric") #define HTML_REPORT_PANEL_TABLE_COLS \ N_("Table Columns") /* Status Codes */ #define STATUS_CODE_0XX \ N_("0xx Unofficial Codes") #define STATUS_CODE_1XX \ N_("1xx Informational") #define STATUS_CODE_2XX \ N_("2xx Success") #define STATUS_CODE_3XX \ N_("3xx Redirection") #define STATUS_CODE_4XX \ N_("4xx Client Errors") #define STATUS_CODE_5XX \ N_("5xx Server Errors") #define STATUS_CODE_0 \ N_("0 - Caddy: Unhandled - No configured routes") #define STATUS_CODE_100 \ N_("100 - Continue: Server received the initial part of the request") #define STATUS_CODE_101 \ N_("101 - Switching Protocols: Client asked to switch protocols") #define STATUS_CODE_200 \ N_("200 - OK: The request sent by the client was successful") #define STATUS_CODE_201 \ N_("201 - Created: The request has been fulfilled and created") #define STATUS_CODE_202 \ N_("202 - Accepted: The request has been accepted for processing") #define STATUS_CODE_203 \ N_("203 - Non-authoritative Information: Response from a third party") #define STATUS_CODE_204 \ N_("204 - No Content: Request did not return any content") #define STATUS_CODE_205 \ N_("205 - Reset Content: Server asked the client to reset the document") #define STATUS_CODE_206 \ N_("206 - Partial Content: The partial GET has been successful") #define STATUS_CODE_207 \ N_("207 - Multi-Status: WebDAV; RFC 4918") #define STATUS_CODE_208 \ N_("208 - Already Reported: WebDAV; RFC 5842") #define STATUS_CODE_218 \ N_("218 - This is fine: Apache servers. A catch-all error condition") #define STATUS_CODE_300 \ N_("300 - Multiple Choices: Multiple options for the resource") #define STATUS_CODE_301 \ N_("301 - Moved Permanently: Resource has permanently moved") #define STATUS_CODE_302 \ N_("302 - Moved Temporarily (redirect)") #define STATUS_CODE_303 \ N_("303 - See Other Document: The response is at a different URI") #define STATUS_CODE_304 \ N_("304 - Not Modified: Resource has not been modified") #define STATUS_CODE_305 \ N_("305 - Use Proxy: Can only be accessed through the proxy") #define STATUS_CODE_307 \ N_("307 - Temporary Redirect: Resource temporarily moved") #define STATUS_CODE_308 \ N_("308 - Permanent Redirect") #define STATUS_CODE_400 \ N_("400 - Bad Request: The syntax of the request is invalid") #define STATUS_CODE_401 \ N_("401 - Unauthorized: Request needs user authentication") #define STATUS_CODE_402 \ N_("402 - Payment Required") #define STATUS_CODE_403 \ N_("403 - Forbidden: Server is refusing to respond to it") #define STATUS_CODE_404 \ N_("404 - Not Found: Requested resource could not be found") #define STATUS_CODE_405 \ N_("405 - Method Not Allowed: Request method not supported") #define STATUS_CODE_406 \ N_("406 - Not Acceptable") #define STATUS_CODE_407 \ N_("407 - Proxy Authentication Required") #define STATUS_CODE_408 \ N_("408 - Request Timeout: Server timed out waiting for the request") #define STATUS_CODE_409 \ N_("409 - Conflict: Conflict in the request") #define STATUS_CODE_410 \ N_("410 - Gone: Resource requested is no longer available") #define STATUS_CODE_411 \ N_("411 - Length Required: Invalid Content-Length") #define STATUS_CODE_412 \ N_("412 - Precondition Failed: Server does not meet preconditions") #define STATUS_CODE_413 \ N_("413 - Payload Too Large") #define STATUS_CODE_414 \ N_("414 - Request-URI Too Long") #define STATUS_CODE_415 \ N_("415 - Unsupported Media Type: Media type is not supported") #define STATUS_CODE_416 \ N_("416 - Requested Range Not Satisfiable: Cannot supply that portion") #define STATUS_CODE_417 \ N_("417 - Expectation Failed") #define STATUS_CODE_418 \ N_("418 - I'm a teapot") #define STATUS_CODE_419 \ N_("419 - Page Expired: Laravel Framework when a CSRF Token is missing") #define STATUS_CODE_420 \ N_("420 - Method Failure: Spring Framework when a method has failed") #define STATUS_CODE_421 \ N_("421 - Misdirected Request") #define STATUS_CODE_422 \ N_("422 - Unprocessable Entity due to semantic errors: WebDAV") #define STATUS_CODE_423 \ N_("423 - The resource that is being accessed is locked") #define STATUS_CODE_424 \ N_("424 - Failed Dependency: WebDAV") #define STATUS_CODE_426 \ N_("426 - Upgrade Required: Client should switch to a different protocol") #define STATUS_CODE_428 \ N_("428 - Precondition Required") #define STATUS_CODE_429 \ N_("429 - Too Many Requests: The user has sent too many requests") #define STATUS_CODE_430 \ N_("430 - Request Header Fields Too Large: Too many URLs are requested within a certain time frame") #define STATUS_CODE_431 \ N_("431 - Request Header Fields Too Large") #define STATUS_CODE_440 \ N_("440 - Login Time-out: The client's session has expired") #define STATUS_CODE_449 \ N_("449 - Retry With: The server cannot honour the request") #define STATUS_CODE_450 \ N_("450 - Blocked by Windows Parental Controls: The Microsoft extension code indicated") #define STATUS_CODE_451 \ N_("451 - Unavailable For Legal Reasons") #define STATUS_CODE_444 \ N_("444 - (Nginx) Connection closed without sending any headers") #define STATUS_CODE_460 \ N_("460 - AWS Elastic Load Balancing: Client closed the connection ") #define STATUS_CODE_463 \ N_("463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP addresses") #define STATUS_CODE_464 \ N_("464 - AWS Elastic Load Balancing: Incompatible protocol versions") #define STATUS_CODE_494 \ N_("494 - (Nginx) Request Header Too Large") #define STATUS_CODE_495 \ N_("495 - (Nginx) SSL client certificate error") #define STATUS_CODE_496 \ N_("496 - (Nginx) Client didn't provide certificate") #define STATUS_CODE_497 \ N_("497 - (Nginx) HTTP request sent to HTTPS port") #define STATUS_CODE_498 \ N_("498 - Invalid Token: an expired or otherwise invalid token") #define STATUS_CODE_499 \ N_("499 - (Nginx) Connection closed by client while processing request") #define STATUS_CODE_500 \ N_("500 - Internal Server Error") #define STATUS_CODE_501 \ N_("501 - Not Implemented") #define STATUS_CODE_502 \ N_("502 - Bad Gateway: Received an invalid response from the upstream") #define STATUS_CODE_503 \ N_("503 - Service Unavailable: The server is currently unavailable") #define STATUS_CODE_504 \ N_("504 - Gateway Timeout: The upstream server failed to send request") #define STATUS_CODE_505 \ N_("505 - HTTP Version Not Supported") #define STATUS_CODE_509 \ N_("509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth") #define STATUS_CODE_520 \ N_("520 - CloudFlare - Web server is returning an unknown error") #define STATUS_CODE_521 \ N_("521 - CloudFlare - Web server is down") #define STATUS_CODE_522 \ N_("522 - CloudFlare - Connection timed out") #define STATUS_CODE_523 \ N_("523 - CloudFlare - Origin is unreachable") #define STATUS_CODE_524 \ N_("524 - CloudFlare - A timeout occurred") #define STATUS_CODE_525 \ N_("525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS handshake") #define STATUS_CODE_526 \ N_("526 - Invalid SSL Certificate: Cloudflare could not validate the SSL certificate") #define STATUS_CODE_527 \ N_("527 - Railgun Error: An interrupted connection") #define STATUS_CODE_529 \ N_("529 - Site is overloaded: A site can not process the request") #define STATUS_CODE_530 \ N_("530 - Site is frozen: A site has been frozen due to inactivity") #define STATUS_CODE_540 \ N_("540 - Temporarily Disabled: The requested endpoint has been temporarily disabled") #define STATUS_CODE_561 \ N_("561 - Unauthorized: An error around authentication") #define STATUS_CODE_598 \ N_("598 - Network read timeout error: some HTTP proxies to signal a network read timeout") #define STATUS_CODE_599 \ N_("599 - Network Connect Timeout Error: An error used by some HTTP proxies") #define STATUS_CODE_783 \ N_("783 - Unexpected Token: The request includes a JSON syntax error") #endif // for #ifndef LABELS_H goaccess-1.9.3/src/base64.h0000644000175000017300000000307414624731651011033 /** * _______ _______ __ __ * / ____/ | / / ___/____ _____/ /_____ / /_ * / / __ | | /| / /\__ \/ __ \/ ___/ //_/ _ \/ __/ * / /_/ / | |/ |/ /___/ / /_/ / /__/ ,< / __/ /_ * \____/ |__/|__//____/\____/\___/_/|_|\___/\__/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef BASE64_H_INCLUDED #define BASE64_H_INCLUDED #include char *base64_encode (const void *buf, size_t size); #endif // for #ifndef BASE64_H goaccess-1.9.3/src/goaccess.c0000644000175000017300000012637514626464423011545 /** * goaccess.c -- main log analyzer * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #include #include #include #include #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gkhash.h" #ifdef HAVE_GEOLOCATION #include "geoip1.h" #endif #include "browsers.h" #include "csv.h" #include "error.h" #include "gdashboard.h" #include "gdns.h" #include "gholder.h" #include "goaccess.h" #include "gwsocket.h" #include "json.h" #include "options.h" #include "output.h" #include "util.h" #include "websocket.h" #include "xmalloc.h" GConf conf = { .append_method = 1, .append_protocol = 1, .chunk_size = 1024, .hl_header = 1, .jobs = 1, .num_tests = 10, }; /* Loading/Spinner */ GSpinner *parsing_spinner; /* active reverse dns flag */ int active_gdns = 0; /* WebSocket server - writer and reader threads */ static GWSWriter *gwswriter; static GWSReader *gwsreader; /* Dashboard data structure */ static GDash *dash; /* Data holder structure */ static GHolder *holder; /* Old signal mask */ static sigset_t oldset; /* Curses windows */ static WINDOW *header_win, *main_win; static int main_win_height = 0; /* *INDENT-OFF* */ static GScroll gscroll = { { {0, 0}, /* VISITORS { scroll, offset} */ {0, 0}, /* REQUESTS { scroll, offset} */ {0, 0}, /* REQUESTS_STATIC { scroll, offset} */ {0, 0}, /* NOT_FOUND { scroll, offset} */ {0, 0}, /* HOSTS { scroll, offset} */ {0, 0}, /* OS { scroll, offset} */ {0, 0}, /* BROWSERS { scroll, offset} */ {0, 0}, /* VISIT_TIMES { scroll, offset} */ {0, 0}, /* VIRTUAL_HOSTS { scroll, offset} */ {0, 0}, /* REFERRERS { scroll, offset} */ {0, 0}, /* REFERRING_SITES { scroll, offset} */ {0, 0}, /* KEYPHRASES { scroll, offset} */ {0, 0}, /* STATUS_CODES { scroll, offset} */ {0, 0}, /* REMOTE_USER { scroll, offset} */ {0, 0}, /* CACHE_STATUS { scroll, offset} */ #ifdef HAVE_GEOLOCATION {0, 0}, /* GEO_LOCATION { scroll, offset} */ {0, 0}, /* ASN { scroll, offset} */ #endif {0, 0}, /* MIME_TYPE { scroll, offset} */ {0, 0}, /* TLS_TYPE { scroll, offset} */ }, 0, /* current module */ 0, /* main dashboard scroll */ 0, /* expanded flag */ }; /* *INDENT-ON* */ /* Free malloc'd holder */ static void house_keeping_holder (void) { /* REVERSE DNS THREAD */ pthread_mutex_lock (&gdns_thread.mutex); /* kill dns pthread */ active_gdns = 0; /* clear holder structure */ free_holder (&holder); /* clear reverse dns queue */ gdns_free_queue (); /* clear the whole storage */ free_storage (); pthread_mutex_unlock (&gdns_thread.mutex); } /* Free malloc'd data across the whole program */ static void house_keeping (void) { house_keeping_holder (); /* DASHBOARD */ if (dash && !conf.output_stdout) { free_dashboard (dash); reset_find (); } /* GEOLOCATION */ #ifdef HAVE_GEOLOCATION geoip_free (); #endif /* INVALID REQUESTS */ if (conf.invalid_requests_log) { LOG_DEBUG (("Closing invalid requests log.\n")); invalid_log_close (); } /* UNKNOWNS */ if (conf.unknowns_log) { LOG_DEBUG (("Closing unknowns log.\n")); unknowns_log_close (); } /* CONFIGURATION */ free_formats (); free_browsers_hash (); if (conf.debug_log) { LOG_DEBUG (("Bye.\n")); dbg_log_close (); } if (conf.fifo_in) free ((char *) conf.fifo_in); if (conf.fifo_out) free ((char *) conf.fifo_out); /* clear spinner */ free (parsing_spinner); /* free colors */ free_color_lists (); /* free cmd arguments */ free_cmd_args (); /* WebSocket writer */ free (gwswriter); /* WebSocket reader */ free (gwsreader); } static void cleanup (int ret) { /* done, restore tty modes and reset terminal into * non-visual mode */ if (!conf.output_stdout) endwin (); if (!conf.no_progress) fprintf (stdout, "Cleaning up resources...\n"); /* unable to process valid data */ if (ret) output_logerrors (); house_keeping (); } /* Drop permissions to the user specified. */ static void drop_permissions (void) { struct passwd *pw; errno = 0; if ((pw = getpwnam (conf.username)) == NULL) { if (errno == 0) FATAL ("No such user %s", conf.username); FATAL ("Unable to retrieve user %s: %s", conf.username, strerror (errno)); } if (setgroups (1, &pw->pw_gid) == -1) FATAL ("setgroups: %s", strerror (errno)); if (setgid (pw->pw_gid) == -1) FATAL ("setgid: %s", strerror (errno)); if (setuid (pw->pw_uid) == -1) FATAL ("setuid: %s", strerror (errno)); } /* Open the pidfile whose name is specified in the given path and write * the daemonized given pid. */ static void write_pid_file (const char *path, pid_t pid) { FILE *pidfile; if (!path) return; if ((pidfile = fopen (path, "w"))) { fprintf (pidfile, "%d", pid); fclose (pidfile); } else { FATAL ("Unable to open the specified pid file. %s", strerror (errno)); } } /* Set GoAccess to run as a daemon */ static void daemonize (void) { pid_t pid, sid; int fd; /* Clone ourselves to make a child */ pid = fork (); if (pid < 0) exit (EXIT_FAILURE); if (pid > 0) { write_pid_file (conf.pidfile, pid); printf ("Daemonized GoAccess: %d\n", pid); exit (EXIT_SUCCESS); } umask (0); /* attempt to create our own process group */ sid = setsid (); if (sid < 0) { LOG_DEBUG (("Unable to setsid: %s.\n", strerror (errno))); exit (EXIT_FAILURE); } /* set the working directory to the root directory. * requires the user to specify absolute paths */ if (chdir ("/") < 0) { LOG_DEBUG (("Unable to set chdir: %s.\n", strerror (errno))); exit (EXIT_FAILURE); } /* redirect fd's 0,1,2 to /dev/null */ /* Note that the user will need to use --debug-file for log output */ if ((fd = open ("/dev/null", O_RDWR, 0)) == -1) { LOG_DEBUG (("Unable to open /dev/null: %s.\n", strerror (errno))); exit (EXIT_FAILURE); } dup2 (fd, STDIN_FILENO); dup2 (fd, STDOUT_FILENO); dup2 (fd, STDERR_FILENO); if (fd > STDERR_FILENO) { close (fd); } } /* Extract data from the given module hash structure and allocate + * load data from the hash table into an instance of GHolder */ static void allocate_holder_by_module (GModule module) { GRawData *raw_data; /* extract data from the corresponding hash table */ raw_data = parse_raw_data (module); if (!raw_data) { LOG_DEBUG (("raw data is NULL for module: %d.\n", module)); return; } load_holder_data (raw_data, holder + module, module, module_sort[module]); } /* Iterate over all modules/panels and extract data from hash * structures and load it into an instance of GHolder */ static void allocate_holder (void) { size_t idx = 0; holder = new_gholder (TOTAL_MODULES); FOREACH_MODULE (idx, module_list) { allocate_holder_by_module (module_list[idx]); } } /* Extract data from the modules GHolder structure and load it into * the terminal dashboard */ static void allocate_data_by_module (GModule module, int col_data) { int size = 0, max_choices = get_max_choices (); dash->module[module].head = module_to_head (module); dash->module[module].desc = module_to_desc (module); size = holder[module].idx; if (gscroll.expanded && module == gscroll.current) { size = size > max_choices ? max_choices : holder[module].idx; } else { size = holder[module].idx > col_data ? col_data : holder[module].idx; } dash->module[module].alloc_data = size; /* data allocated */ dash->module[module].ht_size = holder[module].ht_size; /* hash table size */ dash->module[module].idx_data = 0; dash->module[module].pos_y = 0; if (gscroll.expanded && module == gscroll.current) dash->module[module].dash_size = DASH_EXPANDED; else dash->module[module].dash_size = DASH_COLLAPSED; dash->total_alloc += dash->module[module].dash_size; pthread_mutex_lock (&gdns_thread.mutex); load_data_to_dash (&holder[module], dash, module, &gscroll); pthread_mutex_unlock (&gdns_thread.mutex); } /* Iterate over all modules/panels and extract data from GHolder * structure and load it into the terminal dashboard */ static void allocate_data (void) { GModule module; int col_data = get_num_collapsed_data_rows (); size_t idx = 0; dash = new_gdash (); FOREACH_MODULE (idx, module_list) { module = module_list[idx]; allocate_data_by_module (module, col_data); } } static void clean_stdscrn (void) { int row, col; getmaxyx (stdscr, row, col); draw_header (stdscr, "", "%s", row - 1, 0, col, color_default); } /* A wrapper to render all windows within the dashboard. */ static void render_screens (uint32_t offset) { GColors *color = get_color (COLOR_DEFAULT); int row, col; char time_str_buf[32]; getmaxyx (stdscr, row, col); term_size (main_win, &main_win_height); generate_time (); strftime (time_str_buf, sizeof (time_str_buf), "%d/%b/%Y:%T", &now_tm); draw_header (stdscr, "", "%s", row - 1, 0, col, color_default); wattron (stdscr, color->attr | COLOR_PAIR (color->pair->idx)); mvaddstr (row - 1, 1, T_HELP_ENTER); mvprintw (row - 1, col / 2 - 10, "%" PRIu32 "/r - %s", offset, time_str_buf); mvaddstr (row - 1, col - 6 - strlen (T_QUIT), T_QUIT); mvprintw (row - 1, col - 5, "%s", GO_VERSION); wattroff (stdscr, color->attr | COLOR_PAIR (color->pair->idx)); refresh (); /* call general stats header */ display_general (header_win, holder); wrefresh (header_win); /* display active label based on current module */ update_active_module (header_win, gscroll.current); display_content (main_win, dash, &gscroll); } /* Collapse the current expanded module */ static int collapse_current_module (void) { if (!gscroll.expanded) return 1; gscroll.expanded = 0; reset_scroll_offsets (&gscroll); free_dashboard (dash); allocate_data (); return 0; } /* Display message at the bottom of the terminal dashboard that panel * is disabled */ static void disabled_panel_msg (GModule module) { const char *lbl = module_to_label (module); int row, col; getmaxyx (stdscr, row, col); draw_header (stdscr, lbl, ERR_PANEL_DISABLED, row - 1, 0, col, color_error); } /* Set the current module/panel */ static int set_module_to (GScroll *scrll, GModule module) { if (get_module_index (module) == -1) { disabled_panel_msg (module); return 1; } /* scroll to panel */ if (!conf.no_tab_scroll) gscroll.dash = get_module_index (module) * DASH_COLLAPSED; /* reset expanded module */ collapse_current_module (); scrll->current = module; return 0; } /* Scroll expanded module or terminal dashboard to the top */ static void scroll_to_first_line (void) { if (!gscroll.expanded) gscroll.dash = 0; else { gscroll.module[gscroll.current].scroll = 0; gscroll.module[gscroll.current].offset = 0; } } /* Scroll expanded module or terminal dashboard to the last row */ static void scroll_to_last_line (void) { int exp_size = get_num_expanded_data_rows (); int scrll = 0, offset = 0; if (!gscroll.expanded) gscroll.dash = dash->total_alloc - main_win_height; else { scrll = dash->module[gscroll.current].idx_data - 1; if (scrll >= exp_size && scrll >= offset + exp_size) offset = scrll < exp_size - 1 ? 0 : scrll - exp_size + 1; gscroll.module[gscroll.current].scroll = scrll; gscroll.module[gscroll.current].offset = offset; } } /* Load the user-agent window given the selected IP */ static void load_ip_agent_list (void) { int type_ip = 0; /* make sure we have a valid IP */ int sel = gscroll.module[gscroll.current].scroll; GDashData item = { 0 }; if (dash->module[HOSTS].holder_size == 0) return; item = dash->module[HOSTS].data[sel]; if (!invalid_ipaddr (item.metrics->data, &type_ip)) load_agent_list (main_win, item.metrics->data); } /* Expand the selected module */ static void expand_current_module (void) { if (gscroll.expanded && gscroll.current == HOSTS) { load_ip_agent_list (); return; } /* expanded, nothing to do... */ if (gscroll.expanded) return; reset_scroll_offsets (&gscroll); gscroll.expanded = 1; free_holder_by_module (&holder, gscroll.current); free_dashboard (dash); allocate_holder_by_module (gscroll.current); allocate_data (); } /* Expand the clicked module/panel given the Y event coordinate. */ static int expand_module_from_ypos (int y) { /* ignore header/footer clicks */ if (y < MAX_HEIGHT_HEADER || y == LINES - 1) return 1; if (set_module_from_mouse_event (&gscroll, dash, y)) return 1; reset_scroll_offsets (&gscroll); gscroll.expanded = 1; free_holder_by_module (&holder, gscroll.current); free_dashboard (dash); allocate_holder_by_module (gscroll.current); allocate_data (); return 0; } /* Expand the clicked module/panel */ static int expand_on_mouse_click (void) { int ok_mouse; MEVENT event; ok_mouse = getmouse (&event); if (!conf.mouse_support || ok_mouse != OK) return 1; if (event.bstate & BUTTON1_CLICKED) return expand_module_from_ypos (event.y); return 1; } /* Scroll down expanded module to the last row */ static void scroll_down_expanded_module (void) { int exp_size = get_num_expanded_data_rows (); int *scroll_ptr, *offset_ptr; scroll_ptr = &gscroll.module[gscroll.current].scroll; offset_ptr = &gscroll.module[gscroll.current].offset; if (!gscroll.expanded) return; if (*scroll_ptr >= dash->module[gscroll.current].idx_data - 1) return; ++(*scroll_ptr); if (*scroll_ptr >= exp_size && *scroll_ptr >= *offset_ptr + exp_size) ++(*offset_ptr); } /* Scroll up expanded module */ static void scroll_up_expanded_module (void) { int *scroll_ptr, *offset_ptr; scroll_ptr = &gscroll.module[gscroll.current].scroll; offset_ptr = &gscroll.module[gscroll.current].offset; if (!gscroll.expanded) return; if (*scroll_ptr <= 0) return; --(*scroll_ptr); if (*scroll_ptr < *offset_ptr) --(*offset_ptr); } /* Scroll up terminal dashboard */ static void scroll_up_dashboard (void) { gscroll.dash--; } /* Page up expanded module */ static void page_up_module (void) { int exp_size = get_num_expanded_data_rows (); int *scroll_ptr, *offset_ptr; scroll_ptr = &gscroll.module[gscroll.current].scroll; offset_ptr = &gscroll.module[gscroll.current].offset; if (!gscroll.expanded) return; /* decrease scroll and offset by exp_size */ *scroll_ptr -= exp_size; if (*scroll_ptr < 0) *scroll_ptr = 0; if (*scroll_ptr < *offset_ptr) *offset_ptr -= exp_size; if (*offset_ptr <= 0) *offset_ptr = 0; } /* Page down expanded module */ static void page_down_module (void) { int exp_size = get_num_expanded_data_rows (); int *scroll_ptr, *offset_ptr; scroll_ptr = &gscroll.module[gscroll.current].scroll; offset_ptr = &gscroll.module[gscroll.current].offset; if (!gscroll.expanded) return; *scroll_ptr += exp_size; if (*scroll_ptr >= dash->module[gscroll.current].idx_data - 1) *scroll_ptr = dash->module[gscroll.current].idx_data - 1; if (*scroll_ptr >= exp_size && *scroll_ptr >= *offset_ptr + exp_size) *offset_ptr += exp_size; if (*offset_ptr + exp_size >= dash->module[gscroll.current].idx_data - 1) *offset_ptr = dash->module[gscroll.current].idx_data - exp_size; if (*scroll_ptr < exp_size - 1) *offset_ptr = 0; } /* Create a new find dialog window and render it. Upon closing the * window, dashboard is refreshed. */ static int render_search_dialog (int search) { if (render_find_dialog (main_win, &gscroll)) return 1; pthread_mutex_lock (&gdns_thread.mutex); search = perform_next_find (holder, &gscroll); pthread_mutex_unlock (&gdns_thread.mutex); if (search != 0) return 1; free_dashboard (dash); allocate_data (); return 0; } /* Search for the next occurrence within the dashboard structure */ static int search_next_match (int search) { pthread_mutex_lock (&gdns_thread.mutex); search = perform_next_find (holder, &gscroll); pthread_mutex_unlock (&gdns_thread.mutex); if (search != 0) return 1; free_dashboard (dash); allocate_data (); return 0; } /* Update holder structure and dashboard screen */ static void tail_term (void) { pthread_mutex_lock (&gdns_thread.mutex); free_holder (&holder); pthread_cond_broadcast (&gdns_thread.not_empty); pthread_mutex_unlock (&gdns_thread.mutex); free_dashboard (dash); allocate_holder (); allocate_data (); term_size (main_win, &main_win_height); } static void tail_html (void) { char *json = NULL; pthread_mutex_lock (&gdns_thread.mutex); free_holder (&holder); pthread_cond_broadcast (&gdns_thread.not_empty); pthread_mutex_unlock (&gdns_thread.mutex); allocate_holder (); pthread_mutex_lock (&gdns_thread.mutex); json = get_json (holder, 1); pthread_mutex_unlock (&gdns_thread.mutex); if (json == NULL) return; pthread_mutex_lock (&gwswriter->mutex); broadcast_holder (gwswriter->fd, json, strlen (json)); pthread_mutex_unlock (&gwswriter->mutex); free (json); } /* Fast-forward latest JSON data when client connection is opened. */ static void fast_forward_client (int listener) { char *json = NULL; pthread_mutex_lock (&gdns_thread.mutex); json = get_json (holder, 1); pthread_mutex_unlock (&gdns_thread.mutex); if (json == NULL) return; pthread_mutex_lock (&gwswriter->mutex); send_holder_to_client (gwswriter->fd, listener, json, strlen (json)); pthread_mutex_unlock (&gwswriter->mutex); free (json); } /* Start reading data coming from the client side through the * WebSocket server. */ void read_client (void *ptr_data) { GWSReader *reader = (GWSReader *) ptr_data; /* check we have a fifo for reading */ if (reader->fd == -1) return; pthread_mutex_lock (&reader->mutex); set_self_pipe (reader->self_pipe); pthread_mutex_unlock (&reader->mutex); while (1) { /* poll(2) will block */ if (read_fifo (reader, fast_forward_client)) break; } close (reader->fd); } /* Parse tailed lines */ static void parse_tail_follow (GLog *glog, FILE *fp) { GLogItem *logitem = NULL; #ifdef WITH_GETLINE char *buf = NULL; #else char buf[LINE_BUFFER] = { 0 }; #endif glog->bytes = 0; #ifdef WITH_GETLINE while ((buf = fgetline (fp)) != NULL) { #else while (fgets (buf, LINE_BUFFER, fp) != NULL) { #endif pthread_mutex_lock (&gdns_thread.mutex); if ((parse_line (glog, buf, 0, &logitem)) == 0 && logitem != NULL) process_log (logitem); if (logitem != NULL) { free_glog (logitem); logitem = NULL; } pthread_mutex_unlock (&gdns_thread.mutex); glog->bytes += strlen (buf); #ifdef WITH_GETLINE free (buf); #endif /* If the ingress rate is greater than MAX_BATCH_LINES, * then we break and allow to re-render the UI */ if (++glog->read % MAX_BATCH_LINES == 0) break; } } static void verify_inode (FILE *fp, GLog *glog) { struct stat fdstat; if (stat (glog->props.filename, &fdstat) == -1) FATAL ("Unable to stat the specified log file '%s'. %s", glog->props.filename, strerror (errno)); glog->props.size = fdstat.st_size; /* Either the log got smaller, probably was truncated so start reading from 0 * and reset snippet. * If the log changed its inode, more likely the log was rotated, so we set * the initial snippet for the new log for future iterations */ if (fdstat.st_ino != glog->props.inode || glog->snippet[0] == '\0' || 0 == glog->props.size) { glog->length = glog->bytes = 0; set_initial_persisted_data (glog, fp, glog->props.filename); } glog->props.inode = fdstat.st_ino; } /* Process appended log data * * If nothing changed, 0 is returned. * If log file changed, 1 is returned. */ static int perform_tail_follow (GLog *glog) { FILE *fp = NULL; char buf[READ_BYTES + 1] = { 0 }; uint16_t len = 0; uint64_t length = 0; if (glog->props.filename[0] == '-' && glog->props.filename[1] == '\0') { parse_tail_follow (glog, glog->pipe); /* did we read something from the pipe? */ if (0 == glog->bytes) return 0; glog->length += glog->bytes; goto out; } length = file_size (glog->props.filename); /* file hasn't changed */ /* ###NOTE: This assumes the log file being read can be of smaller size, e.g., * rotated/truncated file or larger when data is appended */ if (length == glog->length) return 0; if (!(fp = fopen (glog->props.filename, "r"))) FATAL ("Unable to read the specified log file '%s'. %s", glog->props.filename, strerror (errno)); verify_inode (fp, glog); len = MIN (glog->snippetlen, length); /* This is not ideal, but maybe the only reliable way to know if the * current log looks different than our first read/parse */ if ((fread (buf, len, 1, fp)) != 1 && ferror (fp)) FATAL ("Unable to fread the specified log file '%s'", glog->props.filename); /* For the case where the log got larger since the last iteration, we attempt * to compare the first READ_BYTES against the READ_BYTES we had since the last * parse. If it's different, then it means the file may got truncated but grew * faster than the last iteration (odd, but possible), so we read from 0* */ if (glog->snippet[0] != '\0' && buf[0] != '\0' && memcmp (glog->snippet, buf, len) != 0) glog->length = glog->bytes = 0; if (!fseeko (fp, glog->length, SEEK_SET)) parse_tail_follow (glog, fp); fclose (fp); glog->length += glog->bytes; /* insert the inode of the file parsed and the last line parsed */ if (glog->props.inode) { glog->lp.line = glog->read; glog->lp.size = glog->props.size; ht_insert_last_parse (glog->props.inode, &glog->lp); } out: return 1; } /* Loop over and perform a follow for the given logs */ static void tail_loop_html (Logs *logs) { struct timespec refresh = { .tv_sec = conf.html_refresh ? conf.html_refresh : HTML_REFRESH, .tv_nsec = 0, }; int i = 0, ret = 0; while (1) { if (conf.stop_processing) break; for (i = 0, ret = 0; i < logs->size; ++i) ret |= perform_tail_follow (&logs->glog[i]); /* 0.2 secs */ if (1 == ret) tail_html (); if (nanosleep (&refresh, NULL) == -1 && errno != EINTR) FATAL ("nanosleep: %s", strerror (errno)); } } /* Entry point to start processing the HTML output */ static void process_html (Logs *logs, const char *filename) { /* render report */ pthread_mutex_lock (&gdns_thread.mutex); output_html (holder, filename); pthread_mutex_unlock (&gdns_thread.mutex); /* not real time? */ if (!conf.real_time_html) return; /* ignore loading from disk */ if (logs->load_from_disk_only) return; pthread_mutex_lock (&gwswriter->mutex); gwswriter->fd = open_fifoin (); pthread_mutex_unlock (&gwswriter->mutex); /* open fifo for write */ if (gwswriter->fd == -1) return; set_ready_state (); tail_loop_html (logs); close (gwswriter->fd); } /* Iterate over available panels and advance the panel pointer. */ static int next_module (void) { int next = -1; if ((next = get_next_module (gscroll.current)) == -1) return 1; gscroll.current = next; if (!conf.no_tab_scroll) gscroll.dash = get_module_index (gscroll.current) * DASH_COLLAPSED; return 0; } /* Iterate over available panels and rewind the panel pointer. */ static int previous_module (void) { int prev = -1; if ((prev = get_prev_module (gscroll.current)) == -1) return 1; gscroll.current = prev; if (!conf.no_tab_scroll) gscroll.dash = get_module_index (gscroll.current) * DASH_COLLAPSED; return 0; } /* Perform several curses operations upon resizing the terminal. */ static void window_resize (void) { endwin (); refresh (); werase (header_win); werase (main_win); werase (stdscr); term_size (main_win, &main_win_height); refresh (); } /* Create a new sort dialog window and render it. Upon closing the * window, dashboard is refreshed. */ static void render_sort_dialog (void) { load_sort_win (main_win, gscroll.current, &module_sort[gscroll.current]); pthread_mutex_lock (&gdns_thread.mutex); free_holder (&holder); pthread_cond_broadcast (&gdns_thread.not_empty); pthread_mutex_unlock (&gdns_thread.mutex); free_dashboard (dash); allocate_holder (); allocate_data (); } static void term_tail_logs (Logs *logs) { struct timespec ts = {.tv_sec = 0,.tv_nsec = 200000000 }; /* 0.2 seconds */ uint32_t offset = 0; int i, ret; for (i = 0, ret = 0; i < logs->size; ++i) ret |= perform_tail_follow (&logs->glog[i]); if (1 == ret) { tail_term (); offset = *logs->processed - logs->offset; render_screens (offset); } if (nanosleep (&ts, NULL) == -1 && errno != EINTR) { FATAL ("nanosleep: %s", strerror (errno)); } } /* Interfacing with the keyboard */ static void get_keys (Logs *logs) { int search = 0; int c, quit = 1; uint32_t offset = 0; struct sigaction act, oldact; /* Change the action for SIGINT to SIG_IGN and block Ctrl+c * before entering the subdialog */ act.sa_handler = SIG_IGN; sigemptyset (&act.sa_mask); act.sa_flags = 0; while (quit) { if (conf.stop_processing) break; offset = *logs->processed - logs->offset; c = wgetch (stdscr); switch (c) { case 'q': /* quit */ if (!gscroll.expanded) { quit = 0; break; } if (collapse_current_module () == 0) render_screens (offset); break; case KEY_F (1): case '?': case 'h': sigaction (SIGINT, &act, &oldact); load_help_popup (main_win); sigaction (SIGINT, &oldact, NULL); render_screens (offset); break; case 49: /* 1 */ /* reset expanded module */ if (set_module_to (&gscroll, VISITORS) == 0) render_screens (offset); break; case 50: /* 2 */ /* reset expanded module */ if (set_module_to (&gscroll, REQUESTS) == 0) render_screens (offset); break; case 51: /* 3 */ /* reset expanded module */ if (set_module_to (&gscroll, REQUESTS_STATIC) == 0) render_screens (offset); break; case 52: /* 4 */ /* reset expanded module */ if (set_module_to (&gscroll, NOT_FOUND) == 0) render_screens (offset); break; case 53: /* 5 */ /* reset expanded module */ if (set_module_to (&gscroll, HOSTS) == 0) render_screens (offset); break; case 54: /* 6 */ /* reset expanded module */ if (set_module_to (&gscroll, OS) == 0) render_screens (offset); break; case 55: /* 7 */ /* reset expanded module */ if (set_module_to (&gscroll, BROWSERS) == 0) render_screens (offset); break; case 56: /* 8 */ /* reset expanded module */ if (set_module_to (&gscroll, VISIT_TIMES) == 0) render_screens (offset); break; case 57: /* 9 */ /* reset expanded module */ if (set_module_to (&gscroll, VIRTUAL_HOSTS) == 0) render_screens (offset); break; case 48: /* 0 */ /* reset expanded module */ if (set_module_to (&gscroll, REFERRERS) == 0) render_screens (offset); break; case 33: /* shift + 1 */ /* reset expanded module */ if (set_module_to (&gscroll, REFERRING_SITES) == 0) render_screens (offset); break; case 64: /* shift + 2 */ /* reset expanded module */ if (set_module_to (&gscroll, KEYPHRASES) == 0) render_screens (offset); break; case 35: /* Shift + 3 */ /* reset expanded module */ if (set_module_to (&gscroll, STATUS_CODES) == 0) render_screens (offset); break; case 36: /* Shift + 4 */ /* reset expanded module */ if (set_module_to (&gscroll, REMOTE_USER) == 0) render_screens (offset); break; case 37: /* Shift + 5 */ /* reset expanded module */ if (set_module_to (&gscroll, CACHE_STATUS) == 0) render_screens (offset); break; #ifdef HAVE_GEOLOCATION case 94: /* Shift + 6 */ /* reset expanded module */ if (set_module_to (&gscroll, GEO_LOCATION) == 0) render_screens (offset); break; case 38: /* Shift + 7 */ /* reset expanded module */ if (set_module_to (&gscroll, ASN) == 0) render_screens (offset); break; #endif case 42: /* Shift + 7 */ /* reset expanded module */ if (set_module_to (&gscroll, MIME_TYPE) == 0) render_screens (offset); break; case 40: /* Shift + 8 */ /* reset expanded module */ if (set_module_to (&gscroll, TLS_TYPE) == 0) render_screens (offset); break; case 9: /* TAB */ /* reset expanded module */ collapse_current_module (); if (next_module () == 0) render_screens (offset); break; case 353: /* Shift TAB */ /* reset expanded module */ collapse_current_module (); if (previous_module () == 0) render_screens (offset); break; case 'g': /* g = top */ scroll_to_first_line (); display_content (main_win, dash, &gscroll); break; case 'G': /* G = down */ scroll_to_last_line (); display_content (main_win, dash, &gscroll); break; /* expand dashboard module */ case KEY_RIGHT: case 0x0a: case 0x0d: case 32: /* ENTER */ case 79: /* o */ case 111: /* O */ case KEY_ENTER: expand_current_module (); display_content (main_win, dash, &gscroll); break; case KEY_DOWN: /* scroll main dashboard */ if ((gscroll.dash + main_win_height) < dash->total_alloc) { gscroll.dash++; display_content (main_win, dash, &gscroll); } break; case KEY_MOUSE: /* handles mouse events */ if (expand_on_mouse_click () == 0) render_screens (offset); break; case 106: /* j - DOWN expanded module */ scroll_down_expanded_module (); display_content (main_win, dash, &gscroll); break; /* scroll up main_win */ case KEY_UP: if (gscroll.dash > 0) { scroll_up_dashboard (); display_content (main_win, dash, &gscroll); } break; case 2: /* ^ b - page up */ case 339: /* ^ PG UP */ page_up_module (); display_content (main_win, dash, &gscroll); break; case 6: /* ^ f - page down */ case 338: /* ^ PG DOWN */ page_down_module (); display_content (main_win, dash, &gscroll); break; case 107: /* k - UP expanded module */ scroll_up_expanded_module (); display_content (main_win, dash, &gscroll); break; case 'n': if (search_next_match (search) == 0) render_screens (offset); break; case '/': sigaction (SIGINT, &act, &oldact); if (render_search_dialog (search) == 0) render_screens (offset); sigaction (SIGINT, &oldact, NULL); break; case 99: /* c */ if (conf.no_color) break; sigaction (SIGINT, &act, &oldact); load_schemes_win (main_win); sigaction (SIGINT, &oldact, NULL); free_dashboard (dash); allocate_data (); set_wbkgd (main_win, header_win); render_screens (offset); break; case 115: /* s */ sigaction (SIGINT, &act, &oldact); render_sort_dialog (); sigaction (SIGINT, &oldact, NULL); render_screens (offset); break; case 269: case KEY_RESIZE: window_resize (); render_screens (offset); break; default: if (logs->load_from_disk_only) break; term_tail_logs (logs); break; } } } /* Store accumulated processing time * Note: As we store with time_t second resolution, * if elapsed time == 0, we will bump it to 1. */ static void set_accumulated_time (void) { time_t elapsed = end_proc - start_proc; elapsed = (!elapsed) ? !elapsed : elapsed; ht_inc_cnt_overall ("processing_time", elapsed); } /* Execute the following calls right before we start the main * processing/parsing loop */ static void init_processing (void) { /* perform some additional checks before parsing panels */ verify_panels (); /* initialize storage */ pthread_mutex_lock (&parsing_spinner->mutex); parsing_spinner->label = "SETTING UP STORAGE"; pthread_mutex_unlock (&parsing_spinner->mutex); init_storage (); insert_methods_protocols (); set_spec_date_format (); if ((!conf.skip_term_resolver && !conf.output_stdout) || (conf.enable_html_resolver && conf.real_time_html)) gdns_thread_create (); } /* Determine the type of output, i.e., JSON, CSV, HTML */ static void standard_output (Logs *logs) { char *csv = NULL, *json = NULL, *html = NULL; /* CSV */ if (find_output_type (&csv, "csv", 1) == 0) output_csv (holder, csv); /* JSON */ if (find_output_type (&json, "json", 1) == 0) output_json (holder, json); /* HTML */ if (find_output_type (&html, "html", 1) == 0 || conf.output_format_idx == 0) { if (conf.real_time_html) setup_ws_server (gwswriter, gwsreader); process_html (logs, html); } free (csv); free (html); free (json); } /* Output to a terminal */ static void curses_output (Logs *logs) { allocate_data (); clean_stdscrn (); render_screens (0); /* will loop in here */ get_keys (logs); } /* Set locale */ static void set_locale (void) { char *loc_ctype; setlocale (LC_ALL, ""); #ifdef ENABLE_NLS bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #endif loc_ctype = getenv ("LC_CTYPE"); if (loc_ctype != NULL) setlocale (LC_CTYPE, loc_ctype); else if ((loc_ctype = getenv ("LC_ALL"))) setlocale (LC_CTYPE, loc_ctype); else setlocale (LC_CTYPE, ""); } /* Attempt to get the current name of a terminal or fallback to /dev/tty * * On error, -1 is returned * On success, the new file descriptor is returned */ static int open_term (char **buf) { const char *term = "/dev/tty"; if (!isatty (STDERR_FILENO) || (term = ttyname (STDERR_FILENO)) == 0) { if (!isatty (STDOUT_FILENO) || (term = ttyname (STDOUT_FILENO)) == 0) { if (!isatty (STDIN_FILENO) || (term = ttyname (STDIN_FILENO)) == 0) { term = "/dev/tty"; } } } *buf = xstrdup (term); return open (term, O_RDONLY); } /* Determine if reading from a pipe, and duplicate file descriptors so * it doesn't get in the way of curses' normal reading stdin for * wgetch() */ static FILE * set_pipe_stdin (void) { char *term = NULL; FILE *pipe = stdin; int term_fd = -1; int pipe_fd = -1; /* If unable to open a terminal, yet data is being piped, then it's * probably from the cron, or when running as a user that can't open a * terminal. In that case it's still important to set the pipe as * non-blocking. * * Note: If used from the cron, it will require the * user to use a single dash to parse piped data such as: * cat access.log | goaccess - */ if ((term_fd = open_term (&term)) == -1) goto out1; if ((pipe_fd = dup (fileno (stdin))) == -1) FATAL ("Unable to dup stdin: %s", strerror (errno)); pipe = fdopen (pipe_fd, "r"); if (freopen (term, "r", stdin) == 0) FATAL ("Unable to open input from TTY"); if (fileno (stdin) != 0) (void) dup2 (fileno (stdin), 0); add_dash_filename (); out1: /* no need to set it as non-blocking since we are simply outputting a * static report */ if (conf.output_stdout && !conf.real_time_html) goto out2; /* Using select(), poll(), or epoll(), etc may be a better choice... */ if (pipe_fd == -1) pipe_fd = fileno (pipe); if (fcntl (pipe_fd, F_SETFL, fcntl (pipe_fd, F_GETFL, 0) | O_NONBLOCK) == -1) FATAL ("Unable to set fd as non-blocking: %s.", strerror (errno)); out2: free (term); return pipe; } /* Determine if we are getting data from the stdin, and where are we * outputting to. */ static void set_io (FILE **pipe) { /* For backwards compatibility, check if we are not outputting to a * terminal or if an output format was supplied */ if (!isatty (STDOUT_FILENO) || conf.output_format_idx > 0) conf.output_stdout = 1; /* dup fd if data piped */ if (!isatty (STDIN_FILENO)) *pipe = set_pipe_stdin (); } /* Process command line options and set some default options. */ static void parse_cmd_line (int argc, char **argv) { read_option_args (argc, argv); set_default_static_files (); } static void handle_signal_action (GO_UNUSED int sig_number) { if (sig_number == SIGINT) fprintf (stderr, "\nSIGINT caught!\n"); else if (sig_number == SIGTERM) fprintf (stderr, "\nSIGTERM caught!\n"); else if (sig_number == SIGQUIT) fprintf (stderr, "\nSIGQUIT caught!\n"); else fprintf (stderr, "\nSignal %d caught!\n", sig_number); fprintf (stderr, "Closing GoAccess...\n"); if (conf.output_stdout && conf.real_time_html) stop_ws_server (gwswriter, gwsreader); conf.stop_processing = 1; } static void setup_thread_signals (void) { struct sigaction act; act.sa_handler = handle_signal_action; sigemptyset (&act.sa_mask); act.sa_flags = 0; sigaction (SIGINT, &act, NULL); sigaction (SIGTERM, &act, NULL); sigaction (SIGQUIT, &act, NULL); signal (SIGPIPE, SIG_IGN); /* Restore old signal mask for the main thread */ pthread_sigmask (SIG_SETMASK, &oldset, NULL); } static void block_thread_signals (void) { /* Avoid threads catching SIGINT/SIGPIPE/SIGTERM/SIGQUIT and handle them in * main thread */ sigset_t sigset; sigemptyset (&sigset); sigaddset (&sigset, SIGINT); sigaddset (&sigset, SIGPIPE); sigaddset (&sigset, SIGTERM); sigaddset (&sigset, SIGQUIT); pthread_sigmask (SIG_BLOCK, &sigset, &oldset); } /* Initialize various types of data. */ static Logs * initializer (void) { int i; FILE *pipe = NULL; Logs *logs; /* drop permissions right away */ if (conf.username) drop_permissions (); /* then initialize modules and set */ gscroll.current = init_modules (); /* setup to use the current locale */ set_locale (); parse_browsers_file (); #ifdef HAVE_GEOLOCATION init_geoip (); #endif set_io (&pipe); /* init glog */ if (!(logs = init_logs (conf.filenames_idx))) FATAL (ERR_NO_DATA_PASSED); set_signal_data (logs); for (i = 0; i < logs->size; ++i) if (logs->glog[i].props.filename[0] == '-' && logs->glog[i].props.filename[1] == '\0') logs->glog[i].pipe = pipe; /* init parsing spinner */ parsing_spinner = new_gspinner (); parsing_spinner->processed = &(logs->processed); parsing_spinner->filename = &(logs->filename); /* init reverse lookup thread */ gdns_init (); /* init random number generator */ srand (getpid ()); init_pre_storage (logs); return logs; } static char * generate_fifo_name (void) { char fname[RAND_FN]; const char *tmp; char *path; size_t len; if ((tmp = getenv ("TMPDIR")) == NULL) tmp = "/tmp"; memset (fname, 0, sizeof (fname)); genstr (fname, RAND_FN - 1); len = snprintf (NULL, 0, "%s/goaccess_fifo_%s", tmp, fname) + 1; path = xmalloc (len); snprintf (path, len, "%s/goaccess_fifo_%s", tmp, fname); return path; } static int spawn_ws (void) { gwswriter = new_gwswriter (); gwsreader = new_gwsreader (); if (!conf.fifo_in) conf.fifo_in = generate_fifo_name (); if (!conf.fifo_out) conf.fifo_out = generate_fifo_name (); /* open fifo for read */ if ((gwsreader->fd = open_fifoout ()) == -1) { LOG (("Unable to open FIFO for read.\n")); return 1; } if (conf.daemonize) daemonize (); return 0; } static void set_standard_output (void) { int html = 0; /* HTML */ if (find_output_type (NULL, "html", 0) == 0 || conf.output_format_idx == 0) html = 1; /* Spawn WebSocket server threads */ if (html && conf.real_time_html) { if (spawn_ws ()) return; } setup_thread_signals (); /* Spawn progress spinner thread */ ui_spinner_create (parsing_spinner); } /* Set up curses. */ static void set_curses (Logs *logs, int *quit) { const char *err_log = NULL; setup_thread_signals (); set_input_opts (); if (conf.no_color || has_colors () == FALSE) { conf.color_scheme = NO_COLOR; conf.no_color = 1; } else { start_color (); } init_colors (0); init_windows (&header_win, &main_win); set_curses_spinner (parsing_spinner); /* Display configuration dialog if missing formats and not piping data in */ if (!conf.read_stdin && (verify_formats () || conf.load_conf_dlg)) { refresh (); *quit = render_confdlg (logs, parsing_spinner); clear (); } /* Piping data in without log/date/time format */ else if (conf.read_stdin && (err_log = verify_formats ())) { FATAL ("%s", err_log); } /* straight parsing */ else { ui_spinner_create (parsing_spinner); } } /* Where all begins... */ int main (int argc, char **argv) { Logs *logs = NULL; int quit = 0, ret = 0; block_thread_signals (); setup_sigsegv_handler (); /* command line/config options */ verify_global_config (argc, argv); parse_conf_file (&argc, &argv); parse_cmd_line (argc, argv); logs = initializer (); /* ignore outputting, process only */ if (conf.process_and_exit) { } /* set stdout */ else if (conf.output_stdout) { set_standard_output (); } /* set curses */ else { set_curses (logs, &quit); } /* no log/date/time format set */ if (quit) goto clean; init_processing (); /* main processing event */ time (&start_proc); parsing_spinner->label = "PARSING"; if ((ret = parse_log (logs, 0))) { end_spinner (); goto clean; } if (conf.stop_processing) goto clean; logs->offset = *logs->processed; pthread_mutex_lock (&parsing_spinner->mutex); parsing_spinner->label = "RENDERING"; pthread_mutex_unlock (&parsing_spinner->mutex); parse_initial_sort (); allocate_holder (); end_spinner (); time (&end_proc); set_accumulated_time (); if (conf.process_and_exit) { } /* stdout */ else if (conf.output_stdout) { standard_output (logs); } /* curses */ else { curses_output (logs); } /* clean */ clean: cleanup (ret); return ret ? EXIT_FAILURE : EXIT_SUCCESS; } goaccess-1.9.3/src/color.h0000644000175000017300000000642514624731651011070 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef COLOR_H_INCLUDED #define COLOR_H_INCLUDED #define COLOR_STR_LEN 9 /* Color Items/Fields */ typedef enum CSTM_COLORS { COLOR_NORMAL, COLOR_MTRC_HITS, COLOR_MTRC_VISITORS, COLOR_MTRC_DATA, COLOR_MTRC_BW, COLOR_MTRC_AVGTS, COLOR_MTRC_CUMTS, COLOR_MTRC_MAXTS, COLOR_MTRC_PROT, COLOR_MTRC_MTHD, COLOR_MTRC_HITS_PERC, COLOR_MTRC_HITS_PERC_MAX, COLOR_MTRC_VISITORS_PERC, COLOR_MTRC_VISITORS_PERC_MAX, COLOR_PANEL_COLS, COLOR_BARS, COLOR_ERROR, COLOR_SELECTED, COLOR_PANEL_ACTIVE, COLOR_PANEL_HEADER, COLOR_PANEL_DESC, COLOR_OVERALL_LBLS, COLOR_OVERALL_VALS, COLOR_OVERALL_PATH, COLOR_ACTIVE_LABEL, COLOR_BG, COLOR_DEFAULT, COLOR_PROGRESS, } GColorItem; /* Default Color Schemes */ typedef enum SCHEMES { NO_COLOR, MONOCHROME, STD_GREEN, MONOKAI, } GSchemes; #include "commons.h" /* Each color properties */ typedef struct GColorPair_ { short idx; /* color pair index identifier */ short fg; /* foreground color */ short bg; /* background color */ } GColorPair; /* Color */ typedef struct GColors_ { GColorItem item; /* screen item */ GColorPair *pair; /* color pair */ int attr; /* color attributes, e.g., bold */ short module; /* panel */ } GColors; GColors *color_default (void); GColors *color_error (void); GColors *color_overall_lbls (void); GColors *color_overall_path (void); GColors *color_overall_vals (void); GColors *color_panel_active (void); GColors *color_panel_desc (void); GColors *color_panel_header (void); GColors *color_progress (void); GColors *color_selected (void); GColors *get_color_by_item_module (GColorItem item, GModule module); GColors *get_color (GColorItem item); GColors *get_color_normal (void); void free_color_lists (void); void set_colors (int force); void set_normal_color (void); #endif // for #ifndef COLOR_H goaccess-1.9.3/src/geoip1.h0000644000175000017300000000447314624731651011137 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #if HAVE_CONFIG_H #include #endif #ifndef GEOIP_H_INCLUDED #define GEOIP_H_INCLUDED #include "commons.h" #define CITY_LEN 47 + 1 /* max string length for a city */ #define CONTINENT_LEN 47 + 1 /* max string length for a country */ #define COUNTRY_LEN 48 + 3 /* Country + two-letter Code */ #define ASN_LEN 64 + 6 /* ASN + 5 digit/16-bit number/code */ /* Type of IP */ typedef enum { TYPE_COUNTRY, TYPE_CITY, TYPE_ASN } GO_GEOIP_DB; typedef struct GLocation_ { char city[CITY_LEN]; char continent[CONTINENT_LEN]; int hits; } GLocation; int is_geoip_resource (void); int set_geolocation (char *host, char *continent, char *country, char *city, char *asn); void geoip_asn (char *host, char *asn); void geoip_free (void); void geoip_get_continent (const char *ip, char *location, GTypeIP type_ip); void geoip_get_country (const char *ip, char *location, GTypeIP type_ip); void init_geoip (void); #endif // for #ifndef GEOIP_H goaccess-1.9.3/src/base64.c0000644000175000017300000000457314624731651011033 /** * base64.c -- A basic base64 encode implementation * _______ _______ __ __ * / ____/ | / / ___/____ _____/ /_____ / /_ * / / __ | | /| / /\__ \/ __ \/ ___/ //_/ _ \/ __/ * / /_/ / | |/ |/ /___/ / /_/ / /__/ ,< / __/ /_ * \____/ |__/|__//____/\____/\___/_/|_|\___/\__/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include "base64.h" #include "xmalloc.h" /* Encodes the given data with base64. * * On success, the encoded nul-terminated data, as a string is returned. */ char * base64_encode (const void *buf, size_t size) { static const char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char *str = (char *) xmalloc ((size + 3) * 4 / 3 + 1); char *p = str; const unsigned char *q = (const unsigned char *) buf; size_t i = 0; while (i < size) { int c = q[i++]; c *= 256; if (i < size) c += q[i]; i++; c *= 256; if (i < size) c += q[i]; i++; *p++ = base64[(c & 0x00fc0000) >> 18]; *p++ = base64[(c & 0x0003f000) >> 12]; if (i > size + 1) *p++ = '='; else *p++ = base64[(c & 0x00000fc0) >> 6]; if (i > size) *p++ = '='; else *p++ = base64[c & 0x0000003f]; } *p = 0; return str; } goaccess-1.9.3/src/browsers.c0000644000175000017300000004244314624731651011613 /** 6 browsers.c -- functions for dealing with browsers * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2024 Gerardo Orellana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include #include #include "browsers.h" #include "error.h" #include "settings.h" #include "util.h" #include "xmalloc.h" /* ###NOTE: The size of the list is proportional to the run time, * which makes this pretty slow */ static char ***browsers_hash = NULL; /* {"search string", "belongs to"} */ static const char *const browsers[][2] = { /* Game systems: most of them are based on major browsers, * thus they need to go before. */ {"Xbox One", "Game Systems"}, {"Xbox", "Game Systems"}, {"PlayStation", "Game Systems"}, {"NintendoBrowser", "Game Systems"}, {"Valve Steam", "Game Systems"}, {"Origin", "Game Systems"}, {"Raptr", "Game Systems"}, /* Based on Internet Explorer */ {"Avant Browser", "Others"}, /* Internet Explorer */ {"IEMobile", "MSIE"}, {"MSIE", "MSIE"}, /* IE11 */ {"Trident/7.0", "MSIE"}, /* Microsoft Edge */ {"Edg", "Edge"}, {"Edge", "Edge"}, /* Surf Browser */ {"Surf", "Surf"}, /* Opera */ {"Opera Mini", "Opera"}, {"Opera Mobi", "Opera"}, {"Opera", "Opera"}, {"OPR", "Opera"}, {"OPiOS", "Opera"}, {"Coast", "Opera"}, /* Others */ {"Homebrew", "Others"}, {"APT-", "Others"}, {"Apt-Cacher", "Others"}, {"Aptly", "Others"}, {"Chef Client", "Others"}, {"Huawei", "Others"}, {"HUAWEI", "Others"}, {"BlackBerry", "Others"}, {"BrowserX", "Others"}, {"Dalvik", "Others"}, {"Dillo", "Others"}, {"ELinks", "Others"}, {"Epiphany", "Others"}, {"Firebird", "Others"}, {"Galeon", "Others"}, {"google-cloud-sdk", "Others"}, {"IBrowse", "Others"}, {"K-Meleon", "Others"}, {"Konqueror", "Others"}, {"Links", "Others"}, {"Lynx", "Others"}, {"Midori", "Others"}, {"Minefield", "Others"}, {"Mosaic", "Others"}, {"Netscape", "Others"}, {"SeaMonkey", "Others"}, {"UCBrowser", "Others"}, {"Wget", "Others"}, {"libfetch", "Others"}, {"check_http", "Others"}, {"Go-http-client", "Others"}, {"curl", "Others"}, {"midori", "Others"}, {"w3m", "Others"}, {"MicroMessenger", "Others"}, {"Apache", "Others"}, {"JOSM", "Others"}, {"pacman", "Others"}, {"Pamac", "Others"}, {"libwww-perl", "Others"}, {"python-requests", "Others"}, {"PackageKit", "Others"}, {"F-Droid", "Others"}, {"okhttp", "Others"}, {"node", "Others"}, {"PrivacyBrowser", "Others"}, {"Transmission", "Others"}, {"libmpv", "Others"}, {"aria2", "Others"}, /* WordPress Cron */ {"WordPress/", "Cron"}, /* Feed-reader-as-a-service */ {"AppleNewsBot", "Feeds"}, {"Bloglines", "Feeds"}, {"Digg Feed Fetcher", "Feeds"}, {"Feedbin", "Feeds"}, {"FeedHQ", "Feeds"}, {"Feedly", "Feeds"}, {"Flipboard", "Feeds"}, {"inoreader.com", "Feeds"}, {"Netvibes", "Feeds"}, {"NewsBlur", "Feeds"}, {"PinRSS", "Feeds"}, {"theoldreader.com", "Feeds"}, {"WordPress.com Reader", "Feeds"}, {"YandexBlogs", "Feeds"}, {"Brainstorm", "Feeds"}, {"Mastodon", "Feeds"}, {"Pleroma", "Feeds"}, /* Google crawlers (some based on Chrome, * therefore up on the list) */ {"AdsBot-Google", "Crawlers"}, {"AppEngine-Google", "Crawlers"}, {"Mediapartners-Google", "Crawlers"}, {"Google", "Crawlers"}, {"WhatsApp", "Crawlers"}, /* Based on Firefox */ {"Camino", "Others"}, /* Rebranded Firefox but is really unmodified * Firefox (Debian trademark policy) */ {"Iceweasel", "Firefox"}, {"Waterfox", "Firefox"}, {"PaleMoon", "Firefox"}, {"Focus", "Firefox"}, /* Klar is the name of Firefox Focus in the German market. */ {"Klar", "Firefox"}, {"Firefox", "Firefox"}, /* Based on Chromium */ {"BeakerBrowser", "Beaker"}, {"Brave", "Brave"}, {"Vivaldi", "Vivaldi"}, {"YaBrowser", "Yandex.Browser"}, /* Chrome has to go before Safari */ {"HeadlessChrome", "Chrome"}, {"Chrome", "Chrome"}, {"CriOS", "Chrome"}, /* Crawlers/Bots (Possible Safari based) */ {"AppleBot", "Crawlers"}, {"facebookexternalhit", "Crawlers"}, {"Twitter", "Crawlers"}, {"Safari", "Safari"}, /* Crawlers/Bots */ {"Slack", "Crawlers"}, {"Sogou", "Crawlers"}, {"Java", "Crawlers"}, {"Jakarta Commons-HttpClient", "Crawlers"}, {"netEstate", "Crawlers"}, {"PiplBot", "Crawlers"}, {"IstellaBot", "Crawlers"}, {"heritrix", "Crawlers"}, {"PagesInventory", "Crawlers"}, {"rogerbot", "Crawlers"}, {"fastbot", "Crawlers"}, {"yacybot", "Crawlers"}, {"PycURL", "Crawlers"}, {"PHP", "Crawlers"}, {"ClaudeBot", "Crawlers"}, {"AndroidDownloadManager", "Crawlers"}, {"Embedly", "Crawlers"}, {"ruby", "Crawlers"}, {"Ruby", "Crawlers"}, {"python", "Crawlers"}, {"Python", "Crawlers"}, {"LinkedIn", "Crawlers"}, {"Microsoft-WebDAV", "Crawlers"}, {"DuckDuckGo", "Crawlers"}, {"bingbot", "Crawlers"}, {"PetalBot", "Crawlers"}, {"Discordbot", "Crawlers"}, {"ZoominfoBot", "Crawlers"}, {"Googlebot", "Crawlers"}, {"DotBot", "Crawlers"}, {"AhrefsBot", "Crawlers"}, {"SemrushBot", "Crawlers"}, {"Adsbot", "Crawlers"}, {"BLEXBot", "Crawlers"}, {"NetcraftSurveyAgent", "Crawlers"}, {"Netcraft Web Server Survey", "Crawlers"}, {"masscan", "Crawlers"}, {"MJ12bot", "Crawlers"}, {"Pandalytics", "Crawlers"}, {"YandexBot", "Crawlers"}, {"Nimbostratus-Bot", "Crawlers"}, {"HTTP Banner Detection", "Crawlers"}, {"Hakai", "Crawlers"}, {"WinHttp.WinHttpRequest.5", "Crawlers"}, {"NetSystemsResearch", "Crawlers"}, {"Nextcloud Server Crawler", "Crawlers"}, {"CFNetwork", "Crawlers"}, {"GoScraper", "Crawlers"}, {"Googlebot-Image", "Crawlers"}, {"ZmEu", "Crawlers"}, {"DowntimeDetector", "Crawlers"}, {"MauiBot", "Crawlers"}, {"Cloud", "Crawlers"}, {"stagefright", "Crawlers"}, {"ImagesiftBot", "Crawlers"}, {"Bytespider", "Crawlers"}, {"ZoteroTranslationServer", "Cralwers"}, /* Nodeja Zotero Translation Server https://github.com/zotero/translation-server */ /* HTTP Library or HTTP Server User Agents - Suggest New Category */ {"axios", "HTTP Library"}, /* NodeJS axios axios-http.com */ {"lua-resty-http", "HTTP Library"}, /* Nginx lua-resty-http module */ /* Citation Services */ {"Citoid", "Citation"}, /* MediaWiki Citoid Citation Service https://www.mediawiki.org/wiki/Citoid */ {"EasyBib", "Citation"}, /* Easybib Citation https://easybib.com */ /* Podcast fetchers */ {"Downcast", "Podcasts"}, {"gPodder", "Podcasts"}, {"Instacast", "Podcasts"}, {"iTunes", "Podcasts"}, {"Miro", "Podcasts"}, {"Pocket Casts", "Podcasts"}, {"BashPodder", "Podcasts"}, /* Feed reader clients */ {"Akregator", "Feeds"}, {"Apple-PubSub", "Feeds"}, {"BTWebClient", "Feeds"}, {"com.apple.Safari.WebFeedParser", "Feeds"}, {"FeedDemon", "Feeds"}, {"Feedy", "Feeds"}, {"Fever", "Feeds"}, {"FreshRSS", "Feeds"}, {"Liferea", "Feeds"}, {"NetNewsWire", "Feeds"}, {"RSSOwl", "Feeds"}, {"Tiny Tiny RSS", "Feeds"}, {"Thunderbird", "Feeds"}, {"Winds", "Feeds"}, /* Uptime and Monitoring clients */ {"Pingdom.com", "Uptime"}, {"jetmon", "Uptime"}, {"NodeUptime", "Uptime"}, {"NewRelicPinger", "Uptime"}, {"StatusCake", "Uptime"}, {"internetVista", "Uptime"}, {"Server Density Service Monitoring v2", "Uptime"}, {"Better Uptime Bot", "Uptime"}, {"Site24x7", "Uptime"}, {"Uptime-Kuma", "Uptime"}, /* Performance and Caching - Suggest a new category */ {"ShortPixel", "Performance"}, /* Image Optimization */ {"WP Rocket", "Caching"}, /* Preloading Cache for WordPress Plugin */ /* Security - Suggest a new category */ {"Barracuda Sentinel", "Security"}, /* Barricuda spear fishing service */ {"ACI Site Scanner", "Security"}, /* Can't confirm specific vendor */ {"Mozilla", "Others"} }; /* Free all browser entries from our array of key/value pairs. */ void free_browsers_hash (void) { size_t i; int j; for (i = 0; i < ARRAY_SIZE (browsers); ++i) { free (browsers_hash[i][0]); free (browsers_hash[i][1]); free (browsers_hash[i]); } free (browsers_hash); for (j = 0; j < conf.browsers_hash_idx; ++j) { free (conf.user_browsers_hash[j][0]); free (conf.user_browsers_hash[j][1]); free (conf.user_browsers_hash[j]); } if (conf.browsers_file) { free (conf.user_browsers_hash); } } static int is_dup (char ***list, int len, const char *browser) { int i; /* check for dups */ for (i = 0; i < len; ++i) { if (strcmp (browser, list[i][0]) == 0) return 1; } return 0; } /* Set a browser/type pair into our multidimensional array of browsers. * * On duplicate functions returns void. * Otherwise memory is mallo'd for our array entry. */ static void set_browser (char ***list, int idx, const char *browser, const char *type) { list[idx] = xcalloc (2, sizeof (char *)); list[idx][0] = xstrdup (browser); list[idx][1] = xstrdup (type); } /* Parse the key/value pair from the browser list file. */ static void parse_browser_token (char ***list, char *line, int n) { char *val; size_t idx = 0; /* key */ idx = strcspn (line, "\t"); if (strlen (line) == idx) FATAL ("Malformed browser name at line: %d", n); line[idx] = '\0'; /* value */ val = line + (idx + 1); idx = strspn (val, "\t"); if (strlen (val) == idx) FATAL ("Malformed browser category at line: %d", n); val = val + idx; val = trim_str (val); if (is_dup (list, conf.browsers_hash_idx, line)) { LOG_INVALID (("Duplicate browser entry: %s", line)); return; } set_browser (list, conf.browsers_hash_idx, line, val); conf.browsers_hash_idx++; } /* Parse our default array of browsers and put them on our hash including those * from the custom parsed browsers file. * * On error functions returns void. * Otherwise browser entries are put into the hash. */ void parse_browsers_file (void) { char line[MAX_LINE_BROWSERS + 1]; FILE *file; int n = 0; size_t i, len = ARRAY_SIZE (browsers); browsers_hash = xmalloc (ARRAY_SIZE (browsers) * sizeof (char **)); /* load hash from the browser's array (default) */ for (i = 0; i < len; ++i) { set_browser (browsers_hash, i, browsers[i][0], browsers[i][1]); } if (!conf.browsers_file) return; /* could not open browsers file */ if ((file = fopen (conf.browsers_file, "r")) == NULL) FATAL ("Unable to open browser's file: %s", strerror (errno)); conf.user_browsers_hash = xmalloc (MAX_CUSTOM_BROWSERS * sizeof (char **)); /* load hash from the user's given browsers file */ while (fgets (line, sizeof line, file) != NULL) { while (line[0] == ' ' || line[0] == '\t') memmove (line, line + 1, strlen (line)); n++; if (line[0] == '\n' || line[0] == '\r' || line[0] == '#') continue; if (conf.browsers_hash_idx >= MAX_CUSTOM_BROWSERS) FATAL ("Maximum number of custom browsers has been reached"); parse_browser_token (conf.user_browsers_hash, line, n); } fclose (file); } /* Determine if the user-agent is a crawler. * * On error or is not a crawler, 0 is returned. * If it is a crawler, 1 is returned . */ int is_crawler (const char *agent) { char btype[BROWSER_TYPE_LEN]; char *browser, *a; if (agent == NULL || *agent == '\0') return 0; if ((a = xstrdup (agent), browser = verify_browser (a, btype)) != NULL) free (browser); free (a); return strcmp (btype, "Crawlers") == 0 ? 1 : 0; } /* Return the Opera 15 and beyond. * * On success, the opera string and version is returned. */ static char * parse_opera (char *token) { char *val = xmalloc (snprintf (NULL, 0, "Opera%s", token) + 1); sprintf (val, "Opera%s", token); return val; } /* Given the original user agent string, and a partial crawler match, iterate * back until the next delimiter is found and return occurrence. * * On error when attempting to extract crawler, NULL is returned. * If a possible crawler string is matched, then possible bot is returned . */ static char * parse_crawler (char *str, char *match, char *type) { char *ptr = NULL; int found = 0; while (match != str) { match--; if (*match == ' ' || *match == '+' || match == str) { found = 1; break; } } /* same addr */ if (!found && match == str) return NULL; /* account for the previous +|space */ if (found && match != str) match++; if ((ptr = strpbrk (match, "; "))) *ptr = '\0'; /* empty string after parsing it */ if (*match == '\0') return NULL; xstrncpy (type, "Crawlers", BROWSER_TYPE_LEN); return xstrdup (match); } /* If the following string matches are found within user agent, then it's * highly likely it's a possible crawler. * Note that this could certainly return false positives. * * If no occurrences are found, NULL is returned. * If an occurrence is found, a pointer to the match is returned . */ static char * check_http_crawler (const char *str) { char *match = NULL; /* e.g., compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm */ if ((match = strstr (str, "; +http"))) return match; /* compatible; UptimeRobot/2.0; http://www.uptimerobot.com/ */ if ((match = strstr (str, "; http"))) return match; /* Slack-ImgProxy (+https://api.slack.com/robots) */ if ((match = strstr (str, " (+http"))) return match; /* TurnitinBot/3.0 (http://www.turnitin.com/robot/crawlerinfo.html) */ if ((match = strstr (str, " (http"))) return match; /* w3c e.g., (compatible;+Googlebot/2.1;++http://www.google.com/bot.html) */ if ((match = strstr (str, ";++http"))) return match; return NULL; } /* Parse the given user agent match and extract the browser string. * * If no match, the original match is returned. * Otherwise the parsed browser is returned. */ static char * parse_browser (char *match, char *type, int i, char ***hash) { char *b = NULL, *ptr = NULL, *slh = NULL; size_t cnt = 0, space = 0; match = char_replace (match, '+', '-'); /* Check if there are spaces in the token string, that way strpbrk * does not stop at the first space within the token string */ if ((cnt = count_matches (hash[i][0], ' ')) && (b = match)) { while (space++ < cnt && (b = strchr (b, ' '))) b++; } else b = match; xstrncpy (type, hash[i][1], BROWSER_TYPE_LEN); /* Internet Explorer 11 */ if (strstr (match, "rv:11") && strstr (match, "Trident/7.0")) { return alloc_string ("MSIE/11.0"); } /* Opera +15 uses OPR/# */ if (strstr (match, "OPR") != NULL && (slh = strrchr (match, '/'))) { return parse_opera (slh); } /* Opera has the version number at the end */ if (strstr (match, "Opera") && (slh = strrchr (match, '/')) && match < slh) { memmove (match + 5, slh, strlen (slh) + 1); } /* IE Old */ if (strstr (match, "MSIE") != NULL) { if ((ptr = strpbrk (match, ";)-")) != NULL) *ptr = '\0'; match = char_replace (match, ' ', '/'); } /* all others */ else if ((ptr = strpbrk (b ? b : match, ";) ")) != NULL) { *ptr = '\0'; } return alloc_string (match); } /* Given a user agent, determine the browser used. * * ###NOTE: The size of the list is proportional to the run time, * which makes this pretty slow * * On error, NULL is returned. * On success, a malloc'd string containing the browser is returned. */ char * verify_browser (char *str, char *type) { char *match = NULL, *token = NULL; int i = 0; size_t j = 0; if (str == NULL || *str == '\0') return NULL; /* check user's list */ for (i = 0; i < conf.browsers_hash_idx; ++i) { if ((match = strstr (str, conf.user_browsers_hash[i][0])) == NULL) continue; return parse_browser (match, type, i, conf.user_browsers_hash); } /* try heuristics */ if ((match = check_http_crawler (str)) && (token = parse_crawler (str, match, type))) return token; /* fallback to default browser list */ for (j = 0; j < ARRAY_SIZE (browsers); ++j) { if ((match = strstr (str, browsers_hash[j][0])) == NULL) continue; return parse_browser (match, type, j, browsers_hash); } if (conf.unknowns_log) LOG_UNKNOWNS (("%-7s%s\n", "[BR]", str)); if (conf.unknowns_as_crawlers && strcmp (type, "Crawlers")) xstrncpy (type, "Crawlers", BROWSER_TYPE_LEN); else xstrncpy (type, "Unknown", BROWSER_TYPE_LEN); return alloc_string ("Unknown"); } goaccess-1.9.3/Makefile.in0000644000175000017300000015306414626466504011065 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = goaccess$(EXEEXT) noinst_PROGRAMS = bin2c$(EXEEXT) @USE_SHA1_TRUE@am__append_1 = \ @USE_SHA1_TRUE@ src/sha1.c \ @USE_SHA1_TRUE@ src/sha1.h @USE_MMAP_TRUE@am__append_2 = \ @USE_MMAP_TRUE@ src/win/mman.h \ @USE_MMAP_TRUE@ src/win/mmap.c @GEOIP_LEGACY_TRUE@am__append_3 = \ @GEOIP_LEGACY_TRUE@ src/geoip1.c \ @GEOIP_LEGACY_TRUE@ src/geoip1.h @GEOIP_MMDB_TRUE@am__append_4 = \ @GEOIP_MMDB_TRUE@ src/geoip2.c \ @GEOIP_MMDB_TRUE@ src/geoip1.h @WITH_ASAN_TRUE@am__append_5 = -fsanitize=address subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_conf_DATA) $(dist_noinst_DATA) \ $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(confdir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am__dirstamp = $(am__leading_dot)dirstamp am_bin2c_OBJECTS = src/bin2c.$(OBJEXT) bin2c_OBJECTS = $(am_bin2c_OBJECTS) bin2c_LDADD = $(LDADD) am__goaccess_SOURCES_DIST = src/base64.c src/base64.h src/browsers.c \ src/browsers.h src/color.c src/color.h src/commons.c \ src/commons.h src/csv.c src/csv.h src/error.c src/error.h \ src/gdashboard.c src/gdashboard.h src/gdns.c src/gdns.h \ src/gholder.c src/gholder.h src/gkhash.c src/gkhash.h \ src/gkmhash.c src/gkmhash.h src/gmenu.c src/gmenu.h \ src/goaccess.c src/goaccess.h src/gslist.c src/gslist.h \ src/gstorage.c src/gstorage.h src/gwsocket.c src/gwsocket.h \ src/json.c src/json.h src/khash.h src/labels.h src/opesys.c \ src/opesys.h src/options.c src/options.h src/output.c \ src/output.h src/parser.c src/parser.h src/persistence.c \ src/persistence.h src/pdjson.c src/pdjson.h src/settings.c \ src/settings.h src/sort.c src/sort.h src/tpl.c src/tpl.h \ src/ui.c src/ui.h src/util.c src/util.h src/websocket.c \ src/websocket.h src/xmalloc.c src/xmalloc.h src/sha1.c \ src/sha1.h src/win/mman.h src/win/mmap.c src/geoip1.c \ src/geoip1.h src/geoip2.c @USE_SHA1_TRUE@am__objects_1 = src/sha1.$(OBJEXT) @USE_MMAP_TRUE@am__objects_2 = src/win/mmap.$(OBJEXT) @GEOIP_LEGACY_TRUE@am__objects_3 = src/geoip1.$(OBJEXT) @GEOIP_MMDB_TRUE@am__objects_4 = src/geoip2.$(OBJEXT) am_goaccess_OBJECTS = src/base64.$(OBJEXT) src/browsers.$(OBJEXT) \ src/color.$(OBJEXT) src/commons.$(OBJEXT) src/csv.$(OBJEXT) \ src/error.$(OBJEXT) src/gdashboard.$(OBJEXT) \ src/gdns.$(OBJEXT) src/gholder.$(OBJEXT) src/gkhash.$(OBJEXT) \ src/gkmhash.$(OBJEXT) src/gmenu.$(OBJEXT) \ src/goaccess.$(OBJEXT) src/gslist.$(OBJEXT) \ src/gstorage.$(OBJEXT) src/gwsocket.$(OBJEXT) \ src/json.$(OBJEXT) src/opesys.$(OBJEXT) src/options.$(OBJEXT) \ src/output.$(OBJEXT) src/parser.$(OBJEXT) \ src/persistence.$(OBJEXT) src/pdjson.$(OBJEXT) \ src/settings.$(OBJEXT) src/sort.$(OBJEXT) src/tpl.$(OBJEXT) \ src/ui.$(OBJEXT) src/util.$(OBJEXT) src/websocket.$(OBJEXT) \ src/xmalloc.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) goaccess_OBJECTS = $(am_goaccess_OBJECTS) goaccess_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = src/$(DEPDIR)/base64.Po src/$(DEPDIR)/bin2c.Po \ src/$(DEPDIR)/browsers.Po src/$(DEPDIR)/color.Po \ src/$(DEPDIR)/commons.Po src/$(DEPDIR)/csv.Po \ src/$(DEPDIR)/error.Po src/$(DEPDIR)/gdashboard.Po \ src/$(DEPDIR)/gdns.Po src/$(DEPDIR)/geoip1.Po \ src/$(DEPDIR)/geoip2.Po src/$(DEPDIR)/gholder.Po \ src/$(DEPDIR)/gkhash.Po src/$(DEPDIR)/gkmhash.Po \ src/$(DEPDIR)/gmenu.Po src/$(DEPDIR)/goaccess.Po \ src/$(DEPDIR)/gslist.Po src/$(DEPDIR)/gstorage.Po \ src/$(DEPDIR)/gwsocket.Po src/$(DEPDIR)/json.Po \ src/$(DEPDIR)/opesys.Po src/$(DEPDIR)/options.Po \ src/$(DEPDIR)/output.Po src/$(DEPDIR)/parser.Po \ src/$(DEPDIR)/pdjson.Po src/$(DEPDIR)/persistence.Po \ src/$(DEPDIR)/settings.Po src/$(DEPDIR)/sha1.Po \ src/$(DEPDIR)/sort.Po src/$(DEPDIR)/tpl.Po src/$(DEPDIR)/ui.Po \ src/$(DEPDIR)/util.Po src/$(DEPDIR)/websocket.Po \ src/$(DEPDIR)/xmalloc.Po src/win/$(DEPDIR)/mmap.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(bin2c_SOURCES) $(goaccess_SOURCES) DIST_SOURCES = $(bin2c_SOURCES) $(am__goaccess_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) DATA = $(dist_conf_DATA) $(dist_noinst_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ $(top_srcdir)/src/config.h.in ABOUT-NLS AUTHORS COPYING \ ChangeLog INSTALL NEWS README.md TODO compile config.guess \ config.rpath config.sub depcomp install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ SED = @SED@ SED_CHECK = @SED_CHECK@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TR_CHECK = @TR_CHECK@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = subdir-objects dist_noinst_DATA = \ resources/tpls.html \ resources/css/app.css \ resources/css/bootstrap.min.css \ resources/css/fa.min.css \ resources/js/app.js \ resources/js/charts.js \ resources/countries-110m.json \ resources/js/d3.v7.min.js \ resources/js/topojson.v3.min.js \ resources/js/hogan.min.js bin2c_SOURCES = src/bin2c.c BUILT_SOURCES = \ src/tpls.h \ src/bootstrapcss.h \ src/facss.h \ src/appcss.h \ src/d3js.h \ src/topojsonjs.h \ src/hoganjs.h \ src/countries110m.h \ src/chartsjs.h \ src/appjs.h CLEANFILES = \ src/tpls.h \ src/bootstrapcss.h \ src/facss.h \ src/appcss.h \ src/d3js.h \ src/topojsonjs.h \ src/hoganjs.h \ src/countries110m.h \ src/chartsjs.h \ src/appjs.h \ resources/tpls.html.tmp \ resources/countries-110m.json.tmp \ resources/css/bootstrap.min.css.tmp \ resources/css/fa.min.css.tmp \ resources/css/app.css.tmp \ resources/js/d3.v7.min.js.tmp \ resources/js/topojson.v3.min.js.tmp \ resources/js/hogan.min.js.tmp \ resources/js/charts.js.tmp \ resources/js/app.js.tmp confdir = $(sysconfdir)/goaccess dist_conf_DATA = config/goaccess.conf config/browsers.list \ config/podcast.list goaccess_SOURCES = src/base64.c src/base64.h src/browsers.c \ src/browsers.h src/color.c src/color.h src/commons.c \ src/commons.h src/csv.c src/csv.h src/error.c src/error.h \ src/gdashboard.c src/gdashboard.h src/gdns.c src/gdns.h \ src/gholder.c src/gholder.h src/gkhash.c src/gkhash.h \ src/gkmhash.c src/gkmhash.h src/gmenu.c src/gmenu.h \ src/goaccess.c src/goaccess.h src/gslist.c src/gslist.h \ src/gstorage.c src/gstorage.h src/gwsocket.c src/gwsocket.h \ src/json.c src/json.h src/khash.h src/labels.h src/opesys.c \ src/opesys.h src/options.c src/options.h src/output.c \ src/output.h src/parser.c src/parser.h src/persistence.c \ src/persistence.h src/pdjson.c src/pdjson.h src/settings.c \ src/settings.h src/sort.c src/sort.h src/tpl.c src/tpl.h \ src/ui.c src/ui.h src/util.c src/util.h src/websocket.c \ src/websocket.h src/xmalloc.c src/xmalloc.h $(am__append_1) \ $(am__append_2) $(am__append_3) $(am__append_4) @DEBUG_FALSE@AM_CFLAGS = -O2 -DSYSCONFDIR=\"$(sysconfdir)\" -Wall \ @DEBUG_FALSE@ -Wextra -Wnested-externs -Wformat=2 -g \ @DEBUG_FALSE@ -Wmissing-prototypes -Wstrict-prototypes \ @DEBUG_FALSE@ -Wmissing-declarations -Wwrite-strings -Wshadow \ @DEBUG_FALSE@ -Wpointer-arith -Wsign-compare \ @DEBUG_FALSE@ -Wbad-function-cast -Wcast-align \ @DEBUG_FALSE@ -Wdeclaration-after-statement -Wshadow \ @DEBUG_FALSE@ -Wold-style-definition $(am__append_5) @DEBUG_TRUE@AM_CFLAGS = -DDEBUG -O0 -DSYSCONFDIR=\"$(sysconfdir)\" \ @DEBUG_TRUE@ -Wall -Wextra -Wnested-externs -Wformat=2 -g \ @DEBUG_TRUE@ -Wmissing-prototypes -Wstrict-prototypes \ @DEBUG_TRUE@ -Wmissing-declarations -Wwrite-strings -Wshadow \ @DEBUG_TRUE@ -Wpointer-arith -Wsign-compare -Wbad-function-cast \ @DEBUG_TRUE@ -Wcast-align -Wdeclaration-after-statement \ @DEBUG_TRUE@ -Wshadow -Wold-style-definition $(am__append_5) @WITH_RDYNAMIC_TRUE@AM_LDFLAGS = -rdynamic dist_man_MANS = goaccess.1 SUBDIRS = po ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = config.rpath all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): src/config.h: src/stamp-h1 @test -f $@ || rm -f src/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) src/stamp-h1 src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status @rm -f src/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(top_srcdir)/src/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f src/stamp-h1 touch $@ distclean-hdr: -rm -f src/config.h src/stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/bin2c.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) bin2c$(EXEEXT): $(bin2c_OBJECTS) $(bin2c_DEPENDENCIES) $(EXTRA_bin2c_DEPENDENCIES) @rm -f bin2c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bin2c_OBJECTS) $(bin2c_LDADD) $(LIBS) src/base64.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/browsers.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/color.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/commons.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/csv.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/error.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/gdashboard.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gdns.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/gholder.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gkhash.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gkmhash.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gmenu.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/goaccess.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gslist.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gstorage.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/gwsocket.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/json.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/opesys.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/options.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/output.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/persistence.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/pdjson.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/settings.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sort.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/tpl.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/ui.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/util.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/websocket.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/xmalloc.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sha1.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/win/$(am__dirstamp): @$(MKDIR_P) src/win @: > src/win/$(am__dirstamp) src/win/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/win/$(DEPDIR) @: > src/win/$(DEPDIR)/$(am__dirstamp) src/win/mmap.$(OBJEXT): src/win/$(am__dirstamp) \ src/win/$(DEPDIR)/$(am__dirstamp) src/geoip1.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/geoip2.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) goaccess$(EXEEXT): $(goaccess_OBJECTS) $(goaccess_DEPENDENCIES) $(EXTRA_goaccess_DEPENDENCIES) @rm -f goaccess$(EXEEXT) $(AM_V_CCLD)$(LINK) $(goaccess_OBJECTS) $(goaccess_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f src/*.$(OBJEXT) -rm -f src/win/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/base64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/bin2c.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/browsers.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/color.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/commons.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/csv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/error.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gdashboard.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gdns.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/geoip1.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/geoip2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gholder.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gkhash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gkmhash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gmenu.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/goaccess.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gslist.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gstorage.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/gwsocket.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/json.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/opesys.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/options.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/output.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/parser.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/pdjson.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/persistence.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/settings.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sha1.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sort.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/tpl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ui.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/util.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/websocket.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xmalloc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/win/$(DEPDIR)/mmap.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(dist_man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-dist_confDATA: $(dist_conf_DATA) @$(NORMAL_INSTALL) @list='$(dist_conf_DATA)'; test -n "$(confdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(confdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(confdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(confdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(confdir)" || exit $$?; \ done uninstall-dist_confDATA: @$(NORMAL_UNINSTALL) @list='$(dist_conf_DATA)'; test -n "$(confdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(confdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(confdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) -rm -f src/win/$(DEPDIR)/$(am__dirstamp) -rm -f src/win/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f src/$(DEPDIR)/base64.Po -rm -f src/$(DEPDIR)/bin2c.Po -rm -f src/$(DEPDIR)/browsers.Po -rm -f src/$(DEPDIR)/color.Po -rm -f src/$(DEPDIR)/commons.Po -rm -f src/$(DEPDIR)/csv.Po -rm -f src/$(DEPDIR)/error.Po -rm -f src/$(DEPDIR)/gdashboard.Po -rm -f src/$(DEPDIR)/gdns.Po -rm -f src/$(DEPDIR)/geoip1.Po -rm -f src/$(DEPDIR)/geoip2.Po -rm -f src/$(DEPDIR)/gholder.Po -rm -f src/$(DEPDIR)/gkhash.Po -rm -f src/$(DEPDIR)/gkmhash.Po -rm -f src/$(DEPDIR)/gmenu.Po -rm -f src/$(DEPDIR)/goaccess.Po -rm -f src/$(DEPDIR)/gslist.Po -rm -f src/$(DEPDIR)/gstorage.Po -rm -f src/$(DEPDIR)/gwsocket.Po -rm -f src/$(DEPDIR)/json.Po -rm -f src/$(DEPDIR)/opesys.Po -rm -f src/$(DEPDIR)/options.Po -rm -f src/$(DEPDIR)/output.Po -rm -f src/$(DEPDIR)/parser.Po -rm -f src/$(DEPDIR)/pdjson.Po -rm -f src/$(DEPDIR)/persistence.Po -rm -f src/$(DEPDIR)/settings.Po -rm -f src/$(DEPDIR)/sha1.Po -rm -f src/$(DEPDIR)/sort.Po -rm -f src/$(DEPDIR)/tpl.Po -rm -f src/$(DEPDIR)/ui.Po -rm -f src/$(DEPDIR)/util.Po -rm -f src/$(DEPDIR)/websocket.Po -rm -f src/$(DEPDIR)/xmalloc.Po -rm -f src/win/$(DEPDIR)/mmap.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dist_confDATA install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f src/$(DEPDIR)/base64.Po -rm -f src/$(DEPDIR)/bin2c.Po -rm -f src/$(DEPDIR)/browsers.Po -rm -f src/$(DEPDIR)/color.Po -rm -f src/$(DEPDIR)/commons.Po -rm -f src/$(DEPDIR)/csv.Po -rm -f src/$(DEPDIR)/error.Po -rm -f src/$(DEPDIR)/gdashboard.Po -rm -f src/$(DEPDIR)/gdns.Po -rm -f src/$(DEPDIR)/geoip1.Po -rm -f src/$(DEPDIR)/geoip2.Po -rm -f src/$(DEPDIR)/gholder.Po -rm -f src/$(DEPDIR)/gkhash.Po -rm -f src/$(DEPDIR)/gkmhash.Po -rm -f src/$(DEPDIR)/gmenu.Po -rm -f src/$(DEPDIR)/goaccess.Po -rm -f src/$(DEPDIR)/gslist.Po -rm -f src/$(DEPDIR)/gstorage.Po -rm -f src/$(DEPDIR)/gwsocket.Po -rm -f src/$(DEPDIR)/json.Po -rm -f src/$(DEPDIR)/opesys.Po -rm -f src/$(DEPDIR)/options.Po -rm -f src/$(DEPDIR)/output.Po -rm -f src/$(DEPDIR)/parser.Po -rm -f src/$(DEPDIR)/pdjson.Po -rm -f src/$(DEPDIR)/persistence.Po -rm -f src/$(DEPDIR)/settings.Po -rm -f src/$(DEPDIR)/sha1.Po -rm -f src/$(DEPDIR)/sort.Po -rm -f src/$(DEPDIR)/tpl.Po -rm -f src/$(DEPDIR)/ui.Po -rm -f src/$(DEPDIR)/util.Po -rm -f src/$(DEPDIR)/websocket.Po -rm -f src/$(DEPDIR)/xmalloc.Po -rm -f src/win/$(DEPDIR)/mmap.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-dist_confDATA \ uninstall-man uninstall-man: uninstall-man1 .MAKE: $(am__recursive_targets) all check install install-am \ install-exec install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles am--refresh check check-am clean \ clean-binPROGRAMS clean-cscope clean-generic \ clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ install-dist_confDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-dist_confDATA uninstall-man uninstall-man1 .PRECIOUS: Makefile # Tpls src/tpls.h: bin2c$(EXEEXT) $(srcdir)/resources/tpls.html @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/tpls.html.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/tpls.html.tmp src/tpls.h tpls @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/tpls.html src/tpls.h tpls # countries.json src/countries110m.h: bin2c$(EXEEXT) $(srcdir)/resources/countries-110m.json @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/countries-110m.json | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/countries-110m.json.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/countries-110m.json.tmp src/countries110m.h countries_json @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/countries-110m.json src/countries110m.h countries_json # Bootstrap src/bootstrapcss.h: bin2c$(EXEEXT) $(srcdir)/resources/css/bootstrap.min.css @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/css/bootstrap.min.css.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/css/bootstrap.min.css src/bootstrapcss.h bootstrap_css # Font Awesome src/facss.h: bin2c$(EXEEXT) $(srcdir)/resources/css/fa.min.css @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/css/fa.min.css.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/css/fa.min.css.tmp src/facss.h fa_css @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/css/fa.min.css src/facss.h fa_css # App.css src/appcss.h: bin2c$(EXEEXT) $(srcdir)/resources/css/app.css @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/css/app.css.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/css/app.css.tmp src/appcss.h app_css @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/css/app.css src/appcss.h app_css # D3.js src/d3js.h: bin2c$(EXEEXT) $(srcdir)/resources/js/d3.v7.min.js @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/js/d3.v7.min.js | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/d3.v7.min.js.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/js/d3.v7.min.js.tmp src/d3js.h d3_js @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/js/d3.v7.min.js src/d3js.h d3_js # topojson.js src/topojsonjs.h: bin2c$(EXEEXT) $(srcdir)/resources/js/topojson.v3.min.js @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/js/topojson.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/topojson.v3.min.js.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/js/topojson.v3.min.js.tmp src/topojsonjs.h topojson_js @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/js/topojson.v3.min.js src/topojsonjs.h topojson_js # Hogan.js src/hoganjs.h: bin2c$(EXEEXT) $(srcdir)/resources/js/hogan.min.js @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/js/hogan.min.js | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/hogan.min.js.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/js/hogan.min.js.tmp src/hoganjs.h hogan_js @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/js/hogan.min.js src/hoganjs.h hogan_js # Charts.js src/chartsjs.h: bin2c$(EXEEXT) $(srcdir)/resources/js/charts.js @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/js/charts.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/charts.js.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/js/charts.js.tmp src/chartsjs.h charts_js @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/js/charts.js src/chartsjs.h charts_js @DEBUG_TRUE@ ./bin2c $(srcdir)/resources/js/charts.js src/chartsjs.h charts_js # App.js src/appjs.h: bin2c$(EXEEXT) $(srcdir)/resources/js/app.js @HAS_SEDTR_TRUE@ cat $(srcdir)/resources/js/app.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/app.js.tmp @HAS_SEDTR_TRUE@ ./bin2c $(srcdir)/resources/js/app.js.tmp src/appjs.h app_js @HAS_SEDTR_FALSE@ ./bin2c $(srcdir)/resources/js/app.js src/appjs.h app_js @DEBUG_TRUE@ ./bin2c $(srcdir)/resources/js/app.js src/appjs.h app_js # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: goaccess-1.9.3/config/0000755000175000017300000000000014626467007010333 5goaccess-1.9.3/config/goaccess.conf0000644000175000017300000005114114624360252012703 ###################################### # Time Format Options (required) ###################################### # # The hour (24-hour clock) [00,23]; leading zeros are permitted but not required. # The minute [00,59]; leading zeros are permitted but not required. # The seconds [00,60]; leading zeros are permitted but not required. # See `man strftime` for more details # # The following time format works with any of the # Apache/NGINX's log formats below. # #time-format %H:%M:%S # # Google Cloud Storage or # The time in microseconds since the Unix epoch. # #time-format %f # Squid native log format # #time-format %s ###################################### # Date Format Options (required) ###################################### # # The date-format variable followed by a space, specifies # the log format date containing any combination of regular # characters and special format specifiers. They all begin with a # percentage (%) sign. See `man strftime` # # The following date format works with any of the # Apache/NGINX's log formats below. # #date-format %d/%b/%Y # # AWS | Amazon CloudFront (Download Distribution) # AWS | Elastic Load Balancing # W3C (IIS) # #date-format %Y-%m-%d # # Google Cloud Storage or # The time in microseconds since the Unix epoch. # #date-format %f # Squid native log format # Caddy # #date-format %s ###################################### # Date/Time Format Option ###################################### # # The datetime-format variable followed by a space, specifies # the log format date and time containing any combination of regular # characters and special format specifiers. They all begin with a # percentage (%) sign. See `man strftime` # # This gives the ability to get the timezone from a request and # convert it to another timezone for output. See --tz= in # the man page. # #datetime-format %d/%b/%Y:%H:%M:%S %z ###################################### # Log Format Options (required) ###################################### # # The log-format variable followed by a space or \t for # tab-delimited, specifies the log format string. # # NOTE: If the time/date is a timestamp in seconds or microseconds # %x must be used instead of %d & %t to represent the date & time. # NCSA Combined Log Format #log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u" # NCSA Combined Log Format with Virtual Host #log-format %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u" # Common Log Format (CLF) #log-format %h %^[%d:%t %^] "%r" %s %b # Common Log Format (CLF) with Virtual Host #log-format %v:%^ %h %^[%d:%t %^] "%r" %s %b # W3C #log-format %d %t %h %^ %^ %^ %^ %r %^ %s %b %^ %^ %u %R # Squid native log format #log-format %^ %^ %^ %v %^: %x.%^ %~%L %h %^/%s %b %m %U # AWS | Amazon CloudFront (Download Distribution) #log-format %d\t%t\t%^\t%b\t%h\t%m\t%^\t%r\t%s\t%R\t%u\t%^ # Google Cloud Storage #log-format "%x","%h",%^,%^,"%m","%U","%s",%^,"%b","%D",%^,"%R","%u" # AWS | Elastic Load Balancing #log-format %dT%t.%^ %^ %h:%^ %^ %T %^ %^ %^ %s %^ %b "%r" "%u" # AWSS3 | Amazon Simple Storage Service (S3) #log-format %^[%d:%t %^] %h %^"%r" %s %^ %b %^ %L %^ "%R" "%u" # Virtualmin Log Format with Virtual Host #log-format %h %^ %v %^[%d:%t %^] "%r" %s %b "%R" "%u" # Kubernetes Nginx Ingress Log Format #log-format %^ %^ [%h] %^ %^ [%d:%t %^] "%r" %s %b "%R" "%u" %^ %^ [%v] %^:%^ %^ %T %^ %^ # CADDY JSON Structured #log-format {"ts":"%x.%^","request":{"client_ip":"%h","proto":"%H","method":"%m","host":"%v","uri":"%U","headers":{"User-Agent":["%u"],"Referer":["%R"]},"tls":{"cipher_suite":"%k","proto": "%K"}},"duration": "%T","size": "%b","status": "%s","resp_headers":{"Content-Type":["%M"]}} # Traefik CLF flavor #log-format %h - %e [%d:%t %^] "%r" %s %b "%R" "%u" %^ "%v" "%U" %Lms # In addition to specifying the raw log/date/time formats, for # simplicity, any of the following predefined log format names can be # supplied to the log/date/time-format variables. GoAccess can also # handle one predefined name in one variable and another predefined # name in another variable. # #log-format COMBINED #log-format VCOMBINED #log-format COMMON #log-format VCOMMON #log-format W3C #log-format SQUID #log-format CLOUDFRONT #log-format CLOUDSTORAGE #log-format AWSELB #log-format AWSS3 #log-format CADDY #log-format TRAEFIKCLF ###################################### # UI Options ###################################### # Choose among color schemes # 1 : Monochrome # 2 : Green # 3 : Monokai (if 256-colors supported) # #color-scheme 3 # Prompt log/date configuration window on program start. # config-dialog false # Color highlight active panel. # hl-header true # Specify a custom CSS file in the HTML report. # #html-custom-css /path/file.css # Specify a custom JS file in the HTML report. # #html-custom-js /path/file.js # Set default HTML preferences. # # NOTE: A valid JSON object is required. # DO NOT USE A MULTILINE JSON OBJECT. # The parser will only parse the value next to `html-prefs` (single line) # It allows the ability to customize each panel plot. See example below. # #html-prefs {"theme":"bright","perPage":5,"layout":"horizontal","showTables":true,"visitors":{"plot":{"chartType":"bar"}}} # Set HTML report page title and header. # #html-report-title My Awesome Web Stats # Format JSON output using tabs and newlines. # json-pretty-print false # Turn off colored output. This is the default output on # terminals that do not support colors. # true : for no color output # false : use color-scheme # no-color false # Don't write column names in the terminal output. By default, it displays # column names for each available metric in every panel. # no-column-names false # Disable summary metrics on the CSV output. # no-csv-summary false # Disable progress metrics. # no-progress false # Disable scrolling through panels on TAB. # no-tab-scroll false # Disable progress metrics and parsing spinner. # #no-parsing-spinner true # Do not show the last updated field displayed in the HTML generated report. # #no-html-last-updated true # Outputs the report date/time data in the given timezone. Note that it # uses the canonical timezone name. See --datetime-format in order to # properly specify a timezone in the date/time format. # #tz Europe/Berlin # Enable mouse support on main dashboard. # with-mouse false # Maximum number of items to show per panel. # Note: Only the CSV and JSON outputs allow a maximum greater than the # default value of 366. # #max-items 366 # Custom colors for the terminal output # Tailor GoAccess to suit your own tastes. # # Color Syntax: # DEFINITION space/tab colorFG#:colorBG# [[attributes,] PANEL] # # FG# = foreground color number [-1...255] (-1 = default terminal color) # BG# = background color number [-1...255] (-1 = default terminal color) # # Optionally: # # It is possible to apply color attributes, such as: # bold,underline,normal,reverse,blink. # Multiple attributes are comma separated # # If desired, it is possible to apply custom colors per panel, that is, a # metric in the REQUESTS panel can be of color A, while the same metric in the # BROWSERS panel can be of color B. # # The following is a 256 color scheme (hybrid palette) # #color COLOR_MTRC_HITS color110:color-1 #color COLOR_MTRC_VISITORS color173:color-1 #color COLOR_MTRC_DATA color221:color-1 #color COLOR_MTRC_BW color167:color-1 #color COLOR_MTRC_AVGTS color143:color-1 #color COLOR_MTRC_CUMTS color247:color-1 #color COLOR_MTRC_MAXTS color186:color-1 #color COLOR_MTRC_PROT color109:color-1 #color COLOR_MTRC_MTHD color139:color-1 #color COLOR_MTRC_HITS_PERC color186:color-1 #color COLOR_MTRC_HITS_PERC_MAX color139:color-1 #color COLOR_MTRC_HITS_PERC_MAX color139:color-1 VISITORS #color COLOR_MTRC_HITS_PERC_MAX color139:color-1 OS #color COLOR_MTRC_HITS_PERC_MAX color139:color-1 BROWSERS #color COLOR_MTRC_HITS_PERC_MAX color139:color-1 VISIT_TIMES #color COLOR_MTRC_VISITORS_PERC color186:color-1 #color COLOR_MTRC_VISITORS_PERC_MAX color139:color-1 #color COLOR_PANEL_COLS color243:color-1 #color COLOR_BARS color250:color-1 #color COLOR_ERROR color231:color167 #color COLOR_SELECTED color7:color167 #color COLOR_PANEL_ACTIVE color7:color237 #color COLOR_PANEL_HEADER color250:color235 #color COLOR_PANEL_DESC color242:color-1 #color COLOR_OVERALL_LBLS color243:color-1 #color COLOR_OVERALL_VALS color167:color-1 #color COLOR_OVERALL_PATH color186:color-1 #color COLOR_ACTIVE_LABEL color139:color235 bold underline #color COLOR_BG color250:color-1 #color COLOR_DEFAULT color243:color-1 #color COLOR_PROGRESS color7:color110 ###################################### # Server Options ###################################### # Specify IP address to bind server to. # #addr 0.0.0.0 # Run GoAccess as daemon (if --real-time-html enabled). # #daemonize false # Ensure clients send the specified origin header upon the WebSocket # handshake. # #origin http://example.org # The port to which the connection is being attempted to connect. # By default GoAccess' WebSocket server listens on port 7890 # See man page or http://gwsocket.io for details. # #port 7890 # Write the PID to a file when used along the daemonize option. # #pid-file /var/run/goaccess.pid # Enable real-time HTML output. # #real-time-html true # Path to TLS/SSL certificate. # Note that ssl-cert and ssl-key need to be used to enable TLS/SSL. # #ssl-cert /path/ssl/domain.crt # Path to TLS/SSL private key. # Note that ssl-cert and ssl-key need to be used to enable TLS/SSL. # #ssl-key /path/ssl/domain.key # URL to which the WebSocket server responds. This is the URL supplied # to the WebSocket constructor on the client side. # # Optionally, it is possible to specify the WebSocket URI scheme, such as ws:// # or wss:// for unencrypted and encrypted connections. # e.g., ws-url wss://goaccess.io # # If GoAccess is running behind a proxy, you could set the client side # to connect to a different port by specifying the host followed by a # colon and the port. # e.g., ws-url goaccess.io:9999 # # By default, it will attempt to connect to localhost. If GoAccess is # running on a remote server, the host of the remote server should be # specified here. Also, make sure it is a valid host and NOT an http # address. # #ws-url goaccess.io # Path to read named pipe (FIFO). # #fifo-in /tmp/wspipein.fifo # Path to write named pipe (FIFO). # #fifo-out /tmp/wspipeout.fifo ###################################### # File Options ###################################### # Specify the path to the input log file. If set, it will take # priority over -f from the command line. # #log-file /var/log/apache2/access.log # Send all debug messages to the specified file. # #debug-file debug.log # Specify a custom configuration file to use. If set, it will take # priority over the global configuration file (if any). # #config-file # Log invalid requests to the specified file. # #invalid-requests # Do not load the global configuration file. # #no-global-config false ###################################### # Parse Options ###################################### # Enable a list of user-agents by host. For faster parsing, do not # enable this flag. # agent-list false # Enable IP resolver on HTML|JSON|CSV output. # with-output-resolver false # Exclude an IPv4 or IPv6 from being counted. # Ranges can be included as well using a dash in between # the IPs (start-end). # #exclude-ip 127.0.0.1 #exclude-ip 192.168.0.1-192.168.0.100 #exclude-ip ::1 #exclude-ip 0:0:0:0:0:ffff:808:804-0:0:0:0:0:ffff:808:808 # Include HTTP request method if found. This will create a # request key containing the request method + the actual request. # # [default: yes] # http-method yes # Include HTTP request protocol if found. This will create a # request key containing the request protocol + the actual request. # # [default: yes] # http-protocol yes # Write output to stdout given one of the following files and the # corresponding extension for the output format: # # /path/file.csv - Comma-separated values (CSV) # /path/file.json - JSON (JavaScript Object Notation) # /path/file.html - HTML # # output /path/file.html # Ignore request's query string. # i.e., www.google.com/page.htm?query => www.google.com/page.htm # # Note: Removing the query string can greatly decrease memory # consumption, especially on timestamped requests. # no-query-string false # Disable IP resolver on terminal output. # no-term-resolver false # Treat non-standard status code 444 as 404. # 444-as-404 false # Add 4xx client errors to the unique visitors count. # 4xx-to-unique-count false # IP address anonymization # The IP anonymization option sets the last octet of IPv4 user IP addresses and # the last 80 bits of IPv6 addresses to zeros. # e.g., 192.168.20.100 => 192.168.20.0 # e.g., 2a03:2880:2110:df07:face:b00c::1 => 2a03:2880:2110:df07:: # #anonymize-ip false # Include static files that contain a query string in the static files # panel. # e.g., /fonts/fontawesome-webfont.woff?v=4.0.3 # all-static-files false # Include an additional delimited list of browsers/crawlers/feeds etc. # See config/browsers.list for an example or # https://raw.githubusercontent.com/allinurl/goaccess/master/config/browsers.list # #browsers-file # Date specificity. Possible values: `date` (default), or `hr` or `min`. # #date-spec hr|min # Decode double-encoded values. # double-decode false # Enable parsing/displaying the given panel. # #enable-panel VISITORS #enable-panel REQUESTS #enable-panel REQUESTS_STATIC #enable-panel NOT_FOUND #enable-panel HOSTS #enable-panel OS #enable-panel BROWSERS #enable-panel VISIT_TIMES #enable-panel VIRTUAL_HOSTS #enable-panel REFERRERS #enable-panel REFERRING_SITES #enable-panel KEYPHRASES #enable-panel STATUS_CODES #enable-panel REMOTE_USER #enable-panel CACHE_STATUS #enable-panel GEO_LOCATION #enable-panel MIME_TYPE #enable-panel TLS_TYPE # Hide a referrer but still count it. Wild cards are allowed. i.e., *.bing.com # #hide-referrer *.google.com #hide-referrer bing.com # Hour specificity. Possible values: `hr` (default), or `min` (tenth # of a minute). # #hour-spec min # Ignore crawlers from being counted. # This will ignore robots listed under browsers.c # Note that it will count them towards the total # number of requests, but excluded from any of the panels. # ignore-crawlers false # Parse and display crawlers only. # This will ignore all hosts except robots listed under browsers.c # Note that it will count them towards the total # number of requests, but excluded from any of the panels. # crawlers-only false # Unknown browsers and OS are considered as crawlers # unknowns-as-crawlers false # Ignore static file requests. # req : Only ignore request from valid requests # panels : Ignore request from panels. # Note that it will count them towards the total number of requests # ignore-statics req # Ignore parsing and displaying the given panel. # #ignore-panel VISITORS #ignore-panel REQUESTS #ignore-panel REQUESTS_STATIC #ignore-panel NOT_FOUND #ignore-panel HOSTS #ignore-panel OS #ignore-panel BROWSERS #ignore-panel VISIT_TIMES #ignore-panel VIRTUAL_HOSTS ignore-panel REFERRERS #ignore-panel REFERRING_SITES ignore-panel KEYPHRASES #ignore-panel STATUS_CODES #ignore-panel REMOTE_USER #ignore-panel CACHE_STATUS #ignore-panel GEO_LOCATION #ignore-panel MIME_TYPE #ignore-panel TLS_TYPE # Ignore referrers from being counted. # This supports wild cards. For instance, # '*' matches 0 or more characters (including spaces) # '?' matches exactly one character # #ignore-referrer *.domain.com #ignore-referrer ww?.domain.* # Ignore parsing and displaying one or multiple status code(s) # #ignore-status 400 #ignore-status 502 # Keep the last specified number of days in storage. This will recycle the # storage tables. e.g., keep & show only the last 7 days. # # keep-last 7 # Disable client IP validation. Useful if IP addresses have been # obfuscated before being logged. # # no-ip-validation true # Number of lines from the access log to test against the provided # log/date/time format. By default, the parser is set to test 10 # lines. If set to 0, the parser won't test any lines and will parse # the whole access log. # #num-tests 10 # Parse log and exit without outputting data. # #process-and-exit false # Display real OS names. e.g, Windows XP, Snow Leopard. # real-os true # Sort panel on initial load. # Sort options are separated by comma. # Options are in the form: PANEL,METRIC,ORDER # # Available metrics: # BY_HITS - Sort by hits # BY_VISITORS - Sort by unique visitors # BY_DATA - Sort by data # BY_BW - Sort by bandwidth # BY_AVGTS - Sort by average time served # BY_CUMTS - Sort by cumulative time served # BY_MAXTS - Sort by maximum time served # BY_PROT - Sort by http protocol # BY_MTHD - Sort by http method # Available orders: # ASC # DESC # #sort-panel VISITORS,BY_DATA,ASC #sort-panel REQUESTS,BY_HITS,ASC #sort-panel REQUESTS_STATIC,BY_HITS,ASC #sort-panel NOT_FOUND,BY_HITS,ASC #sort-panel HOSTS,BY_HITS,ASC #sort-panel OS,BY_HITS,ASC #sort-panel BROWSERS,BY_HITS,ASC #sort-panel VISIT_TIMES,BY_DATA,DESC #sort-panel VIRTUAL_HOSTS,BY_HITS,ASC #sort-panel REFERRERS,BY_HITS,ASC #sort-panel REFERRING_SITES,BY_HITS,ASC #sort-panel KEYPHRASES,BY_HITS,ASC #sort-panel STATUS_CODES,BY_HITS,ASC #sort-panel REMOTE_USER,BY_HITS,ASC #sort-panel CACHE_STATUS,BY_HITS,ASC #sort-panel GEO_LOCATION,BY_HITS,ASC #sort-panel MIME_TYPE,BY_HITS,ASC #sort-panel TLS_TYPE,BY_HITS,ASC # Consider the following extensions as static files # The actual '.' is required and extensions are case sensitive # For a full list, uncomment the less common static extensions below. # static-file .css static-file .js static-file .jpg static-file .png static-file .gif static-file .ico static-file .jpeg static-file .pdf static-file .csv static-file .mpeg static-file .mpg static-file .swf static-file .woff static-file .woff2 static-file .xls static-file .xlsx static-file .doc static-file .docx static-file .ppt static-file .pptx static-file .txt static-file .zip static-file .ogg static-file .mp3 static-file .mp4 static-file .exe static-file .iso static-file .gz static-file .rar static-file .svg static-file .bmp static-file .tar static-file .tgz static-file .tiff static-file .tif static-file .ttf static-file .flv static-file .dmg static-file .xz static-file .zst #static-file .less #static-file .ac3 #static-file .avi #static-file .bz2 #static-file .class #static-file .cue #static-file .dae #static-file .dat #static-file .dts #static-file .ejs #static-file .eot #static-file .eps #static-file .img #static-file .jar #static-file .map #static-file .mid #static-file .midi #static-file .ogv #static-file .webm #static-file .mkv #static-file .odp #static-file .ods #static-file .odt #static-file .otf #static-file .pict #static-file .pls #static-file .ps #static-file .qt #static-file .rm #static-file .svgz #static-file .wav #static-file .webp ###################################### # GeoIP Options # Only if configured with --enable-geoip ###################################### # To feed a database either through GeoIP Legacy or GeoIP2, you need to use the # geoip-database flag below. # # === GeoIP Legacy # Legacy GeoIP has been discontinued. If your GNU+Linux distribution does not ship # with the legacy databases, you may still be able to find them through # different sources. Make sure to download the .dat files. # # Distributed with Creative Commons Attribution-ShareAlike 4.0 International License. # https://mailfud.org/geoip-legacy/ # IPv4 Country database: # Download the GeoIP.dat.gz # gunzip GeoIP.dat.gz # # IPv4 City database: # Download the GeoIPCity.dat.gz # gunzip GeoIPCity.dat.gz # Standard GeoIP database for less memory usage (GeoIP Legacy). # #std-geoip false # === GeoIP2 # For GeoIP2 databases, you can use DB-IP Lite databases. # DB-IP is licensed under a Creative Commons Attribution 4.0 International License. # https://db-ip.com/db/lite.php # Or you can download them from MaxMind # https://dev.maxmind.com/geoip/geoip2/geolite2/ # For GeoIP2 City database: # Download the GeoLite2-City.mmdb.gz # gunzip GeoLite2-City.mmdb.gz # # For GeoIP2 Country database: # Download the GeoLite2-Country.mmdb.gz # gunzip GeoLite2-Country.mmdb.gz # #geoip-database /usr/local/share/GeoIP/GeoLiteCity.dat ###################################### # Persistence Options ###################################### # Path where the persisted database files are stored on disk. # The default value is the /tmp directory. #db-path /tmp # Persist parsed data into disk. #persist true # Load previously stored data from disk. # Database files need to exist. See `persist`. #restore true goaccess-1.9.3/config/podcast.list0000644000175000017300000000322614613301754012600 # vim: set noexpandtab: #1 This file is a user agent list of various podcast-related agents (but not #2 limited to). It was distilled from the user agents of a web page which hosts #3 a Wordpress blog and a podcast. #4 \author Bernhard R. Fischer, #5 \date 2019/09/26 AntennaPod Podcasts AppleCoreMedia Mediaplayer atc Podcasts BacklinkCrawler Crawlers Baiduspider Crawlers Bullhorn Server PodCrawlers Castbox Podcasts CastBox Podcasts Castro Podcasts CCBot Crawlers com.evolve.podcast Podcasts cortex Facebook ExoPlayerLib Mediaplayer facebookexternalhit Facebook fyyd image poller PodCrawlers fyyd-poll PodCrawlers icatcher Podcasts iCatcher! Podcasts iTMS PodCrawlers itunesstored PodCrawlers Kodi Mediaplayer Lavf Mediaplayer LCC Crawlers Luminary Podcasts Mediatoolkitbot Crawlers mindUpBot Crawlers msnbot Crawlers NSPlayer Mediaplayer Overcast Podcasts Photon Crawlers Player FM Podcasts PlayerFM Podcasts Plex Mediaplayer Podbean Podcasts podcast Podcasts Podcast Podcasts PodcastRepublic Podcasts Podcasts Podcasts Podchaser PodCrawlers Podchaser-Parser PodCrawlers Podnews.net PodCrawlers PodParadise PodCrawlers Procast Podcasts ProCast Podcasts Procast (iOS) Podcasts ProcastProCast Podcasts radio.at PodCrawlers RadioPublic PodCrawlers RadioPublicImageResizer PodCrawlers RSSRadio Podcasts Sonos Mediaplayer Spotify PodCrawlers stagefright Mediaplayer Stitcher PodCrawlers UniversalFeedParser Feeds WinampMPEG Mediaplayer XING FeedReader Feeds XING-contenttabreceiver Feeds goaccess-1.9.3/config/browsers.list0000644000175000017300000000643214614317512013013 # List of browsers and their categories # e.g., WORD delimited by tab(s) TYPE # TYPE can be any type and it's not limited to the ones below. # # **IMPORTANT NOTE**: # --------------------- # The SIZE of the list is proportional to the run time. # Thus, the longer the list, the more time GoAccess will take to parse it. # # Also, you should note that the higher the browser/item is on the list, the # faster the parsing will be. # # The list needs to be specified using --browsers-file=. This file is not # parsed by default. # # The items below are sample crawlers, adjust as needed. Chef Client Crawlers Abonti Crawlers SISTRIX Crawlers DotBot Crawlers Speedy Spider Crawlers Sosospider Crawlers BPImageWalker Crawlers DoCoMo Crawlers GSLFbot Crawlers YodaoBot Crawlers AddThis Crawlers Purebot Crawlers CCBot Crawlers findlinks Crawlers ichiro Crawlers Linguee Bot Crawlers Gigabot Crawlers BacklinkCrawler Crawlers distilator Crawlers Aboundex Crawlers UnwindFetchor Crawlers SBIder Crawlers TestNutch Crawlers DomainCrawler Crawlers NextGenSearchBot Crawlers SEOENGWorldBot Crawlers Cityreview Crawlers PagePeeker Crawlers JS-Kit Crawlers ScreenerBot Crawlers ShowyouBot Crawlers SolomonoBot Crawlers Domnutch Crawlers MaxPoint Crawlers NCBot Crawlers TosCrawler Crawlers Updownerbot Crawlers OpenWebSpider Crawlers WordPress Crawlers PEAR Crawlers ZumBot Crawlers YisouSpider Crawlers W3C Crawlers vcheck Crawlers PercolateCrawler Crawlers NING Crawlers gvfs Crawlers CatchBot Crawlers Combine Crawlers A6-Indexer Crawlers Altresium Crawlers Comodo Crawlers crawler4j Crawlers Cricket Crawlers EC2LinkFinder Crawlers envolk Crawlers GeoHasher Crawlers HTMLParser Crawlers MLBot Crawlers Jaxified Crawlers LinkWalker Crawlers nutch Crawlers PostRank Crawlers keybase-proofs Crawlers CommonCrawler Crawlers X-CAD-SE Crawlers Safeassign Crawlers Nmap Crawlers sqlmap Crawlers Jorgee Crawlers PxBroker Crawlers Seekport Crawlers adscanner Crawlers AfD-Verbotsverfahren_JETZT! Crawlers DuckDuckGo-favicons-Bot Crawlers bingbot Crawlers PetalBot Crawlers Discordbot Crawlers ZoominfoBot Crawlers Googlebot Crawlers DotBot Crawlers AhrefsBot Crawlers SemrushBot Crawlers Adsbot Crawlers BLEXBot Crawlers NetcraftSurveyAgent Crawlers Netcraft Web Server Survey Crawlers masscan Crawlers MJ12bot Crawlers Pandalytics Crawlers YandexBot Crawlers Nimbostratus-Bot Crawlers SeznamBot Crawlers AppleBot Crawlers Vienna Feeds Windows-RSS-Platform Feeds newsbeuter Feeds Wrangler Feeds Fever Feeds Tiny Feeds FreshRSS Feeds KrISS Feeds SimplePie Feeds Feedsubs Feeds UniversalFeedParser Feeds goaccess-1.9.3/aclocal.m40000644000175000017300000012310214626466503010645 # generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, [m4_warning([this file was generated for autoconf 2.72. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intlmacosx.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) goaccess-1.9.3/COPYING0000644000175000017300000000212614613301753010031 The MIT License (MIT) Copyright (c) 2009-2022 Gerardo Orellana Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. goaccess-1.9.3/missing0000755000175000017300000001533614620766657010424 #! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: goaccess-1.9.3/resources/0000755000175000017300000000000014626467007011100 5goaccess-1.9.3/resources/tpls.html0000644000175000017300000003071414624360252012665 goaccess-1.9.3/resources/countries-110m.json0000644000175000017300000032210414624360252014374 {"type":"Topology","objects":{"countries":{"type":"GeometryCollection","geometries":[{"type":"MultiPolygon","arcs":[[[0]],[[1]]],"id":"FJ","properties":{"name":"Fiji"}},{"type":"Polygon","arcs":[[2,3,4,5,6,7,8,9,10]],"id":"TZ","properties":{"name":"Tanzania"}},{"type":"Polygon","arcs":[[11,12,13,14]],"id":"EH","properties":{"name":"W. Sahara"}},{"type":"MultiPolygon","arcs":[[[15,16,17,18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]]],"id":"CA","properties":{"name":"Canada"}},{"type":"MultiPolygon","arcs":[[[-19,48,49,50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[-17,58]],[[59]]],"id":"US","properties":{"name":"United States of America"}},{"type":"Polygon","arcs":[[60,61,62,63,64,65]],"id":"KZ","properties":{"name":"Kazakhstan"}},{"type":"Polygon","arcs":[[-63,66,67,68,69]],"id":"UZ","properties":{"name":"Uzbekistan"}},{"type":"MultiPolygon","arcs":[[[70,71]],[[72]],[[73]],[[74]]],"id":"PG","properties":{"name":"Papua New Guinea"}},{"type":"MultiPolygon","arcs":[[[-72,75]],[[76,77]],[[78]],[[79,80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]]],"id":"ID","properties":{"name":"Indonesia"}},{"type":"MultiPolygon","arcs":[[[90,91]],[[92,93,94,95,96,97]]],"id":"AR","properties":{"name":"Argentina"}},{"type":"MultiPolygon","arcs":[[[-92,98]],[[99,-95,100,101]]],"id":"CL","properties":{"name":"Chile"}},{"type":"Polygon","arcs":[[-8,102,103,104,105,106,107,108,109,110,111]],"id":"CD","properties":{"name":"Dem. Rep. Congo"}},{"type":"Polygon","arcs":[[112,113,114,115]],"id":"SO","properties":{"name":"Somalia"}},{"type":"Polygon","arcs":[[-3,116,117,118,-113,119]],"id":"KE","properties":{"name":"Kenya"}},{"type":"Polygon","arcs":[[120,121,122,123,124,125,126,127]],"id":"SD","properties":{"name":"Sudan"}},{"type":"Polygon","arcs":[[-122,128,129,130,131]],"id":"TD","properties":{"name":"Chad"}},{"type":"Polygon","arcs":[[132,133]],"id":"HT","properties":{"name":"Haiti"}},{"type":"Polygon","arcs":[[-133,134]],"id":"DO","properties":{"name":"Dominican Rep."}},{"type":"MultiPolygon","arcs":[[[135]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141,142,143]],[[144]],[[145]],[[146,147,148,149,-66,150,151,152,153,154,155,156,157,158,159,160,161]],[[162]],[[163,164]]],"id":"RU","properties":{"name":"Russia"}},{"type":"MultiPolygon","arcs":[[[165]],[[166]],[[167]]],"id":"BS","properties":{"name":"Bahamas"}},{"type":"Polygon","arcs":[[168]],"id":"FK","properties":{"name":"Falkland Is."}},{"type":"MultiPolygon","arcs":[[[169]],[[-161,170,171,172]],[[173]],[[174]]],"id":"NO","properties":{"name":"Norway"}},{"type":"Polygon","arcs":[[175]],"id":"GL","properties":{"name":"Greenland"}},{"type":"Polygon","arcs":[[176]],"id":"TF","properties":{"name":"Fr. S. Antarctic Lands"}},{"type":"Polygon","arcs":[[177,-77]],"id":"TL","properties":{"name":"Timor-Leste"}},{"type":"Polygon","arcs":[[178,179,180,181,182,183,184],[185]],"id":"ZA","properties":{"name":"South Africa"}},{"type":"Polygon","arcs":[[-186]],"id":"LS","properties":{"name":"Lesotho"}},{"type":"Polygon","arcs":[[-50,186,187,188,189]],"id":"MX","properties":{"name":"Mexico"}},{"type":"Polygon","arcs":[[190,191,-93]],"id":"UY","properties":{"name":"Uruguay"}},{"type":"Polygon","arcs":[[-191,-98,192,193,194,195,196,197,198,199,200]],"id":"BR","properties":{"name":"Brazil"}},{"type":"Polygon","arcs":[[-194,201,-96,-100,202]],"id":"BO","properties":{"name":"Bolivia"}},{"type":"Polygon","arcs":[[-195,-203,-102,203,204,205]],"id":"PE","properties":{"name":"Peru"}},{"type":"Polygon","arcs":[[-196,-206,206,207,208,209,210]],"id":"CO","properties":{"name":"Colombia"}},{"type":"Polygon","arcs":[[-209,211,212,213]],"id":"PA","properties":{"name":"Panama"}},{"type":"Polygon","arcs":[[-213,214,215,216]],"id":"CR","properties":{"name":"Costa Rica"}},{"type":"Polygon","arcs":[[-216,217,218,219]],"id":"NI","properties":{"name":"Nicaragua"}},{"type":"Polygon","arcs":[[-219,220,221,222,223]],"id":"HN","properties":{"name":"Honduras"}},{"type":"Polygon","arcs":[[-222,224,225]],"id":"SV","properties":{"name":"El Salvador"}},{"type":"Polygon","arcs":[[-189,226,227,-223,-226,228]],"id":"GT","properties":{"name":"Guatemala"}},{"type":"Polygon","arcs":[[-188,229,-227]],"id":"BZ","properties":{"name":"Belize"}},{"type":"Polygon","arcs":[[-197,-211,230,231]],"id":"VE","properties":{"name":"Venezuela"}},{"type":"Polygon","arcs":[[-198,-232,232,233]],"id":"GY","properties":{"name":"Guyana"}},{"type":"Polygon","arcs":[[-199,-234,234,235]],"id":"SR","properties":{"name":"Suriname"}},{"type":"MultiPolygon","arcs":[[[-200,-236,236]],[[237,238,239,240,241,242,243,244]],[[245]]],"id":"FR","properties":{"name":"France"}},{"type":"Polygon","arcs":[[-205,246,-207]],"id":"EC","properties":{"name":"Ecuador"}},{"type":"Polygon","arcs":[[247]],"id":"PR","properties":{"name":"Puerto Rico"}},{"type":"Polygon","arcs":[[248]],"id":"JM","properties":{"name":"Jamaica"}},{"type":"Polygon","arcs":[[249]],"id":"CU","properties":{"name":"Cuba"}},{"type":"Polygon","arcs":[[-181,250,251,252]],"id":"ZW","properties":{"name":"Zimbabwe"}},{"type":"Polygon","arcs":[[-180,253,254,-251]],"id":"BW","properties":{"name":"Botswana"}},{"type":"Polygon","arcs":[[-179,255,256,257,-254]],"id":"NA","properties":{"name":"Namibia"}},{"type":"Polygon","arcs":[[258,259,260,261,262,263,264]],"id":"SN","properties":{"name":"Senegal"}},{"type":"Polygon","arcs":[[-261,265,266,267,268,269,270]],"id":"ML","properties":{"name":"Mali"}},{"type":"Polygon","arcs":[[-13,271,-266,-260,272]],"id":"MR","properties":{"name":"Mauritania"}},{"type":"Polygon","arcs":[[273,274,275,276,277]],"id":"BJ","properties":{"name":"Benin"}},{"type":"Polygon","arcs":[[-131,278,279,-277,280,-268,281,282]],"id":"NE","properties":{"name":"Niger"}},{"type":"Polygon","arcs":[[-278,-280,283,284]],"id":"NG","properties":{"name":"Nigeria"}},{"type":"Polygon","arcs":[[-130,285,286,287,288,289,-284,-279]],"id":"CM","properties":{"name":"Cameroon"}},{"type":"Polygon","arcs":[[-275,290,291,292]],"id":"TG","properties":{"name":"Togo"}},{"type":"Polygon","arcs":[[-292,293,294,295]],"id":"GH","properties":{"name":"Ghana"}},{"type":"Polygon","arcs":[[-270,296,-295,297,298,299]],"id":"CI","properties":{"name":"Côte d'Ivoire"}},{"type":"Polygon","arcs":[[-262,-271,-300,300,301,302,303]],"id":"GN","properties":{"name":"Guinea"}},{"type":"Polygon","arcs":[[-263,-304,304]],"id":"GW","properties":{"name":"Guinea-Bissau"}},{"type":"Polygon","arcs":[[-299,305,306,-301]],"id":"LR","properties":{"name":"Liberia"}},{"type":"Polygon","arcs":[[-302,-307,307]],"id":"SL","properties":{"name":"Sierra Leone"}},{"type":"Polygon","arcs":[[-269,-281,-276,-293,-296,-297]],"id":"BF","properties":{"name":"Burkina Faso"}},{"type":"Polygon","arcs":[[-108,308,-286,-129,-121,309]],"id":"CF","properties":{"name":"Central African Rep."}},{"type":"Polygon","arcs":[[-107,310,311,312,-287,-309]],"id":"CG","properties":{"name":"Congo"}},{"type":"Polygon","arcs":[[-288,-313,313,314]],"id":"GA","properties":{"name":"Gabon"}},{"type":"Polygon","arcs":[[-289,-315,315]],"id":"GQ","properties":{"name":"Eq. Guinea"}},{"type":"Polygon","arcs":[[-7,316,317,-252,-255,-258,318,-103]],"id":"ZM","properties":{"name":"Zambia"}},{"type":"Polygon","arcs":[[-6,319,-317]],"id":"MW","properties":{"name":"Malawi"}},{"type":"Polygon","arcs":[[-5,320,-184,321,-182,-253,-318,-320]],"id":"MZ","properties":{"name":"Mozambique"}},{"type":"Polygon","arcs":[[-183,-322]],"id":"SZ","properties":{"name":"eSwatini"}},{"type":"MultiPolygon","arcs":[[[-106,322,-311]],[[-104,-319,-257,323]]],"id":"AO","properties":{"name":"Angola"}},{"type":"Polygon","arcs":[[-9,-112,324]],"id":"BI","properties":{"name":"Burundi"}},{"type":"Polygon","arcs":[[325,326,327,328,329,330,331]],"id":"IL","properties":{"name":"Israel"}},{"type":"Polygon","arcs":[[-331,332,333]],"id":"LB","properties":{"name":"Lebanon"}},{"type":"Polygon","arcs":[[334]],"id":"MG","properties":{"name":"Madagascar"}},{"type":"Polygon","arcs":[[-327,335]],"id":"PS","properties":{"name":"Palestine"}},{"type":"Polygon","arcs":[[-265,336]],"id":"GM","properties":{"name":"Gambia"}},{"type":"Polygon","arcs":[[337,338,339]],"id":"TN","properties":{"name":"Tunisia"}},{"type":"Polygon","arcs":[[-12,340,341,-338,342,-282,-267,-272]],"id":"DZ","properties":{"name":"Algeria"}},{"type":"Polygon","arcs":[[-326,343,344,345,346,-328,-336]],"id":"400","properties":{"name":"Jordan"}},{"type":"Polygon","arcs":[[347,348,349,350,351]],"id":"AE","properties":{"name":"United Arab Emirates"}},{"type":"Polygon","arcs":[[352,353]],"id":"QA","properties":{"name":"Qatar"}},{"type":"Polygon","arcs":[[354,355,356]],"id":"KW","properties":{"name":"Kuwait"}},{"type":"Polygon","arcs":[[-345,357,358,359,360,-357,361]],"id":"IQ","properties":{"name":"Iraq"}},{"type":"MultiPolygon","arcs":[[[-351,362,363,364]],[[-349,365]]],"id":"OM","properties":{"name":"Oman"}},{"type":"MultiPolygon","arcs":[[[366]],[[367]]],"id":"VU","properties":{"name":"Vanuatu"}},{"type":"Polygon","arcs":[[368,369,370,371]],"id":"KH","properties":{"name":"Cambodia"}},{"type":"Polygon","arcs":[[-369,372,373,374,375,376]],"id":"TH","properties":{"name":"Thailand"}},{"type":"Polygon","arcs":[[-370,-377,377,378,379]],"id":"LA","properties":{"name":"Laos"}},{"type":"Polygon","arcs":[[-376,380,381,382,383,-378]],"id":"MM","properties":{"name":"Myanmar"}},{"type":"Polygon","arcs":[[-371,-380,384,385]],"id":"VN","properties":{"name":"Vietnam"}},{"type":"MultiPolygon","arcs":[[[386,386,386]],[[-147,387,388,389,390]]],"id":"KP","properties":{"name":"North Korea"}},{"type":"Polygon","arcs":[[-389,391]],"id":"KR","properties":{"name":"South Korea"}},{"type":"Polygon","arcs":[[-149,392]],"id":"MN","properties":{"name":"Mongolia"}},{"type":"Polygon","arcs":[[-383,393,394,395,396,397,398,399,400]],"id":"IN","properties":{"name":"India"}},{"type":"Polygon","arcs":[[-382,401,-394]],"id":"BD","properties":{"name":"Bangladesh"}},{"type":"Polygon","arcs":[[-400,402]],"id":"BT","properties":{"name":"Bhutan"}},{"type":"Polygon","arcs":[[-398,403]],"id":"NP","properties":{"name":"Nepal"}},{"type":"Polygon","arcs":[[-396,404,405,406,407]],"id":"PK","properties":{"name":"Pakistan"}},{"type":"Polygon","arcs":[[-69,408,409,-407,410,411]],"id":"AF","properties":{"name":"Afghanistan"}},{"type":"Polygon","arcs":[[-68,412,413,-409]],"id":"TJ","properties":{"name":"Tajikistan"}},{"type":"Polygon","arcs":[[-62,414,-413,-67]],"id":"KG","properties":{"name":"Kyrgyzstan"}},{"type":"Polygon","arcs":[[-64,-70,-412,415,416]],"id":"TM","properties":{"name":"Turkmenistan"}},{"type":"Polygon","arcs":[[-360,417,418,419,420,421,-416,-411,-406,422]],"id":"IR","properties":{"name":"Iran"}},{"type":"Polygon","arcs":[[-332,-334,423,424,-358,-344]],"id":"SY","properties":{"name":"Syria"}},{"type":"Polygon","arcs":[[-420,425,426,427,428]],"id":"AM","properties":{"name":"Armenia"}},{"type":"Polygon","arcs":[[-172,429,430]],"id":"SE","properties":{"name":"Sweden"}},{"type":"Polygon","arcs":[[-156,431,432,433,434]],"id":"BY","properties":{"name":"Belarus"}},{"type":"Polygon","arcs":[[-155,435,-164,436,437,438,439,440,441,442,-432]],"id":"UA","properties":{"name":"Ukraine"}},{"type":"Polygon","arcs":[[-433,-443,443,444,445,446,-142,447]],"id":"PL","properties":{"name":"Poland"}},{"type":"Polygon","arcs":[[448,449,450,451,452,453,454]],"id":"AT","properties":{"name":"Austria"}},{"type":"Polygon","arcs":[[-441,455,456,457,458,-449,459]],"id":"HU","properties":{"name":"Hungary"}},{"type":"Polygon","arcs":[[-439,460]],"id":"MD","properties":{"name":"Moldova"}},{"type":"Polygon","arcs":[[-438,461,462,463,-456,-440,-461]],"id":"RO","properties":{"name":"Romania"}},{"type":"Polygon","arcs":[[-434,-448,-144,464,465]],"id":"LT","properties":{"name":"Lithuania"}},{"type":"Polygon","arcs":[[-157,-435,-466,466,467]],"id":"LV","properties":{"name":"Latvia"}},{"type":"Polygon","arcs":[[-158,-468,468]],"id":"EE","properties":{"name":"Estonia"}},{"type":"Polygon","arcs":[[-446,469,-453,470,-238,471,472,473,474,475,476]],"id":"DE","properties":{"name":"Germany"}},{"type":"Polygon","arcs":[[-463,477,478,479,480,481]],"id":"BG","properties":{"name":"Bulgaria"}},{"type":"MultiPolygon","arcs":[[[482]],[[-480,483,484,485,486]]],"id":"GR","properties":{"name":"Greece"}},{"type":"MultiPolygon","arcs":[[[-359,-425,487,488,-427,-418]],[[-479,489,-484]]],"id":"TR","properties":{"name":"Turkey"}},{"type":"Polygon","arcs":[[-486,490,491,492,493]],"id":"AL","properties":{"name":"Albania"}},{"type":"Polygon","arcs":[[-458,494,495,496,497,498]],"id":"HR","properties":{"name":"Croatia"}},{"type":"Polygon","arcs":[[-452,499,-239,-471]],"id":"CH","properties":{"name":"Switzerland"}},{"type":"Polygon","arcs":[[-472,-245,500]],"id":"LU","properties":{"name":"Luxembourg"}},{"type":"Polygon","arcs":[[-473,-501,-244,501,502]],"id":"BE","properties":{"name":"Belgium"}},{"type":"Polygon","arcs":[[-474,-503,503]],"id":"NL","properties":{"name":"Netherlands"}},{"type":"Polygon","arcs":[[504,505]],"id":"PT","properties":{"name":"Portugal"}},{"type":"Polygon","arcs":[[-505,506,-242,507]],"id":"ES","properties":{"name":"Spain"}},{"type":"Polygon","arcs":[[508,509]],"id":"IE","properties":{"name":"Ireland"}},{"type":"Polygon","arcs":[[510]],"id":"NC","properties":{"name":"New Caledonia"}},{"type":"MultiPolygon","arcs":[[[511]],[[512]],[[513]],[[514]],[[515]]],"id":"SB","properties":{"name":"Solomon Is."}},{"type":"MultiPolygon","arcs":[[[516]],[[517]]],"id":"NZ","properties":{"name":"New Zealand"}},{"type":"MultiPolygon","arcs":[[[518]],[[519]]],"id":"AU","properties":{"name":"Australia"}},{"type":"Polygon","arcs":[[520]],"id":"LK","properties":{"name":"Sri Lanka"}},{"type":"MultiPolygon","arcs":[[[521]],[[-61,-150,-393,-148,-391,522,-385,-379,-384,-401,-403,-399,-404,-397,-408,-410,-414,-415]]],"id":"CN","properties":{"name":"China"}},{"type":"Polygon","arcs":[[523]],"id":"TW","properties":{"name":"Taiwan"}},{"type":"MultiPolygon","arcs":[[[-451,524,525,-240,-500]],[[526]],[[527]]],"id":"IT","properties":{"name":"Italy"}},{"type":"MultiPolygon","arcs":[[[-476,528]],[[529]]],"id":"DK","properties":{"name":"Denmark"}},{"type":"MultiPolygon","arcs":[[[-510,530]],[[531]]],"id":"GB","properties":{"name":"United Kingdom"}},{"type":"Polygon","arcs":[[532]],"id":"IS","properties":{"name":"Iceland"}},{"type":"MultiPolygon","arcs":[[[-152,533,-421,-429,534]],[[-419,-426]]],"id":"AZ","properties":{"name":"Azerbaijan"}},{"type":"Polygon","arcs":[[-153,-535,-428,-489,535]],"id":"GE","properties":{"name":"Georgia"}},{"type":"MultiPolygon","arcs":[[[536]],[[537]],[[538]],[[539]],[[540]],[[541]],[[542]]],"id":"PH","properties":{"name":"Philippines"}},{"type":"MultiPolygon","arcs":[[[-374,543]],[[-81,544,545,546]]],"id":"MY","properties":{"name":"Malaysia"}},{"type":"Polygon","arcs":[[-546,547]],"id":"BN","properties":{"name":"Brunei"}},{"type":"Polygon","arcs":[[-450,-459,-499,548,-525]],"id":"SI","properties":{"name":"Slovenia"}},{"type":"Polygon","arcs":[[-160,549,-430,-171]],"id":"FI","properties":{"name":"Finland"}},{"type":"Polygon","arcs":[[-442,-460,-455,550,-444]],"id":"SK","properties":{"name":"Slovakia"}},{"type":"Polygon","arcs":[[-445,-551,-454,-470]],"id":"CZ","properties":{"name":"Czechia"}},{"type":"Polygon","arcs":[[-126,551,552,553]],"id":"ER","properties":{"name":"Eritrea"}},{"type":"MultiPolygon","arcs":[[[554]],[[555]],[[556]]],"id":"JP","properties":{"name":"Japan"}},{"type":"Polygon","arcs":[[-193,-97,-202]],"id":"PY","properties":{"name":"Paraguay"}},{"type":"Polygon","arcs":[[-364,557,558]],"id":"YE","properties":{"name":"Yemen"}},{"type":"Polygon","arcs":[[-346,-362,-356,559,-354,560,-352,-365,-559,561]],"id":"SA","properties":{"name":"Saudi Arabia"}},{"type":"MultiPolygon","arcs":[[[562]],[[563]],[[564]],[[565]],[[566]],[[567]],[[568]],[[569]]],"id":"AQ","properties":{"name":"Antarctica"}},{"type":"Polygon","arcs":[[570,571]],"properties":{"name":"N. Cyprus"}},{"type":"Polygon","arcs":[[-572,572]],"id":"CY","properties":{"name":"Cyprus"}},{"type":"Polygon","arcs":[[-341,-15,573]],"id":"MA","properties":{"name":"Morocco"}},{"type":"Polygon","arcs":[[-124,574,575,-329,576]],"id":"EG","properties":{"name":"Egypt"}},{"type":"Polygon","arcs":[[-123,-132,-283,-343,-340,577,-575]],"id":"LY","properties":{"name":"Libya"}},{"type":"Polygon","arcs":[[-114,-119,578,-127,-554,579,580]],"id":"ET","properties":{"name":"Ethiopia"}},{"type":"Polygon","arcs":[[-553,581,582,-580]],"id":"DJ","properties":{"name":"Djibouti"}},{"type":"Polygon","arcs":[[-115,-581,-583,583]],"properties":{"name":"Somaliland"}},{"type":"Polygon","arcs":[[-11,584,-110,585,-117]],"id":"UG","properties":{"name":"Uganda"}},{"type":"Polygon","arcs":[[-10,-325,-111,-585]],"id":"RW","properties":{"name":"Rwanda"}},{"type":"Polygon","arcs":[[-496,586,587]],"id":"BA","properties":{"name":"Bosnia and Herz."}},{"type":"Polygon","arcs":[[-481,-487,-494,588,589]],"id":"MK","properties":{"name":"Macedonia"}},{"type":"Polygon","arcs":[[-457,-464,-482,-590,590,591,-587,-495]],"id":"RS","properties":{"name":"Serbia"}},{"type":"Polygon","arcs":[[-492,592,-497,-588,-592,593]],"id":"ME","properties":{"name":"Montenegro"}},{"type":"Polygon","arcs":[[-493,-594,-591,-589]],"properties":{"name":"Kosovo"}},{"type":"Polygon","arcs":[[594]],"id":"TT","properties":{"name":"Trinidad and Tobago"}},{"type":"Polygon","arcs":[[-109,-310,-128,-579,-118,-586]],"id":"SS","properties":{"name":"S. Sudan"}}]},"land":{"type":"GeometryCollection","geometries":[{"type":"MultiPolygon","arcs":[[[0]],[[1]],[[3,320,184,255,323,104,322,311,313,315,289,284,273,290,293,297,305,307,302,304,263,336,258,272,13,573,341,338,577,575,329,332,423,487,535,153,435,164,436,461,477,489,484,490,592,497,548,525,240,507,505,506,242,501,503,474,528,476,446,142,464,466,468,158,549,430,172,161,387,391,389,522,385,371,372,543,374,380,401,394,404,422,360,354,559,352,560,347,365,349,362,557,561,346,576,124,551,581,583,115,119],[421,416,64,150,533]],[[17,48,186,229,227,223,219,216,213,209,230,232,234,236,200,191,93,100,203,246,207,211,214,217,220,224,228,189,50,15,58]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[59]],[[70,75]],[[72]],[[73]],[[74]],[[77,177]],[[78]],[[546,79,544,547]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]],[[90,98]],[[133,134]],[[135]],[[136]],[[137]],[[138]],[[139]],[[140]],[[144]],[[145]],[[162]],[[165]],[[166]],[[167]],[[168]],[[169]],[[173]],[[174]],[[175]],[[176]],[[245]],[[247]],[[248]],[[249]],[[334]],[[366]],[[367]],[[482]],[[508,530]],[[510]],[[511]],[[512]],[[513]],[[514]],[[515]],[[516]],[[517]],[[518]],[[519]],[[520]],[[521]],[[523]],[[526]],[[527]],[[529]],[[531]],[[532]],[[536]],[[537]],[[538]],[[539]],[[540]],[[541]],[[542]],[[554]],[[555]],[[556]],[[562]],[[563]],[[564]],[[565]],[[566]],[[567]],[[568]],[[569]],[[570,572]],[[594]]]}]}},"arcs":[[[99478,40237],[69,98],[96,-171],[-46,-308],[-172,-81],[-153,73],[-27,260],[107,203],[126,-74]],[[0,41087],[57,27],[-34,-284],[-23,-32],[99822,-145],[-177,-124],[-36,220],[139,121],[88,33],[163,184],[-99999,0]],[[59417,50018],[47,-65],[1007,-1203],[19,-343],[399,-590]],[[60889,47817],[-128,-728],[16,-335],[178,-216],[8,-153],[-76,-357],[16,-180],[-18,-282],[97,-370],[115,-583],[101,-129]],[[61198,44484],[-221,-342],[-303,-230],[-167,10],[-99,-177],[-193,-16],[-73,-74],[-334,166],[-209,-48]],[[59599,43773],[-77,804],[-95,275],[-55,164],[-273,110]],[[59099,45126],[-157,177],[-177,100],[-111,99],[-116,150]],[[58538,45652],[-150,745],[-161,330],[-55,343],[27,307],[-50,544]],[[58149,47921],[115,28],[101,214],[108,308],[69,124],[-3,192],[-60,134],[-16,233]],[[58463,49154],[80,74],[16,348],[-110,333]],[[58449,49909],[98,71],[304,-7],[566,45]],[[47592,66920],[1,-40],[-6,-114]],[[47587,66766],[-1,-895],[-911,31],[9,-1512],[-261,-53],[-68,-304],[53,-853],[-1088,4],[-60,-197]],[[45260,62987],[12,249]],[[45272,63236],[5,-1],[625,48],[33,213],[114,265],[92,816],[386,637],[131,745],[86,44],[91,460],[234,63],[100,-76],[126,0],[90,134],[172,19],[-7,317],[42,0]],[[15878,79530],[-38,1],[-537,581],[-199,255],[-503,244],[-155,523],[40,363],[-356,252],[-48,476],[-336,429],[-6,304]],[[13740,82958],[154,285],[-7,373],[-473,376],[-284,674],[-173,424],[-255,266],[-187,242],[-147,306],[-279,-192],[-270,-330],[-247,388],[-194,259],[-271,164],[-273,17],[1,3364],[2,2193]],[[10837,91767],[518,-142],[438,-285],[289,-54],[244,247],[336,184],[413,-72],[416,259],[455,148],[191,-245],[207,138],[62,278],[192,-63],[470,-530],[369,401],[38,-449],[341,97],[105,173],[337,-34],[424,-248],[650,-217],[383,-100],[272,38],[374,-300],[-390,-293],[502,-127],[750,70],[236,103],[296,-354],[302,299],[-283,251],[179,202],[338,27],[223,59],[224,-141],[279,-321],[310,47],[491,-266],[431,94],[405,-14],[-32,367],[247,103],[431,-200],[-2,-559],[177,471],[223,-16],[126,594],[-298,364],[-324,239],[22,653],[329,429],[366,-95],[281,-261],[378,-666],[-247,-290],[517,-120],[-1,-604],[371,463],[332,-380],[-83,-438],[269,-399],[290,427],[202,510],[16,649],[394,-46],[411,-87],[373,-293],[17,-293],[-207,-315],[196,-316],[-36,-288],[-544,-413],[-386,-91],[-287,178],[-83,-297],[-268,-498],[-81,-259],[-322,-399],[-397,-39],[-220,-250],[-18,-384],[-323,-74],[-340,-479],[-301,-665],[-108,-466],[-16,-686],[409,-99],[125,-553],[130,-448],[388,117],[517,-256],[277,-225],[199,-279],[348,-163],[294,-248],[459,-34],[302,-58],[-45,-511],[86,-594],[201,-661],[414,-561],[214,192],[150,607],[-145,934],[-196,311],[445,276],[314,415],[154,411],[-23,395],[-188,502],[-338,445],[328,619],[-121,535],[-93,922],[194,137],[476,-161],[286,-57],[230,155],[258,-200],[342,-343],[85,-229],[495,-45],[-8,-496],[92,-747],[254,-92],[201,-348],[402,328],[266,652],[184,274],[216,-527],[362,-754],[307,-709],[-112,-371],[370,-333],[250,-338],[442,-152],[179,-189],[110,-500],[216,-78],[112,-223],[20,-664],[-202,-222],[-199,-207],[-458,-210],[-349,-486],[-470,-96],[-594,125],[-417,4],[-287,-41],[-233,-424],[-354,-262],[-401,-782],[-320,-545],[236,97],[446,776],[583,493],[415,58],[246,-289],[-262,-397],[88,-637],[91,-446],[361,-295],[459,86],[278,664],[19,-429],[180,-214],[-344,-387],[-615,-351],[-276,-239],[-310,-426],[-211,44],[-11,500],[483,488],[-445,-19],[-309,-72]],[[31350,77248],[-181,334],[0,805],[-123,171],[-187,-100],[-92,155],[-212,-446],[-84,-460],[-99,-269],[-118,-91],[-89,-30],[-28,-146],[-512,0],[-422,-4],[-125,-109],[-294,-425],[-34,-46],[-89,-231],[-255,1],[-273,-3],[-125,-93],[44,-116],[25,-181],[-5,-60],[-363,-293],[-286,-93],[-323,-316],[-70,0],[-94,93],[-31,85],[6,61],[61,207],[131,325],[81,349],[-56,514],[-59,536],[-290,277],[35,105],[-41,73],[-76,0],[-56,93],[-14,140],[-54,-61],[-75,18],[17,59],[-65,58],[-27,155],[-216,189],[-224,197],[-272,229],[-261,214],[-248,-167],[-91,-6],[-342,154],[-225,-77],[-269,183],[-284,94],[-194,36],[-86,100],[-49,325],[-94,-3],[-1,-227],[-575,0],[-951,0],[-944,0],[-833,0],[-834,0],[-819,0],[-847,0],[-273,0],[-824,0],[-789,0]],[[26668,87478],[207,273],[381,-6],[-6,-114],[-325,-326],[-196,13],[-61,160]],[[27840,93593],[-306,313],[12,213],[133,39],[636,-63],[479,-325],[25,-163],[-296,17],[-299,13],[-304,-80],[-80,36]],[[27690,87261],[107,177],[114,-13],[70,-121],[-108,-310],[-123,50],[-73,176],[13,41]],[[23996,94879],[-151,-229],[-403,44],[-337,155],[148,266],[399,159],[243,-208],[101,-187]],[[23933,96380],[-126,-17],[-521,38],[-74,165],[559,-9],[195,-109],[-33,-68]],[[23124,97116],[332,-205],[-76,-214],[-411,-122],[-226,138],[-119,221],[-22,245],[360,-24],[162,-39]],[[25514,94532],[-449,73],[-738,190],[-96,325],[-34,293],[-279,258],[-574,72],[-322,183],[104,242],[573,-37],[308,-190],[547,1],[240,-194],[-64,-222],[319,-134],[177,-140],[374,-26],[406,-50],[441,128],[566,51],[451,-42],[298,-223],[62,-244],[-174,-157],[-414,-127],[-355,72],[-797,-91],[-570,-11]],[[19093,96754],[392,-92],[-93,-177],[-518,-170],[-411,191],[224,188],[406,60]],[[19177,97139],[361,-120],[-339,-115],[-461,1],[5,84],[285,177],[149,-27]],[[34555,80899],[-148,-372],[-184,-517],[181,199],[187,-126],[-98,-206],[247,-162],[128,144],[277,-182],[-86,-433],[194,101],[36,-313],[86,-367],[-117,-520],[-125,-22],[-183,111],[60,484],[-77,75],[-322,-513],[-166,21],[196,277],[-267,144],[-298,-35],[-539,18],[-43,175],[173,208],[-121,160],[234,356],[287,941],[172,336],[241,204],[129,-26],[-54,-160]],[[26699,89048],[304,-203],[318,-184],[25,-281],[204,46],[199,-196],[-247,-186],[-432,142],[-156,266],[-275,-314],[-396,-306],[-95,346],[-377,-57],[242,292],[35,465],[95,542],[201,-49],[51,-259],[143,91],[161,-155]],[[28119,93327],[263,235],[616,-299],[383,-282],[36,-258],[515,134],[290,-376],[670,-234],[242,-238],[263,-553],[-510,-275],[654,-386],[441,-130],[400,-543],[437,-39],[-87,-414],[-487,-687],[-342,253],[-437,568],[-359,-74],[-35,-338],[292,-344],[377,-272],[114,-157],[181,-584],[-96,-425],[-350,160],[-697,473],[393,-509],[289,-357],[45,-206],[-753,236],[-596,343],[-337,287],[97,167],[-414,304],[-405,286],[5,-171],[-803,-94],[-235,203],[183,435],[522,10],[571,76],[-92,211],[96,294],[360,576],[-77,261],[-107,203],[-425,286],[-563,201],[178,150],[-294,367],[-245,34],[-219,201],[-149,-175],[-503,-76],[-1011,132],[-588,174],[-450,89],[-231,207],[290,270],[-394,2],[-88,599],[213,528],[286,241],[717,158],[-204,-382],[219,-369],[256,477],[704,242],[477,-611],[-42,-387],[550,172]],[[23749,94380],[579,-20],[530,-144],[-415,-526],[-331,-115],[-298,-442],[-317,22],[-173,519],[4,294],[145,251],[276,161]],[[15873,95551],[472,442],[570,383],[426,-9],[381,87],[-38,-454],[-214,-205],[-259,-29],[-517,-252],[-444,-91],[-377,128]],[[13136,82508],[267,47],[-84,-671],[242,-475],[-111,1],[-167,270],[-103,272],[-140,184],[-51,260],[16,188],[131,-76]],[[20696,97433],[546,-81],[751,-215],[212,-281],[108,-247],[-453,66],[-457,192],[-619,21],[268,176],[-335,142],[-21,227]],[[15692,79240],[-140,-82],[-456,269],[-84,209],[-248,207],[-50,168],[-286,107],[-107,321],[24,137],[291,-129],[171,-89],[261,-63],[94,-204],[138,-280],[277,-244],[115,-327]],[[16239,94566],[397,-123],[709,-33],[270,-171],[298,-249],[-349,-149],[-681,-415],[-344,-414],[0,-257],[-731,-285],[-147,259],[-641,312],[119,250],[192,432],[241,388],[-272,362],[939,93]],[[20050,95391],[247,99],[291,-26],[49,-289],[-169,-281],[-940,-91],[-701,-256],[-423,-14],[-35,193],[577,261],[-1255,-70],[-389,106],[379,577],[262,165],[782,-199],[493,-350],[485,-45],[-397,565],[255,215],[286,-68],[94,-282],[109,-210]],[[20410,93755],[311,-239],[175,-575],[86,-417],[466,-293],[502,-279],[-31,-260],[-456,-48],[178,-227],[-94,-217],[-503,93],[-478,160],[-322,-36],[-522,-201],[-704,-88],[-494,-56],[-151,279],[-379,161],[-246,-66],[-343,468],[185,62],[429,101],[392,-26],[362,103],[-537,138],[-594,-47],[-394,12],[-146,217],[644,237],[-428,-9],[-485,156],[233,443],[193,235],[744,359],[284,-114],[-139,-277],[618,179],[386,-298],[314,302],[254,-194],[227,-580],[140,244],[-197,606],[244,86],[276,-94]],[[22100,93536],[-306,386],[329,286],[331,-124],[496,75],[72,-172],[-259,-283],[420,-254],[-50,-532],[-455,-229],[-268,50],[-192,225],[-690,456],[5,189],[567,-73]],[[20389,94064],[372,24],[211,-130],[-244,-390],[-434,413],[95,83]],[[22639,95907],[212,-273],[9,-303],[-127,-440],[-458,-60],[-298,94],[5,345],[-455,-46],[-18,457],[299,-18],[419,201],[390,-34],[22,77]],[[23329,98201],[192,180],[285,42],[-122,135],[646,30],[355,-315],[468,-127],[455,-112],[220,-390],[334,-190],[-381,-176],[-513,-445],[-492,-42],[-575,76],[-299,240],[4,215],[220,157],[-508,-4],[-306,196],[-176,268],[193,262]],[[24559,98965],[413,112],[324,19],[545,96],[409,220],[344,-30],[300,-166],[211,319],[367,95],[498,65],[849,24],[148,-63],[802,100],[601,-38],[602,-37],[742,-47],[597,-75],[508,-161],[-12,-157],[-678,-257],[-672,-119],[-251,-133],[605,3],[-656,-358],[-452,-167],[-476,-483],[-573,-98],[-177,-120],[-841,-64],[383,-74],[-192,-105],[230,-292],[-264,-202],[-429,-167],[-132,-232],[-388,-176],[39,-134],[475,23],[6,-144],[-742,-355],[-726,163],[-816,-91],[-414,71],[-525,31],[-35,284],[514,133],[-137,427],[170,41],[742,-255],[-379,379],[-450,113],[225,229],[492,141],[79,206],[-392,231],[-118,304],[759,-26],[220,-64],[433,216],[-625,68],[-972,-38],[-491,201],[-232,239],[-324,173],[-61,202]],[[29106,90427],[-180,-174],[-312,-30],[-69,289],[118,331],[255,82],[217,-163],[3,-253],[-32,-82]],[[23262,91636],[169,-226],[-173,-207],[-374,179],[-226,-65],[-380,266],[245,183],[194,256],[295,-168],[166,-106],[84,-112]],[[32078,80046],[96,49],[365,-148],[284,-247],[8,-108],[-135,-11],[-360,186],[-258,279]],[[32218,78370],[97,-288],[202,-79],[257,16],[-137,-242],[-102,-38],[-353,250],[-69,198],[105,183]],[[31350,77248],[48,-194],[-296,-286],[-286,-204],[-293,-175],[-147,-351],[-47,-133],[-3,-313],[92,-313],[115,-15],[-29,216],[83,-131],[-22,-169],[-188,-96],[-133,11],[-205,-103],[-121,-29],[-162,-29],[-231,-171],[408,111],[82,-112],[-389,-177],[-177,-1],[8,72],[-84,-164],[82,-27],[-60,-424],[-203,-455],[-20,152],[-61,30],[-91,148],[57,-318],[69,-105],[5,-223],[-89,-230],[-157,-472],[-25,24],[86,402],[-142,225],[-33,491],[-53,-255],[59,-375],[-183,93],[191,-191],[12,-562],[79,-41],[29,-204],[39,-591],[-176,-439],[-288,-175],[-182,-346],[-139,-38],[-141,-217],[-39,-199],[-305,-383],[-157,-281],[-131,-351],[-43,-419],[50,-411],[92,-505],[124,-418],[1,-256],[132,-685],[-9,-398],[-12,-230],[-69,-361],[-83,-75],[-137,72],[-44,259],[-105,136],[-148,508],[-129,452],[-42,231],[57,393],[-77,325],[-217,494],[-108,90],[-281,-268],[-49,30],[-135,275],[-174,147],[-314,-75],[-247,66],[-212,-41],[-114,-92],[50,-157],[-5,-240],[59,-117],[-53,-77],[-103,87],[-104,-112],[-202,18],[-207,312],[-242,-73],[-202,137],[-173,-42],[-234,-138],[-253,-438],[-276,-255],[-152,-282],[-63,-266],[-3,-407],[14,-284],[52,-201]],[[23016,65864],[-108,-18],[-197,130],[-217,184],[-78,277],[-61,414],[-164,337],[-96,346],[-139,404],[-196,236],[-227,-11],[-175,-467],[-230,177],[-144,178],[-69,325],[-92,309],[-165,260],[-142,186],[-102,210],[-481,0],[0,-244],[-221,0],[-552,-4],[-634,416],[-419,287],[26,116],[-353,-64],[-316,-46]],[[17464,69802],[-46,302],[-180,340],[-130,71],[-30,169],[-156,30],[-100,159],[-258,59],[-71,95],[-33,324],[-270,594],[-231,821],[10,137],[-123,195],[-215,495],[-38,482],[-148,323],[61,489],[-10,507],[-89,453],[109,557],[34,536],[33,536],[-50,792],[-88,506],[-80,274],[33,115],[402,-200],[148,-558],[69,156],[-45,484],[-94,485]],[[6833,62443],[49,-51],[45,-79],[71,-207],[-7,-33],[-108,-126],[-89,-92],[-41,-99],[-69,84],[8,165],[-46,216],[14,65],[48,97],[-19,116],[16,55],[21,-11],[107,-100]],[[6668,62848],[-23,-71],[-94,-43],[-47,125],[-32,48],[-3,37],[27,50],[99,-56],[73,-90]],[[6456,63091],[-9,-63],[-149,17],[21,72],[137,-26]],[[6104,63411],[23,-38],[80,-196],[-15,-34],[-19,8],[-97,21],[-35,133],[-11,24],[74,82]],[[5732,63705],[5,-138],[-33,-58],[-93,107],[14,43],[43,58],[64,-12]],[[3759,86256],[220,-54],[27,-226],[-171,-92],[-182,110],[-168,161],[274,101]],[[7436,84829],[185,-40],[117,-183],[-240,-281],[-277,-225],[-142,152],[-43,277],[252,210],[148,90]],[[13740,82958],[-153,223],[-245,188],[-78,515],[-358,478],[-150,558],[-267,38],[-441,15],[-326,170],[-574,613],[-266,112],[-486,211],[-385,-51],[-546,272],[-330,252],[-309,-125],[58,-411],[-154,-38],[-321,-123],[-245,-199],[-308,-126],[-39,348],[125,580],[295,182],[-76,148],[-354,-329],[-190,-394],[-400,-420],[203,-287],[-262,-424],[-299,-248],[-278,-180],[-69,-261],[-434,-305],[-87,-278],[-325,-252],[-191,45],[-259,-165],[-282,-201],[-231,-197],[-477,-169],[-43,99],[304,276],[271,182],[296,324],[345,66],[137,243],[385,353],[62,119],[205,208],[48,448],[141,349],[-320,-179],[-90,102],[-150,-215],[-181,300],[-75,-212],[-104,294],[-278,-236],[-170,0],[-24,352],[50,216],[-179,211],[-361,-113],[-235,277],[-190,142],[-1,334],[-214,252],[108,340],[226,330],[99,303],[225,43],[191,-94],[224,285],[201,-51],[212,183],[-52,270],[-155,106],[205,228],[-170,-7],[-295,-128],[-85,-131],[-219,131],[-392,-67],[-407,142],[-117,238],[-351,343],[390,247],[620,289],[228,0],[-38,-296],[586,23],[-225,366],[-342,225],[-197,296],[-267,252],[-381,187],[155,309],[493,19],[350,270],[66,287],[284,281],[271,68],[526,262],[256,-40],[427,315],[421,-124],[201,-266],[123,114],[469,-35],[-16,-136],[425,-101],[283,59],[585,-186],[534,-56],[214,-77],[370,96],[421,-177],[302,-83]],[[2297,88264],[171,-113],[173,61],[225,-156],[276,-79],[-23,-64],[-211,-125],[-211,128],[-106,107],[-245,-34],[-66,52],[17,223]],[[74266,79657],[-212,-393],[-230,-56],[-13,-592],[-155,-267],[-551,194],[-200,-1058],[-143,-131],[-550,-236],[250,-1026],[-190,-154],[22,-337]],[[72294,75601],[-171,87],[-140,212],[-412,62],[-461,16],[-100,-65],[-396,248],[-158,-122],[-43,-349],[-457,204],[-183,-84],[-62,-259]],[[69711,75551],[-159,-109],[-367,-412],[-121,-422],[-104,-4],[-76,280],[-353,19],[-57,484],[-135,4],[21,593],[-333,431],[-476,-46],[-326,-86],[-265,533],[-227,223],[-431,423],[-52,51],[-715,-349],[11,-2178]],[[65546,74986],[-142,-29],[-195,463],[-188,166],[-315,-123],[-123,-197]],[[64583,75266],[-15,144],[68,246],[-53,206],[-322,202],[-125,530],[-154,150],[-9,192],[270,-56],[11,432],[236,96],[243,-88],[50,576],[-50,365],[-278,-28],[-236,144],[-321,-260],[-259,-124]],[[63639,77993],[-142,96],[29,304],[-177,395],[-207,-17],[-235,401],[160,448],[-81,120],[222,649],[285,-342],[35,431],[573,643],[434,15],[612,-409],[329,-239],[295,249],[440,12],[356,-306],[80,175],[391,-25],[69,280],[-450,406],[267,288],[-52,161],[266,153],[-200,405],[127,202],[1039,205],[136,146],[695,218],[250,245],[499,-127],[88,-612],[290,144],[356,-202],[-23,-322],[267,33],[696,558],[-102,-185],[355,-457],[620,-1500],[148,309],[383,-340],[399,151],[154,-106],[133,-341],[194,-115],[119,-251],[358,79],[147,-361]],[[69711,75551],[83,-58],[-234,-382],[205,-223],[198,147],[329,-311],[-355,-425],[-212,58]],[[69725,74357],[-114,-15],[-40,164],[58,274],[-371,-137],[-89,-380],[-132,-326],[-232,28],[-72,-261],[204,-140],[60,-440],[-156,-598]],[[68841,72526],[-210,124],[-154,4]],[[68477,72654],[7,362],[-369,253],[-291,289],[-181,278],[-317,408],[-137,609],[-93,108],[-301,-27],[-106,121],[-30,471],[-374,312],[-234,-343],[-237,-204],[45,-297],[-313,-8]],[[89166,49043],[482,-407],[513,-338],[192,-302],[154,-297],[43,-349],[462,-365],[68,-313],[-256,-64],[62,-393],[248,-388],[180,-627],[159,20],[-11,-262],[215,-100],[-84,-111],[295,-249],[-30,-171],[-184,-41],[-69,153],[-238,66],[-281,89],[-216,377],[-158,325],[-144,517],[-362,259],[-235,-169],[-170,-195],[35,-436],[-218,-203],[-155,99],[-288,25]],[[89175,45193],[-4,1925],[-5,1925]],[[92399,48417],[106,-189],[33,-307],[-87,-157],[-52,348],[-65,229],[-126,193],[-158,252],[-200,174],[77,143],[150,-166],[94,-130],[117,-142],[111,-248]],[[92027,47129],[-152,-144],[-142,-138],[-148,1],[-228,171],[-158,165],[23,183],[249,-86],[152,46],[42,283],[40,15],[27,-314],[158,45],[78,202],[155,211],[-30,348],[166,11],[56,-97],[-5,-327],[-93,-361],[-146,-48],[-44,-166]],[[92988,47425],[84,-134],[135,-375],[131,-200],[-39,-166],[-78,-59],[-120,227],[-122,375],[-59,450],[38,57],[30,-175]],[[89175,45193],[-247,485],[-282,118],[-69,-168],[-352,-18],[118,481],[175,164],[-72,642],[-134,496],[-538,500],[-229,50],[-417,546],[-82,-287],[-107,-52],[-63,216],[-1,257],[-212,290],[299,213],[198,-11],[-23,156],[-407,1],[-110,352],[-248,109],[-117,293],[374,143],[142,192],[446,-242],[44,-220],[78,-955],[287,-354],[232,627],[319,356],[247,1],[238,-206],[206,-212],[298,-113]],[[84713,45326],[28,-117],[5,-179]],[[84746,45030],[-181,-441],[-238,-130],[-33,71],[25,201],[119,360],[275,235]],[[87280,46506],[-27,445],[49,212],[58,200],[63,-173],[0,-282],[-143,-402]],[[82744,53024],[-158,-533],[204,-560],[-48,-272],[312,-546],[-329,-70],[-93,-403],[12,-535],[-267,-404],[-7,-589],[-107,-903],[-41,210],[-316,-266],[-110,361],[-198,34],[-139,189],[-330,-212],[-101,285],[-182,-32],[-229,68],[-43,793],[-138,164],[-134,505],[-38,517],[32,548],[165,392]],[[80461,51765],[47,-395],[190,-334],[179,121],[177,-43],[162,299],[133,52],[263,-166],[226,126],[143,822],[107,205],[96,672],[319,0],[241,-100]],[[85936,48924],[305,-172],[101,-452],[-234,244],[-232,49],[-157,-39],[-192,21],[65,325],[344,24]],[[85242,48340],[-192,108],[-54,254],[281,29],[69,-195],[-104,-196]],[[85536,51864],[20,-322],[164,-52],[26,-241],[-15,-517],[-143,58],[-42,-359],[114,-312],[-78,-71],[-112,374],[-82,755],[56,472],[92,215]],[[84146,51097],[319,25],[275,429],[48,-132],[-223,-587],[-209,-113],[-267,115],[-463,-29],[-243,-85],[-39,-447],[248,-526],[150,268],[518,201],[-22,-272],[-121,86],[-121,-347],[-245,-229],[263,-757],[-50,-203],[249,-682],[-2,-388],[-148,-173],[-109,207],[134,484],[-273,-229],[-69,164],[36,228],[-200,346],[21,576],[-186,-179],[24,-689],[11,-846],[-176,-85],[-119,173],[79,544],[-43,570],[-117,4],[-86,405],[115,387],[40,469],[139,891],[58,243],[237,439],[217,-174],[350,-82]],[[83414,44519],[-368,414],[259,116],[146,-180],[97,-180],[-17,-159],[-117,-11]],[[83705,45536],[185,45],[249,216],[-41,-328],[-417,-168],[-370,73],[0,216],[220,123],[174,-177]],[[82849,45639],[172,48],[69,-251],[-321,-119],[-193,-79],[-149,5],[95,340],[153,5],[74,209],[100,-158]],[[80134,46785],[38,-210],[533,-59],[61,244],[515,-284],[101,-383],[417,-108],[341,-351],[-317,-225],[-306,238],[-251,-16],[-288,44],[-260,106],[-322,225],[-204,59],[-116,-74],[-506,243],[-48,254],[-255,44],[191,564],[337,-35],[224,-231],[115,-45]],[[78991,49939],[47,-412],[97,-330],[204,-52],[135,-374],[-70,-735],[-11,-914],[-308,-12],[-234,494],[-356,482],[-119,358],[-210,481],[-138,443],[-212,827],[-244,493],[-81,508],[-103,461],[-250,372],[-145,506],[-209,330],[-290,652],[-24,300],[178,-24],[430,-114],[246,-577],[215,-401],[153,-246],[263,-635],[283,-9],[233,-405],[161,-495],[211,-270],[-111,-482],[159,-205],[100,-15]],[[30935,19481],[106,-274],[139,-443],[361,-355],[389,-147],[-125,-296],[-264,-29],[-141,208]],[[31400,18145],[-168,16],[-297,1],[0,1319]],[[33993,32727],[-70,-473],[-74,-607],[3,-588],[-61,-132],[-21,-382]],[[33770,30545],[-19,-308],[353,-506],[-38,-408],[173,-257],[-14,-289],[-267,-757],[-412,-317],[-557,-123],[-305,59],[59,-352],[-57,-442],[51,-298],[-167,-208],[-284,-82],[-267,216],[-108,-155],[39,-587],[188,-178],[152,186],[82,-307],[-255,-183],[-223,-367],[-41,-595],[-66,-316],[-262,-2],[-218,-302],[-80,-443],[273,-433],[266,-119],[-96,-531],[-328,-333],[-180,-692],[-254,-234],[-113,-276],[89,-614],[185,-342],[-117,30]],[[30952,19680],[-257,93],[-672,79],[-115,344],[6,443],[-185,-38],[-98,214],[-24,626],[213,260],[88,375],[-33,299],[148,504],[101,782],[-30,347],[122,112],[-30,223],[-129,118],[92,248],[-126,224],[-65,682],[112,120],[-47,720],[65,605],[75,527],[166,215],[-84,576],[-1,543],[210,386],[-7,494],[159,576],[1,544],[-72,108],[-128,1020],[171,607],[-27,572],[100,537],[182,555],[196,367],[-83,232],[58,190],[-9,985],[302,291],[96,614],[-34,148]],[[31359,37147],[231,534],[364,-144],[163,-427],[109,475],[316,-24],[45,-127]],[[32587,37434],[511,-964],[227,-89],[339,-437],[286,-231],[40,-261],[-273,-898],[280,-160],[312,-91],[220,95],[252,453],[45,521]],[[34826,35372],[138,114],[139,-341],[-6,-472],[-234,-326],[-186,-241],[-314,-573],[-370,-806]],[[31400,18145],[-92,-239],[-238,-183],[-137,19],[-164,48],[-202,177],[-291,86],[-350,330],[-283,317],[-383,662],[229,-124],[390,-395],[369,-212],[143,271],[90,405],[256,244],[198,-70]],[[30669,40193],[136,-402],[37,-426],[146,-250],[-88,-572],[150,-663],[109,-814],[200,81]],[[30952,19680],[-247,4],[-134,-145],[-250,-213],[-45,-552],[-118,-14],[-313,192],[-318,412],[-346,338],[-87,374],[79,346],[-140,393],[-36,1007],[119,568],[293,457],[-422,172],[265,522],[94,982],[309,-208],[145,1224],[-186,157],[-87,-738],[-175,83],[87,845],[95,1095],[127,404],[-80,576],[-22,666],[117,19],[170,954],[192,945],[118,881],[-64,885],[83,487],[-34,730],[163,721],[50,1143],[89,1227],[87,1321],[-20,967],[-58,832]],[[30452,39739],[143,151],[74,303]],[[58538,45652],[-109,60],[-373,-99],[-75,-71],[-79,-377],[62,-261],[-49,-699],[-34,-593],[75,-105],[194,-230],[76,107],[23,-637],[-212,5],[-114,325],[-103,252],[-213,82],[-62,310],[-170,-187],[-222,83],[-93,268],[-176,55],[-131,-15],[-15,184],[-96,15]],[[56642,44124],[-127,35],[-172,-89],[-121,15],[-68,-54],[15,703],[-93,219],[-21,363],[41,356],[-56,228],[-5,372],[-337,-5],[24,213],[-142,-2],[-15,-103],[-172,-23],[-69,-344],[-42,-148],[-154,83],[-91,-83],[-184,-47],[-106,309],[-64,191],[-80,354],[-68,440],[-820,8],[-98,-71],[-80,11],[-115,-79]],[[53422,46976],[-39,183]],[[53383,47159],[71,62],[9,258],[45,152],[101,124]],[[53609,47755],[73,-60],[95,226],[152,-6],[17,-167],[104,-105],[164,370],[161,289],[71,189],[-10,486],[121,574],[127,304],[183,285],[32,189],[7,216],[45,205],[-14,335],[34,524],[55,368],[83,316],[16,357]],[[55125,52650],[25,412],[108,300],[149,190],[229,-200],[177,-218],[203,-59],[207,-115],[83,357],[38,46],[127,-60],[309,295],[110,-125],[90,18],[41,143],[104,51],[209,-62],[178,-14],[91,63]],[[57603,53672],[169,-488],[124,-71],[75,99],[128,-39],[155,125],[66,-252],[244,-393]],[[58564,52653],[-16,-691],[111,-80],[-89,-210],[-107,-157],[-106,-308],[-59,-274],[-15,-475],[-65,-225],[-2,-446]],[[58216,49787],[-80,-165],[-10,-351],[-38,-46],[-26,-323]],[[58062,48902],[70,-268],[17,-713]],[[61551,49585],[-165,488],[-3,2152],[243,670]],[[61626,52895],[76,186],[178,11],[247,417],[362,26],[785,1773]],[[63274,55308],[194,493],[125,363],[0,308],[0,596],[1,244],[2,9]],[[63596,57321],[89,12],[128,88],[147,59],[132,202],[105,2],[6,-163],[-25,-344],[1,-310],[-59,-214],[-78,-639],[-134,-659],[-172,-755],[-238,-866],[-237,-661],[-327,-806],[-278,-479],[-415,-586],[-259,-450],[-304,-715],[-64,-312],[-63,-140]],[[59417,50018],[-3,627],[80,239],[137,391],[101,431],[-123,678],[-32,296],[-132,411]],[[59445,53091],[171,352],[188,390]],[[59804,53833],[145,-99],[0,-332],[95,-194],[193,0],[352,-502],[87,-6],[65,16],[62,-68],[185,-47],[82,247],[254,247],[112,-200],[190,0]],[[61551,49585],[-195,-236],[-68,-246],[-104,-44],[-40,-416],[-89,-238],[-54,-393],[-112,-195]],[[56824,55442],[-212,258],[-96,170],[-18,184],[45,246],[-1,241],[-160,369],[-31,253]],[[56351,57163],[3,143],[-102,174],[-3,343],[-58,228],[-98,-34],[28,217],[72,246],[-32,245],[92,181],[-58,138],[73,365],[127,435],[240,-41],[-14,2345]],[[56621,62148],[3,248],[320,2],[0,1180]],[[56944,63578],[1117,0],[1077,0],[1102,0]],[[60240,63578],[90,-580],[-61,-107],[40,-608],[102,-706],[106,-145],[152,-219]],[[60669,61213],[-141,-337],[-204,-97],[-88,-181],[-27,-393],[-120,-868],[30,-236]],[[60119,59101],[-45,-508],[-112,-582],[-168,-293],[-119,-451],[-28,-241],[-132,-166],[-82,-618],[4,-531]],[[59437,55711],[-3,460],[-39,12],[5,294],[-33,203],[-143,233],[-34,426],[34,436],[-129,41],[-19,-132],[-167,-30],[67,-173],[23,-355],[-152,-324],[-138,-426],[-144,-61],[-233,345],[-105,-122],[-29,-172],[-143,-112],[-9,-122],[-277,0],[-38,122],[-200,20],[-100,-101],[-77,51],[-143,344],[-48,163],[-200,-81],[-76,-274],[-72,-528],[-95,-111],[-85,-65],[189,-230]],[[56351,57163],[-176,-101],[-141,-239],[-201,-645],[-261,-273],[-269,36],[-78,-54],[28,-208],[-145,-207],[-118,-230],[-350,-226],[-69,134],[-46,11],[-52,-152],[-229,-44]],[[54244,54965],[43,160],[-87,407],[-39,245],[-121,100],[-164,345],[60,279],[127,-60],[78,42],[155,-6],[-151,537],[10,393],[-18,392],[-111,378]],[[54026,58177],[28,279],[-178,13],[0,380],[-115,219],[120,778],[354,557],[15,769],[107,1199],[60,254],[-116,203],[-4,188],[-104,153],[-68,919]],[[54125,64088],[280,323],[1108,-1132],[1108,-1131]],[[30080,62227],[24,-321],[-21,-228],[-68,-99],[71,-177],[-5,-161]],[[30081,61241],[-185,100],[-131,-41],[-169,43],[-130,-110],[-149,184],[24,190],[256,-82],[210,-47],[100,131],[-127,256],[2,226],[-175,92],[62,163],[170,-26],[241,-93]],[[30080,62227],[34,101],[217,-3],[165,-152],[73,15],[50,-209],[152,11],[-9,-176],[124,-21],[136,-217],[-103,-240],[-132,128],[-127,-25],[-92,28],[-50,-107],[-106,-37],[-43,144],[-92,-85],[-111,-405],[-71,94],[-14,170]],[[76049,98451],[600,133],[540,-297],[640,-572],[-69,-531],[-606,-73],[-773,170],[-462,226],[-213,423],[-379,117],[722,404]],[[78565,97421],[704,-336],[-82,-240],[-1566,-228],[507,776],[229,66],[208,-38]],[[88563,95563],[734,-26],[1004,-313],[-219,-439],[-1023,16],[-461,-139],[-550,384],[149,406],[366,111]],[[91172,95096],[697,-155],[-321,-234],[-444,53],[-516,233],[66,192],[518,-89]],[[88850,93928],[263,234],[348,54],[394,-226],[34,-155],[-421,-4],[-569,66],[-49,31]],[[62457,98194],[542,107],[422,8],[57,-160],[159,142],[262,97],[412,-129],[-107,-90],[-373,-78],[-250,-45],[-39,-97],[-324,-98],[-301,140],[158,185],[-618,18]],[[56314,82678],[-511,-9],[-342,67]],[[55461,82736],[63,260],[383,191]],[[55907,83187],[291,-103],[123,-94],[-30,-162],[23,-150]],[[64863,94153],[665,518],[-75,268],[621,312],[917,380],[925,110],[475,220],[541,76],[193,-233],[-187,-184],[-984,-293],[-848,-282],[-863,-562],[-414,-577],[-435,-568],[56,-491],[531,-484],[-164,-52],[-907,77],[-74,262],[-503,158],[-40,320],[284,126],[-10,323],[551,503],[-255,73]],[[89698,82309],[96,-569],[-7,-581],[114,-597],[280,-1046],[-411,195],[-171,-854],[271,-605],[-8,-413],[-211,356],[-182,-457],[-51,496],[31,575],[-32,638],[64,446],[13,790],[-163,581],[24,808],[257,271],[-110,274],[123,83],[73,-391]],[[86327,75524],[-39,104]],[[86288,75628],[-2,300],[142,16],[40,698],[-73,506],[238,208],[338,-104],[186,575],[96,647],[107,216],[146,532],[-459,-175],[-240,-233],[-423,1],[-112,555],[-329,420],[-483,189],[-103,579],[-97,363],[-104,254],[-172,596],[-244,217],[-415,176],[-369,-16],[-345,-106],[-229,-294],[152,-141],[4,-326],[-155,-189],[-251,-627],[3,-260],[-392,-373],[-333,223]],[[82410,80055],[-331,-49],[-146,198],[-166,63],[-407,-416],[-366,-98],[-255,-146],[-350,96],[-258,-6],[-168,302],[-272,284],[-279,78],[-351,-78],[-263,-109],[-394,248],[-53,443],[-327,152],[-252,69],[-311,244],[-288,-612],[113,-348],[-270,-411],[-402,148],[-277,22],[-186,276],[-289,8],[-242,182],[-423,-278],[-530,-509],[-292,-102]],[[74375,79706],[-109,-49]],[[63639,77993],[-127,-350],[-269,-97],[-276,-610],[252,-561],[-27,-398],[303,-696]],[[63495,75281],[-166,-238],[-48,-150],[-122,40],[-191,359],[-78,20]],[[62890,75312],[-175,137],[-85,242],[-259,124],[-169,-93],[-48,110],[-378,283],[-409,96],[-235,101],[-34,-70]],[[61098,76242],[-354,499],[-317,223],[-240,347],[202,95],[231,494],[-156,234],[410,241],[-8,129],[-249,-95]],[[60617,78409],[9,262],[143,165],[269,43],[44,197],[-62,326],[113,310],[-3,173],[-410,192],[-162,-6],[-172,277],[-213,-94],[-352,208],[6,116],[-99,256],[-222,29],[-23,183],[70,120],[-178,334],[-288,-57],[-84,30],[-70,-134],[-104,23]],[[58829,81362],[-68,379],[-66,196],[54,55],[224,-20],[108,129],[-80,157],[-187,104],[16,107],[-113,108],[-174,387],[60,159],[-27,277],[-272,141],[-146,-70],[-39,146],[-293,149]],[[57826,83766],[-89,348],[-24,287],[-134,136]],[[57579,84537],[120,187],[-83,551],[198,341],[-42,103]],[[57772,85719],[316,327],[-291,280]],[[57797,86326],[594,755],[258,341],[105,301],[-411,405],[113,385],[-250,440],[187,506],[-323,673],[256,445],[-425,394],[41,414]],[[57942,91385],[224,54],[473,237]],[[58639,91676],[286,206],[456,-358],[761,-140],[1050,-668],[213,-281],[18,-393],[-308,-311],[-454,-157],[-1240,449],[-204,-75],[453,-433],[18,-274],[18,-604],[358,-180],[217,-153],[36,286],[-168,254],[177,224],[672,-368],[233,144],[-186,433],[647,578],[256,-34],[260,-206],[161,406],[-231,352],[136,353],[-204,367],[777,-190],[158,-331],[-351,-73],[1,-328],[219,-203],[429,128],[68,377],[580,282],[970,507],[209,-29],[-273,-359],[344,-61],[199,202],[521,16],[412,245],[317,-356],[315,391],[-291,343],[145,195],[820,-179],[385,-185],[1006,-675],[186,309],[-282,313],[-8,125],[-335,58],[92,280],[-149,461],[-8,189],[512,535],[183,537],[206,116],[736,-156],[57,-328],[-263,-479],[173,-189],[89,-413],[-63,-809],[307,-362],[-120,-395],[-544,-839],[318,-87],[110,213],[306,151],[74,293],[240,281],[-162,336],[130,390],[-304,49],[-67,328],[222,593],[-361,482],[497,398],[-64,421],[139,13],[145,-328],[-109,-570],[297,-108],[-127,426],[465,233],[577,31],[513,-337],[-247,492],[-28,630],[483,119],[669,-26],[602,77],[-226,309],[321,388],[319,16],[540,293],[734,79],[93,162],[729,55],[227,-133],[624,314],[510,-10],[77,255],[265,252],[656,242],[476,-191],[-378,-146],[629,-90],[75,-292],[254,143],[812,-7],[626,-289],[223,-221],[-69,-307],[-307,-175],[-730,-328],[-209,-175],[345,-83],[410,-149],[251,112],[141,-379],[122,153],[444,93],[892,-97],[67,-276],[1162,-88],[15,451],[590,-104],[443,4],[449,-312],[128,-378],[-165,-247],[349,-465],[437,-240],[268,620],[446,-266],[473,159],[538,-182],[204,166],[455,-83],[-201,549],[367,256],[2509,-384],[236,-351],[727,-451],[1122,112],[553,-98],[231,-244],[-33,-432],[342,-168],[372,121],[492,15],[525,-116],[526,66],[484,-526],[344,189],[-224,378],[123,262],[886,-165],[578,36],[799,-282],[-99610,-258],[681,-451],[728,-588],[-24,-367],[187,-147],[-64,429],[754,-88],[544,-553],[-276,-257],[-455,-61],[-7,-578],[-111,-122],[-260,17],[-212,206],[-369,172],[-62,257],[-283,96],[-315,-76],[-151,207],[60,219],[-333,-140],[126,-278],[-158,-251],[99997,-3],[-357,-260],[-360,44],[250,-315],[166,-487],[128,-159],[32,-244],[-71,-157],[-518,129],[-777,-445],[-247,-69],[-425,-415],[-403,-362],[-102,-269],[-397,409],[-724,-464],[-126,219],[-268,-253],[-371,81],[-90,-388],[-333,-572],[10,-239],[316,-132],[-37,-860],[-258,-22],[-119,-494],[116,-255],[-486,-302],[-96,-674],[-415,-144],[-83,-600],[-400,-551],[-103,407],[-119,862],[-155,1313],[134,819],[234,353],[14,276],[432,132],[496,744],[479,608],[499,471],[223,833],[-337,-50],[-167,-487],[-705,-649],[-227,727],[-717,-201],[-696,-990],[230,-362],[-620,-154],[-430,-61],[20,427],[-431,90],[-344,-291],[-850,102],[-914,-175],[-899,-1153],[-1065,-1394],[438,-74],[136,-370],[270,-132],[178,295],[305,-38],[401,-650],[9,-503],[-217,-590],[-23,-705],[-126,-945],[-418,-855],[-94,-409],[-377,-688],[-374,-682],[-179,-349],[-370,-346],[-175,-8],[-175,287],[-373,-432],[-43,-197]],[[0,92833],[36,24],[235,-1],[402,-169],[-24,-81],[-286,-141],[-363,-36],[99694,-30],[-49,187],[-99645,247]],[[59287,77741],[73,146],[198,-127],[89,-23],[36,-117],[42,-18]],[[59725,77602],[2,-51],[136,-142],[284,35],[-55,-210],[-304,-103],[-377,-342],[-154,121],[61,277],[-304,173],[50,113],[265,197],[-42,71]],[[28061,66408],[130,47],[184,-18],[8,-153],[-303,-95],[-19,219]],[[28391,66555],[220,-265],[-48,-420],[-51,75],[4,309],[-124,234],[-1,67]],[[28280,65474],[84,-23],[97,-491],[1,-343],[-68,-29],[-70,340],[-104,171],[60,375]],[[33000,19946],[333,354],[236,-148],[167,237],[222,-266],[-83,-207],[-375,-177],[-125,207],[-236,-266],[-139,266]],[[54206,97653],[105,202],[408,20],[350,-206],[915,-440],[-699,-233],[-155,-435],[-243,-111],[-132,-490],[-335,-23],[-598,361],[252,210],[-416,170],[-541,499],[-216,463],[757,212],[152,-207],[396,8]],[[57942,91385],[117,414],[-356,235],[-431,-200],[-137,-433],[-265,-262],[-298,143],[-362,-29],[-309,312],[-167,-156]],[[55734,91409],[-172,-24],[-41,-389],[-523,95],[-74,-329],[-267,2],[-183,-421],[-278,-655],[-431,-831],[101,-202],[-97,-234],[-275,10],[-180,-554],[17,-784],[177,-300],[-92,-694],[-231,-405],[-122,-341]],[[53063,85353],[-187,363],[-548,-684],[-371,-138],[-384,301],[-99,635],[-88,1363],[256,381],[733,496],[549,609],[508,824],[668,1141],[465,444],[763,741],[610,259],[457,-31],[423,489],[506,-26],[499,118],[869,-433],[-358,-158],[305,-371]],[[57613,97879],[-412,-318],[-806,-70],[-819,98],[-50,163],[-398,11],[-304,271],[858,165],[403,-142],[281,177],[702,-148],[545,-207]],[[56867,96577],[-620,-241],[-490,137],[191,152],[-167,189],[575,119],[110,-222],[401,-134]],[[37010,99398],[932,353],[975,-27],[354,218],[982,57],[2219,-74],[1737,-469],[-513,-227],[-1062,-26],[-1496,-58],[140,-105],[984,65],[836,-204],[540,181],[231,-212],[-305,-344],[707,220],[1348,229],[833,-114],[156,-253],[-1132,-420],[-157,-136],[-888,-102],[643,-28],[-324,-431],[-224,-383],[9,-658],[333,-386],[-434,-24],[-457,-187],[513,-313],[65,-502],[-297,-55],[360,-508],[-617,-42],[322,-241],[-91,-208],[-391,-91],[-388,-2],[348,-400],[4,-263],[-549,244],[-143,-158],[375,-148],[364,-361],[105,-476],[-495,-114],[-214,228],[-344,340],[95,-401],[-322,-311],[732,-25],[383,-32],[-745,-515],[-755,-466],[-813,-204],[-306,-2],[-288,-228],[-386,-624],[-597,-414],[-192,-24],[-370,-145],[-399,-138],[-238,-365],[-4,-415],[-141,-388],[-453,-472],[112,-462],[-125,-488],[-142,-577],[-391,-36],[-410,482],[-556,3],[-269,324],[-186,577],[-481,735],[-141,385],[-38,530],[-384,546],[100,435],[-186,208],[275,691],[418,220],[110,247],[58,461],[-318,-209],[-151,-88],[-249,-84],[-341,193],[-19,401],[109,314],[258,9],[567,-157],[-478,375],[-249,202],[-276,-83],[-232,147],[310,550],[-169,220],[-220,409],[-335,626],[-353,230],[3,247],[-745,346],[-590,43],[-743,-24],[-677,-44],[-323,188],[-482,372],[729,186],[559,31],[-1188,154],[-627,241],[39,229],[1051,285],[1018,284],[107,214],[-750,213],[243,235],[961,413],[404,63],[-115,265],[658,156],[854,93],[853,5],[303,-184],[737,325],[663,-221],[390,-46],[577,-192],[-660,318],[38,253]],[[69148,21851],[179,-186],[263,-74],[9,-112],[-77,-269],[-427,-38],[-7,314],[41,244],[19,121]],[[84713,45326],[32,139],[239,133],[194,20],[87,74],[105,-74],[-102,-160],[-289,-258],[-233,-170]],[[54540,33696],[133,292],[109,-162],[47,-252],[125,-43],[175,-112],[149,43],[248,302],[0,2182]],[[55526,35946],[75,-88],[165,-562],[-26,-360],[62,-207],[199,60],[139,264],[132,177],[68,283],[135,137],[117,-71],[133,-166],[226,-29],[178,138],[28,184],[48,283],[152,47],[83,222],[93,393],[249,442],[393,435]],[[58175,37528],[113,-7],[134,-100],[94,71],[148,-59]],[[58664,37433],[133,-832],[72,-419],[-49,-659],[23,-212]],[[58843,35311],[-140,108],[-80,-42],[-26,-172],[-76,-222],[2,-204],[166,-320],[163,63],[56,263]],[[58908,34785],[211,-5]],[[59119,34780],[-70,-430],[-32,-491],[-72,-267],[-190,-298],[-54,-86],[-118,-300],[-77,-303],[-158,-424],[-314,-609],[-196,-355],[-210,-269],[-290,-229],[-141,-31],[-36,-164],[-169,88],[-138,-113],[-301,114],[-168,-72],[-115,31],[-286,-233],[-238,-94],[-171,-223],[-127,-14],[-117,210],[-94,11],[-120,264],[-13,-82],[-37,159],[2,346],[-90,396],[89,108],[-7,453],[-182,553],[-139,501],[-1,1],[-199,768]],[[58049,33472],[-121,182],[-130,-120],[-151,-232],[-148,-374],[209,-454],[99,59],[51,188],[155,93],[47,192],[85,288],[-96,178]],[[23016,65864],[-107,-518],[-49,-426],[-20,-791],[-27,-289],[48,-322],[86,-288],[56,-458],[184,-440],[65,-337],[109,-291],[295,-157],[114,-247],[244,165],[212,60],[208,106],[175,101],[176,241],[67,345],[22,496],[48,173],[188,155],[294,137],[246,-21],[169,50],[66,-125],[-9,-285],[-149,-351],[-66,-360],[51,-103],[-42,-255],[-69,-461],[-71,152],[-58,-10]],[[25472,61510],[-53,-8],[-99,-357],[-51,70],[-33,-27],[2,-87]],[[25238,61101],[-257,7],[-259,-1],[-1,-333],[-125,-1],[103,-198],[103,-136],[31,-128],[45,-36],[-7,-201],[-357,-2],[-133,-481],[39,-111],[-32,-138],[-7,-172]],[[24381,59170],[-314,636],[-144,191],[-226,155],[-156,-43],[-223,-223],[-140,-58],[-196,156],[-208,112],[-260,271],[-208,83],[-314,275],[-233,282],[-70,158],[-155,35],[-284,187],[-116,270],[-299,335],[-139,373],[-66,288],[93,57],[-29,169],[64,153],[1,204],[-93,266],[-25,235],[-94,298],[-244,587],[-280,462],[-135,368],[-238,241],[-51,145],[42,365],[-142,138],[-164,287],[-69,412],[-149,48],[-162,311],[-130,288],[-12,184],[-149,446],[-99,452],[5,227],[-201,234],[-93,-25],[-159,163],[-44,-240],[46,-284],[27,-444],[95,-243],[206,-407],[46,-139],[42,-42],[37,-203],[49,8],[56,-381],[85,-150],[59,-210],[174,-300],[92,-550],[83,-259],[77,-277],[15,-311],[134,-20],[112,-268],[100,-264],[-6,-106],[-117,-217],[-49,3],[-74,359],[-181,337],[-201,286],[-142,150],[9,432],[-42,320],[-132,183],[-191,264],[-37,-76],[-70,154],[-171,143],[-164,343],[20,44],[115,-33],[103,221],[10,266],[-214,422],[-163,163],[-102,369],[-103,388],[-129,472],[-113,531]],[[33993,32727],[180,63],[279,-457],[103,18],[286,-379],[218,-327],[160,-402],[-122,-280],[77,-334]],[[35174,30629],[-121,-372],[-313,-328],[-205,118],[-151,-63],[-256,253],[-189,-19],[-169,327]],[[34826,35372],[54,341],[38,350],[0,325],[-100,107],[-104,-96],[-103,26],[-33,228],[-26,541],[-52,177],[-187,160],[-114,-116],[-293,113],[18,802],[-82,329]],[[33842,38659],[87,122],[-27,337],[77,259],[49,465],[-66,367],[-151,166],[-30,233],[41,342],[-533,24],[-107,688],[81,10],[-3,255],[-55,172],[-12,342],[-161,175],[-175,-6],[-115,172],[-188,117],[-109,220],[-311,98],[-302,529],[23,396],[-34,227],[29,443],[-363,-100],[-147,-222],[-243,-239],[-62,-179],[-143,-13],[-206,50]],[[30686,44109],[-157,-102],[-126,68],[18,898],[-228,-348],[-245,15],[-105,315],[-184,34],[59,254],[-155,359],[-115,532],[73,108],[0,250],[168,171],[-28,319],[71,206],[20,275],[318,402],[227,114],[37,89],[251,-28]],[[30585,48040],[125,1620],[6,256],[-43,339],[-123,215],[1,430],[156,97],[56,-61],[9,226],[-162,61],[-4,370],[541,-13],[92,203],[77,-187],[55,-349],[52,73]],[[31423,51320],[153,-312],[216,38],[54,181],[206,138],[115,97],[32,250],[198,168],[-15,124],[-235,51],[-39,372],[12,396],[-125,153],[52,55],[206,-76],[221,-148],[80,140],[200,92],[310,221],[102,225],[-37,167]],[[33129,53652],[145,26],[64,-136],[-36,-259],[96,-90],[63,-274],[-77,-209],[-44,-502],[71,-299],[20,-274],[171,-277],[137,-29],[30,116],[88,25],[126,104],[90,157],[154,-50],[67,21]],[[34294,51702],[151,-48],[25,120],[-46,118],[28,171],[112,-53],[131,61],[159,-125]],[[34854,51946],[121,-122],[86,160],[62,-25],[38,-166],[133,42],[107,224],[85,436],[164,540]],[[35650,53035],[95,28],[69,-327],[155,-1033],[149,-97],[7,-408],[-208,-487],[86,-178],[491,-92],[10,-593],[211,388],[349,-212],[462,-361],[135,-346],[-45,-327],[323,182],[540,-313],[415,23],[411,-489],[355,-662],[214,-170],[237,-24],[101,-186],[94,-752],[46,-358],[-110,-977],[-142,-385],[-391,-822],[-177,-668],[-206,-513],[-69,-11],[-78,-435],[20,-1107],[-77,-910],[-30,-390],[-88,-233],[-49,-790],[-282,-771],[-47,-610],[-225,-256],[-65,-355],[-302,2],[-437,-227],[-195,-263],[-311,-173],[-327,-470],[-235,-586],[-41,-441],[46,-326],[-51,-597],[-63,-289],[-195,-325],[-308,-1040],[-244,-468],[-189,-277],[-127,-562],[-183,-337]],[[33842,38659],[-4,182],[-259,302],[-258,9],[-484,-172],[-133,-520],[-7,-318],[-110,-708]],[[30669,40193],[175,638],[-119,496],[63,199],[-49,219],[108,295],[6,503],[13,415],[60,200],[-240,951]],[[30452,39739],[-279,340],[-24,242],[-551,593],[-498,646],[-214,365],[-115,488],[46,170],[-236,775],[-274,1090],[-262,1177],[-114,269],[-87,435],[-216,386],[-198,239],[90,264],[-134,563],[86,414],[221,373]],[[27693,48568],[33,-246],[-79,-141],[8,-216],[114,47],[113,-64],[116,-298],[157,243],[53,398],[170,514],[334,233],[303,619],[86,384],[-38,449]],[[29063,50490],[74,56],[184,-280],[89,-279],[129,-152],[163,-620],[207,-74],[153,157],[101,-103],[166,51],[213,-276],[-179,-602],[83,-14],[139,-314]],[[29063,50490],[-119,140],[-137,195],[-79,-94],[-235,82],[-68,255],[-52,-10],[-278,338]],[[28095,51396],[-37,183],[103,44],[-12,296],[65,214],[138,40],[117,371],[106,310],[-102,141],[52,343],[-62,540],[59,155],[-44,500],[-112,315]],[[28366,54848],[36,287],[89,-43],[52,176],[-64,348],[34,86]],[[28513,55702],[143,-18],[209,412],[114,63],[3,195],[51,500],[159,274],[175,11],[22,123],[218,-49],[218,298],[109,132],[134,285],[98,-36],[73,-156],[-54,-199]],[[30185,57537],[-178,-99],[-71,-295],[-107,-169],[-81,-220],[-34,-422],[-77,-345],[144,-40],[35,-271],[62,-130],[21,-238],[-33,-219],[10,-123],[69,-49],[66,-207],[357,57],[161,-75],[196,-508],[112,63],[200,-32],[158,68],[99,-102],[-50,-318],[-62,-199],[-22,-423],[56,-393],[79,-175],[9,-133],[-140,-294],[100,-130],[74,-207],[85,-589]],[[28366,54848],[-93,170],[-59,319],[68,158],[-70,40],[-52,196],[-138,164],[-122,-38],[-56,-205],[-112,-149],[-61,-20],[-27,-123],[132,-321],[-75,-76],[-40,-87],[-130,-30],[-48,353],[-36,-101],[-92,35],[-56,238],[-114,39],[-72,69],[-119,-1],[-8,-128],[-32,89]],[[26954,55439],[14,117],[23,120],[-10,107],[41,70],[-58,88],[-1,238],[107,53]],[[27070,56232],[100,-212],[-6,-126],[111,-26],[26,48],[77,-145],[136,42],[119,150],[168,119],[95,176],[153,-34],[-10,-58],[155,-21],[124,-102],[90,-177],[105,-164]],[[26954,55439],[-151,131],[-56,124],[32,103],[-11,130],[-77,142],[-109,116],[-95,76],[-19,173],[-73,105],[18,-172],[-55,-141],[-64,164],[-89,58],[-38,120],[2,179],[36,187],[-78,83],[64,114]],[[26191,57131],[42,76],[183,-156],[63,77],[89,-50],[46,-121],[82,-40],[66,126]],[[26762,57043],[70,-321],[108,-238],[130,-252]],[[26191,57131],[-96,186],[-130,238],[-61,200],[-117,185],[-140,267],[31,91],[46,-88],[21,41]],[[25745,58251],[86,25],[35,135],[41,5],[-6,290],[65,14],[58,-4],[60,158],[82,-120],[29,74],[51,70],[97,163],[4,121],[27,-5],[36,141],[29,17],[47,-90],[56,-27],[61,76],[70,0],[97,77],[38,81],[95,-12]],[[26903,59440],[-24,-57],[-14,-132],[29,-216],[-64,-202],[-30,-237],[-9,-261],[15,-152],[7,-266],[-43,-58],[-26,-253],[19,-156],[-56,-151],[12,-159],[43,-97]],[[25745,58251],[-48,185],[-84,51]],[[25613,58487],[19,237],[-38,64],[-57,42],[-122,-70],[-10,79],[-84,95],[-60,118],[-82,50]],[[25179,59102],[58,150],[-22,116],[20,113],[131,166],[127,225]],[[25493,59872],[29,-23],[61,104],[79,8],[26,-48],[43,29],[129,-53],[128,15],[90,66],[32,66],[89,-31],[66,-40],[73,14],[55,51],[127,-82],[44,-13],[85,-110],[80,-132],[101,-91],[73,-162]],[[25613,58487],[-31,-139],[-161,9],[-100,57],[-115,117],[-154,37],[-79,127]],[[24973,58695],[9,86],[95,149],[52,66],[-15,69],[65,37]],[[25238,61101],[-2,-468],[-22,-667],[83,0]],[[25297,59966],[90,-107],[24,88],[82,-75]],[[24973,58695],[-142,103],[-174,11],[-127,117],[-149,244]],[[25472,61510],[1,-87],[53,-3],[-5,-160],[-45,-256],[24,-91],[-29,-212],[18,-56],[-32,-299],[-55,-156],[-50,-19],[-55,-205]],[[30185,57537],[-8,-139],[-163,-69],[91,-268],[-3,-309],[-123,-344],[105,-468],[120,38],[62,427],[-86,208],[-14,447],[346,241],[-38,278],[97,186],[100,-415],[195,-9],[180,-330],[11,-195],[249,-6],[297,61],[159,-264],[213,-74],[155,185],[4,149],[344,35],[333,9],[-236,-175],[95,-279],[222,-44],[210,-291],[45,-473],[144,13],[109,-139]],[[33400,55523],[-220,-347],[-24,-215],[95,-220],[-69,-110],[-171,-95],[5,-273],[-75,-163],[188,-448]],[[33400,55523],[183,-217],[171,-385],[8,-304],[105,-14],[149,-289],[109,-205]],[[34125,54109],[-44,-532],[-169,-154],[15,-139],[-51,-305],[123,-429],[89,-1],[37,-333],[169,-514]],[[34125,54109],[333,-119],[30,107],[225,43],[298,-159]],[[35011,53981],[-144,-508],[22,-404],[109,-351],[-49,-254],[-24,-270],[-71,-248]],[[35011,53981],[95,-65],[204,-140],[294,-499],[46,-242]],[[51718,79804],[131,-155],[400,-109],[-140,-404],[-35,-421]],[[52074,78715],[-77,-101],[-126,54],[9,-150],[-203,-332],[-5,-267],[133,92],[95,-259]],[[51900,77752],[-11,-167],[82,-222],[-97,-180],[72,-457],[151,-75],[-32,-256]],[[52065,76395],[-252,-334],[-548,160],[-404,-192],[-32,-355]],[[50829,75674],[-322,-77],[-313,267],[-101,-127],[-511,268],[-111,230]],[[49471,76235],[144,354],[53,1177],[-287,620],[-205,299],[-424,227],[-28,431],[360,129],[466,-152],[-88,669],[263,-254],[646,461],[84,484],[243,119]],[[50698,80799],[40,-207],[129,-10],[129,-237],[194,-279],[143,46],[243,-269]],[[51576,79843],[62,-52],[80,13]],[[52429,75765],[179,226],[47,-507],[-92,-456],[-126,120],[-64,398],[56,219]],[[27693,48568],[148,442],[-60,258],[-106,-275],[-166,259],[56,167],[-47,536],[97,89],[52,368],[105,381],[-20,241],[153,126],[190,236]],[[31588,61519],[142,-52],[50,-118],[-71,-149],[-209,4],[-163,-21],[-16,253],[40,86],[227,-3]],[[28453,61504],[187,-53],[147,-142],[46,-161],[-195,-11],[-84,-99],[-156,95],[-159,215],[34,135],[116,41],[64,-20]],[[27147,64280],[240,-42],[219,-7],[261,-201],[110,-216],[260,66],[98,-138],[235,-366],[173,-267],[92,8],[165,-120],[-20,-167],[205,-24],[210,-242],[-33,-138],[-185,-75],[-187,-29],[-191,46],[-398,-57],[186,329],[-113,154],[-179,39],[-96,171],[-66,336],[-157,-23],[-259,159],[-83,124],[-362,91],[-97,115],[104,148],[-273,30],[-199,-307],[-115,-8],[-40,-144],[-138,-65],[-118,56],[146,183],[60,213],[126,131],[142,116],[210,56],[67,65]],[[58175,37528],[-177,267],[-215,90],[-82,375],[0,208],[-119,64],[-315,649],[-87,342],[-56,105],[-107,473]],[[57017,40101],[311,-65],[90,-68],[94,13],[154,383],[241,486],[100,46],[33,205],[159,235],[210,81]],[[58409,41417],[18,-220],[232,12],[128,-125],[60,-146],[132,-43],[145,-190],[0,-748],[-54,-409],[-12,-442],[45,-175],[-31,-348],[-42,-53],[-74,-426],[-292,-671]],[[55526,35946],[0,1725],[274,20],[8,2105],[207,19],[428,207],[106,-243],[177,231],[85,2],[156,133]],[[56967,40145],[50,-44]],[[54540,33696],[-207,446],[-108,432],[-62,575],[-68,428],[-93,910],[-7,707],[-35,322],[-108,243],[-144,489],[-146,708],[-60,371],[-226,577],[-17,453]],[[53259,40357],[134,113],[166,100],[180,-17],[166,-267],[42,41],[1126,26],[192,-284],[673,-83],[510,241]],[[56448,40227],[228,134],[180,-34],[109,-133],[2,-49]],[[45357,58612],[-115,460],[-138,210],[122,112],[134,415],[66,304]],[[45426,60113],[96,189],[138,-51],[135,129],[155,6],[133,-173],[184,-157],[168,-435],[184,-405]],[[46619,59216],[13,-368],[54,-338],[104,-166],[24,-229],[-13,-184]],[[46801,57931],[-40,-33],[-151,47],[-21,-66],[-61,-13],[-200,144],[-134,6]],[[46194,58016],[-513,25],[-75,-67],[-92,19],[-147,-96]],[[45367,57897],[-46,453]],[[45321,58350],[253,-13],[67,83],[50,5],[103,136],[119,-124],[121,-11],[120,133],[-56,170],[-92,-99],[-86,3],[-110,145],[-88,-9],[-63,-140],[-302,-17]],[[46619,59216],[93,107],[47,348],[88,14],[194,-165],[157,117],[107,-39],[42,131],[1114,9],[62,414],[-48,73],[-134,2550],[-134,2550],[425,10]],[[48632,65335],[937,-1289],[937,-1289],[66,-277],[173,-169],[129,-96],[3,-376],[308,58]],[[51185,61897],[1,-1361],[-152,-394],[-24,-364],[-247,-94],[-379,-51],[-102,-210],[-178,-23]],[[50104,59400],[-178,-3],[-70,114],[-153,-84],[-259,-246],[-53,-184],[-216,-265],[-38,-152],[-116,-120],[-134,79],[-76,-144],[-41,-405],[-221,-490],[7,-200],[-76,-250],[18,-343]],[[48498,56707],[-114,-88],[-65,-74],[-43,253],[-80,-67],[-48,11],[-51,-172],[-215,5],[-77,89],[-36,-54]],[[47769,56610],[-85,170],[15,176],[-35,69],[-59,-58],[11,192],[57,152],[-114,248],[-33,163],[-62,130],[-55,15],[-67,-83],[-90,-79],[-76,-128],[-119,48],[-77,150],[-46,19],[-73,-78],[-44,-1],[-16,216]],[[47587,66766],[1045,-1431]],[[45426,60113],[-24,318],[78,291],[34,557],[-30,583],[-34,294],[28,295],[-72,281],[-146,255]],[[50747,54278],[-229,-69]],[[50518,54209],[-69,407],[13,1357],[-56,122],[-11,290],[-96,207],[-85,174],[35,311]],[[50249,57077],[96,67],[56,258],[136,56],[61,176]],[[50598,57634],[93,173],[100,2],[212,-340]],[[51003,57469],[-11,-197],[62,-350],[-54,-238],[29,-159],[-135,-366],[-86,-181],[-52,-372],[7,-376],[-16,-952]],[[54026,58177],[-78,-34],[-9,-188]],[[53939,57955],[-52,-13],[-188,647],[-65,24],[-217,-331],[-215,173],[-150,34],[-80,-83],[-163,18],[-164,-252],[-141,-14],[-337,305],[-131,-145],[-142,10],[-104,223],[-279,221],[-298,-70],[-72,-128],[-39,-340],[-80,-238],[-19,-527]],[[50598,57634],[6,405],[-320,134],[-9,286],[-156,386],[-37,269],[22,286]],[[51185,61897],[392,263],[804,1161],[952,1126]],[[53333,64447],[439,-255],[156,-324],[197,220]],[[53939,57955],[110,-235],[-31,-107],[-14,-196],[-234,-457],[-74,-377],[-39,-307],[-59,-132],[-56,-414],[-148,-243],[-43,-299],[-63,-238],[-26,-246],[-191,-199],[-156,243],[-105,-10],[-165,-345],[-81,-6],[-132,-570],[-71,-418]],[[52361,53399],[-289,-213],[-105,31],[-107,-132],[-222,13],[-149,370],[-91,427],[-197,389],[-209,-7],[-245,1]],[[54244,54965],[-140,-599],[-67,-107],[-21,-458],[28,-249],[-23,-176],[132,-309],[23,-212],[103,-305],[127,-190],[12,-269],[29,-172]],[[54447,51919],[-20,-319],[-220,140],[-225,156],[-350,23]],[[53632,51919],[-35,32],[-164,-76],[-169,79],[-132,-38]],[[53132,51916],[-452,13]],[[52680,51929],[40,466],[-108,391],[-127,100],[-56,265],[-72,85],[4,163]],[[50518,54209],[-224,-126]],[[50294,54083],[-62,207],[-74,375],[-22,294],[61,532],[-69,215],[-27,466],[1,429],[-116,305],[20,184]],[[50006,57090],[243,-13]],[[50294,54083],[-436,-346],[-154,-203],[-250,-171],[-248,168]],[[49206,53531],[13,233],[-121,509],[73,667],[117,496],[-74,841]],[[49214,56277],[-38,444],[7,336],[482,27],[123,-43],[90,96],[128,-47]],[[48498,56707],[125,-129],[49,-195],[125,-125],[97,149],[130,22],[190,-152]],[[49206,53531],[-126,-7],[-194,116],[-178,-7],[-329,-103],[-193,-170],[-275,-217],[-54,15]],[[47857,53158],[22,487],[26,74],[-8,233],[-118,247],[-88,40],[-81,162],[60,262],[-28,286],[13,172]],[[47655,55121],[44,0],[17,258],[-22,114],[27,82],[103,71],[-69,473],[-64,245],[23,200],[55,46]],[[47655,55121],[-78,15],[-57,-238],[-78,3],[-55,126],[19,237],[-116,362],[-73,-67],[-59,-13]],[[47158,55546],[-77,-34],[3,217],[-44,155],[9,171],[-60,249],[-78,211],[-222,1],[-65,-112],[-76,-13],[-48,-128],[-32,-163],[-148,-260]],[[46320,55840],[-122,349],[-108,232],[-71,76],[-69,118],[-32,261],[-41,130],[-80,97]],[[45797,57103],[123,288],[84,-11],[73,99],[61,1],[44,78],[-24,196],[31,62],[5,200]],[[45797,57103],[-149,247],[-117,39],[-63,166],[1,90],[-84,125],[-18,127]],[[47857,53158],[-73,-5],[-286,282],[-252,449],[-237,324],[-187,381]],[[46822,54589],[66,189],[15,172],[126,320],[129,276]],[[46822,54589],[-75,44],[-200,238],[-144,316],[-49,216],[-34,437]],[[55125,52650],[-178,33],[-188,99],[-166,-313],[-146,-550]],[[56824,55442],[152,-239],[2,-192],[187,-308],[116,-255],[70,-355],[208,-234],[44,-187]],[[53609,47755],[-104,203],[-84,-100],[-112,-255]],[[53309,47603],[-228,626]],[[53081,48229],[212,326],[-105,391],[95,148],[187,73],[23,261],[148,-283],[245,-25],[85,279],[36,393],[-31,461],[-131,350],[120,684],[-69,117],[-207,-48],[-78,305],[21,258]],[[53081,48229],[-285,596],[-184,488],[-169,610],[9,196],[61,189],[67,430],[56,438]],[[52636,51176],[94,35],[404,-6],[-2,711]],[[52636,51176],[-52,90],[96,663]],[[59099,45126],[131,-264],[71,-501],[-47,-160],[-56,-479],[53,-490],[-87,-205],[-85,-549],[147,-153]],[[59226,42325],[-843,-487],[26,-421]],[[56448,40227],[-181,369],[-188,483],[13,1880],[579,-7],[-24,203],[41,222],[-49,277],[32,286],[-29,184]],[[59599,43773],[-77,-449],[77,-768],[97,9],[100,-191],[116,-427],[24,-760],[-120,-124],[-85,-410],[-181,365],[-21,417],[59,274],[-16,237],[-110,149],[-77,-54],[-159,284]],[[61198,44484],[45,-265],[-11,-588],[34,-519],[11,-923],[49,-290],[-83,-422],[-108,-410],[-177,-366],[-254,-225],[-313,-287],[-313,-634],[-107,-108],[-194,-420],[-115,-136],[-23,-421],[132,-448],[54,-346],[4,-177],[49,29],[-8,-579],[-45,-275],[65,-101],[-41,-245],[-116,-211],[-229,-199],[-334,-320],[-122,-219],[24,-248],[71,-40],[-24,-311]],[[58908,34785],[-24,261],[-41,265]],[[53383,47159],[-74,444]],[[53259,40357],[-26,372],[38,519],[96,541],[15,254],[90,532],[66,243],[159,386],[90,263],[29,438],[-15,335],[-83,211],[-74,358],[-68,355],[15,122],[85,235],[-84,570],[-57,396],[-139,374],[26,115]],[[58062,48902],[169,-46],[85,336],[147,-38]],[[59922,69905],[-49,-186]],[[59873,69719],[-100,82],[-58,-394],[69,-66],[-71,-81],[-12,-156],[131,80]],[[59832,69184],[7,-230],[-139,-944]],[[59700,68010],[-27,153],[-155,862]],[[59518,69025],[80,194],[-19,34],[74,276],[56,446],[40,149],[8,6]],[[59757,70130],[93,-1],[25,104],[75,8]],[[59950,70241],[4,-242],[-38,-90],[6,-4]],[[59757,70130],[99,482],[138,416],[5,21]],[[59999,71049],[125,-31],[45,-231],[-151,-223],[-68,-323]],[[63761,43212],[74,-251],[69,-390],[45,-711],[72,-276],[-28,-284],[-49,-174],[-94,347],[-53,-175],[53,-438],[-24,-250],[-77,-137],[-18,-500],[-109,-689],[-137,-814],[-172,-1120],[-106,-821],[-125,-685],[-226,-140],[-243,-250],[-160,151],[-220,211],[-77,312],[-18,524],[-98,471],[-26,425],[50,426],[128,102],[1,197],[133,447],[25,377],[-65,280],[-52,372],[-23,544],[97,331],[38,375],[138,22],[155,121],[103,107],[122,7],[158,337],[229,364],[83,297],[-38,253],[118,-71],[153,410],[6,356],[92,264],[96,-254]],[[59873,69719],[0,-362],[-41,-173]],[[45321,58350],[36,262]],[[52633,68486],[-118,1061],[-171,238],[-3,143],[-227,352],[-24,445],[171,330],[65,487],[-44,563],[57,303]],[[52339,72408],[302,239],[195,-71],[-9,-299],[236,217],[20,-113],[-139,-290],[-2,-273],[96,-147],[-36,-511],[-183,-297],[53,-322],[143,-10],[70,-281],[106,-92]],[[53191,70158],[-16,-454],[-135,-170],[-86,-189],[-191,-228],[30,-244],[-24,-250],[-136,-137]],[[47592,66920],[-2,700],[449,436],[277,90],[227,159],[107,295],[324,234],[12,438],[161,51],[126,219],[363,99],[51,230],[-73,125],[-96,624],[-17,359],[-104,379]],[[49397,71358],[267,323],[300,102],[175,244],[268,180],[471,105],[459,48],[140,-87],[262,232],[297,5],[113,-137],[190,35]],[[52633,68486],[90,-522],[15,-274],[-49,-482],[21,-270],[-36,-323],[24,-371],[-110,-247],[164,-431],[11,-253],[99,-330],[130,109],[219,-275],[122,-370]],[[59922,69905],[309,-234],[544,630]],[[60775,70301],[112,-720]],[[60887,69581],[-53,-89],[-556,-296],[277,-591],[-92,-101],[-46,-197],[-212,-82],[-66,-213],[-120,-182],[-310,94]],[[59709,67924],[-9,86]],[[64327,64904],[49,29],[11,-162],[217,93],[230,-15],[168,-18],[190,400],[207,379],[176,364]],[[65575,65974],[52,-202]],[[65627,65772],[38,-466]],[[65665,65306],[-142,-3],[-23,-384],[50,-82],[-126,-117],[-1,-241],[-81,-245],[-7,-238]],[[65335,63996],[-56,-125],[-835,298],[-106,599],[-11,136]],[[64113,65205],[-18,430],[75,310],[76,64],[84,-185],[5,-346],[-61,-348]],[[64274,65130],[-77,-42],[-84,117]],[[63326,68290],[58,-261],[-25,-135],[89,-445]],[[63448,67449],[-196,-16],[-69,282],[-248,57]],[[62935,67772],[204,567],[187,-49]],[[60775,70301],[615,614],[105,715],[-26,431],[152,146],[142,369]],[[61763,72576],[119,92],[324,-77],[97,-150],[133,100]],[[62436,72541],[180,-705],[182,-177],[21,-345],[-139,-204],[-65,-461],[193,-562],[340,-324],[143,-449],[-46,-428],[89,0],[3,-314],[153,-311]],[[63490,68261],[-164,29]],[[62935,67772],[-516,47],[-784,1188],[-413,414],[-335,160]],[[65665,65306],[125,-404],[155,-214],[203,-78],[165,-107],[125,-339],[75,-196],[100,-75],[-1,-132],[-101,-352],[-44,-166],[-117,-189],[-104,-404],[-126,31],[-58,-141],[-44,-300],[34,-395],[-26,-72],[-128,2],[-174,-221],[-27,-288],[-63,-125],[-173,5],[-109,-149],[1,-238],[-134,-165],[-153,56],[-186,-199],[-128,-34]],[[64752,60417],[-91,413],[-217,975]],[[64444,61805],[833,591],[185,1182],[-127,418]],[[65575,65974],[80,201],[35,-51],[-26,-244],[-37,-108]],[[96448,41190],[175,-339],[-92,-78],[-93,259],[10,158]],[[96330,41322],[-39,163],[-6,453],[133,-182],[45,-476],[-75,74],[-58,-32]],[[78495,57780],[-66,713],[178,492],[359,112],[261,-84]],[[79227,59013],[229,-232],[126,407],[246,-217]],[[79828,58971],[64,-394],[-34,-708],[-467,-455],[122,-358],[-292,-43],[-240,-238]],[[78981,56775],[-233,87],[-112,307],[-141,611]],[[78495,57780],[-249,271],[-238,-11],[41,464],[-245,-3],[-22,-650],[-150,-863],[-90,-522],[19,-428],[181,-18],[113,-539],[50,-512],[155,-338],[168,-69],[144,-306]],[[78372,54256],[-91,-243],[-183,-71],[-22,304],[-227,258],[-48,-105]],[[77801,54399],[-110,227],[-47,292],[-148,334],[-135,280],[-45,-347],[-53,328],[30,369],[82,566]],[[77375,56448],[135,607],[152,551],[-108,539],[4,274],[-32,330],[-185,470],[-66,296],[96,109],[101,514],[-113,390],[-177,431],[-134,519],[117,107],[127,639],[196,26],[162,256],[159,137]],[[77809,62643],[120,-182],[16,-355],[188,-27],[-68,-623],[6,-530],[293,353],[83,-104],[163,17],[56,205],[210,-40],[211,-480],[18,-583],[224,-515],[-12,-500],[-90,-266]],[[77809,62643],[59,218],[237,384]],[[78105,63245],[25,-139],[148,-16],[-42,676],[144,86]],[[78380,63852],[162,-466],[125,-537],[342,-5],[108,-515],[-178,-155],[-80,-212],[333,-353],[231,-699],[175,-520],[210,-411],[70,-418],[-50,-590]],[[77375,56448],[-27,439],[86,452],[-94,350],[23,644],[-113,306],[-90,707],[-50,746],[-121,490],[-183,-297],[-315,-421],[-156,53],[-172,138],[96,732],[-58,554],[-218,681],[34,213],[-163,76],[-197,481]],[[75657,62792],[-18,476],[97,-90],[6,424]],[[75742,63602],[137,140],[-30,251],[63,201],[11,612],[217,-135],[124,487],[14,288],[153,496],[-8,338],[359,408],[199,-107],[-23,364],[97,108],[-20,224]],[[77035,67277],[162,44],[93,-348],[121,-141],[8,-452],[-11,-487],[-263,-493],[-33,-701],[293,98],[66,-544],[176,-115],[-81,-490],[206,-222],[121,-109],[203,172],[9,-244]],[[78380,63852],[149,145],[221,-3],[271,68],[236,315],[134,-222],[254,-108],[-44,-340],[132,-240],[280,-154]],[[80013,63313],[-371,-505],[-231,-558],[-61,-410],[212,-623],[260,-772],[252,-365],[169,-475],[127,-1093],[-37,-1039],[-232,-389],[-318,-381],[-227,-492],[-346,-550],[-101,378],[78,401],[-206,335]],[[86327,75524],[0,0]],[[86327,75524],[-106,36],[-120,-200],[-83,-202],[10,-424],[-143,-130],[-50,-105],[-104,-174],[-185,-97],[-121,-159],[-9,-256],[-32,-65],[111,-96],[157,-259]],[[85652,73393],[-40,-143],[-118,-39],[-197,-29],[-108,-266],[-124,21],[-17,-54]],[[85048,72883],[-135,112],[-34,-111],[-81,-49],[-10,112],[-72,54],[-75,94],[76,260],[66,69],[-25,108],[71,319],[-18,96],[-163,65],[-131,158]],[[84517,74170],[227,379],[306,318],[191,419],[131,-185],[241,-22],[-44,312],[429,254],[111,331],[179,-348]],[[85652,73393],[240,-697],[68,-383],[3,-681],[-105,-325],[-252,-113],[-222,-245],[-250,-51],[-31,322],[51,443],[-122,615],[206,99],[-190,506]],[[82410,80055],[-135,-446],[-197,-590],[72,-241],[157,74],[274,-92],[214,219],[223,-189],[251,-413],[-30,-210],[-219,66],[-404,-78],[-195,-168],[-204,-391],[-423,-229],[-277,-313],[-286,120],[-156,53],[-146,-381],[89,-227],[45,-195],[-194,-199],[-200,-316],[-324,-208],[-417,-22],[-448,-205],[-324,-318],[-123,184],[-336,-1],[-411,359],[-274,88],[-369,-82],[-574,133],[-306,-14],[-163,351],[-127,544],[-171,66],[-336,368],[-374,83],[-330,101],[-100,256],[107,690],[-192,476],[-396,222],[-233,313],[-73,413]],[[75742,63602],[-147,937],[-76,-2],[-46,-377],[-152,306],[86,336],[124,34],[128,500],[-160,101],[-257,-8],[-265,81],[-24,410],[-133,30],[-220,255],[-98,-401],[200,-313],[-173,-220],[-62,-215],[171,-159],[-47,-356],[96,-444],[43,-486]],[[74730,63611],[-39,-216],[-189,7],[-343,-122],[16,-445],[-148,-349],[-400,-398],[-311,-695],[-209,-373],[-276,-387],[-1,-271],[-138,-146],[-251,-212],[-129,-31],[-84,-450],[58,-769],[15,-490],[-118,-561],[-1,-1004],[-144,-29],[-126,-450],[84,-195],[-253,-168],[-93,-401],[-112,-170],[-263,552],[-128,827],[-107,596],[-97,279],[-148,568],[-69,739],[-48,369],[-253,811],[-115,1145],[-83,756],[1,716],[-54,553],[-404,-353],[-196,70],[-362,716],[133,214],[-82,232],[-326,501]],[[68937,64577],[185,395],[612,-2],[-56,507],[-156,300],[-31,455],[-182,265],[306,619],[323,-45],[290,620],[174,599],[270,593],[-4,421],[236,342],[-224,292],[-96,400],[-99,517],[137,255],[421,-144],[310,88],[268,496]],[[71621,71550],[298,-692],[-28,-482],[111,-303],[-9,-301],[-200,79],[78,-651],[273,-374],[386,-413]],[[72530,68413],[-176,-268],[-108,-553],[269,-224],[262,-289],[362,-332],[381,-76],[160,-301],[215,-56],[334,-138],[231,10],[32,234],[-36,375],[21,255]],[[74477,67050],[170,124],[23,-465]],[[74670,66709],[6,-119],[252,-224],[175,92],[234,-39],[227,17],[20,363],[-113,189]],[[75471,66988],[224,74],[252,439],[321,376],[233,-145],[198,249],[130,-367],[-94,-248],[300,-89]],[[75657,62792],[-79,308],[-16,301],[-53,285],[-116,344],[-256,23],[25,-243],[-87,-329],[-118,120],[-41,-108],[-78,65],[-108,53]],[[74670,66709],[184,439],[150,150],[198,-137],[147,-14],[122,-159]],[[72530,68413],[115,141],[223,-182],[280,-385],[157,-84],[93,-284],[216,-117],[225,-259],[314,-136],[324,-57]],[[68937,64577],[-203,150],[-83,424],[-215,450],[-512,-111],[-451,-11],[-391,-83]],[[67082,65396],[105,687],[400,305],[-23,272],[-133,96],[-7,520],[-266,260],[-112,357],[-137,310]],[[66909,68203],[465,-301],[278,88],[166,-75],[56,129],[194,-52],[361,246],[10,503],[154,334],[207,-1],[31,166],[212,77],[103,-55],[108,166],[-15,355],[118,356],[177,150],[-110,390],[265,-18],[76,213],[-12,227],[139,248],[-32,294],[-66,250],[163,258],[298,124],[319,68],[141,109],[162,67]],[[70877,72519],[205,-276],[82,-454],[457,-239]],[[68841,72526],[85,-72],[201,189],[93,-114],[90,271],[166,-12],[43,86],[29,239],[120,205],[150,-134],[-30,-181],[84,-28],[-26,-496],[110,-194],[97,125],[123,58],[173,265],[192,-44],[286,-1]],[[70827,72688],[50,-169]],[[66909,68203],[252,536],[-23,380],[-210,100],[-22,375],[-91,472],[119,323],[-121,87],[76,430],[113,736]],[[67002,71642],[284,-224],[209,79],[58,268],[219,89],[157,180],[55,472],[234,114],[44,211],[131,-158],[84,-19]],[[69725,74357],[-101,-182],[-303,98],[-26,-340],[301,46],[343,-192],[526,89]],[[70465,73876],[70,-546],[91,59],[169,-134],[-10,-230],[42,-337]],[[72294,75601],[-39,-134],[-438,-320],[-99,-234],[-356,-70],[-105,-378],[-294,80],[-192,-116],[-266,-279],[39,-138],[-79,-136]],[[67002,71642],[-24,498],[-207,21],[-318,523],[-221,65],[-308,299],[-197,55],[-122,-110],[-186,17],[-197,-338],[-244,-114]],[[64978,72558],[-52,417],[40,618],[-216,200],[71,405],[-184,34],[61,498],[262,-145],[244,189],[-202,355],[-80,338],[-224,-151],[-28,-433],[-87,383]],[[62436,72541],[-152,473],[55,183],[-87,678],[190,168]],[[62442,74043],[44,-223],[141,-273],[190,-78]],[[62817,73469],[101,17]],[[62918,73486],[327,436],[104,44],[82,-174],[-95,-292],[173,-309],[69,29]],[[63578,73220],[88,-436],[263,-123],[193,-296],[395,-102],[434,156],[27,139]],[[67082,65396],[-523,179],[-303,136],[-313,76],[-118,725],[-133,105],[-214,-106],[-280,-286],[-339,196],[-281,454],[-267,168],[-186,561],[-205,788],[-149,-96],[-177,196],[-104,-231]],[[59999,71049],[-26,452],[68,243]],[[60041,71744],[74,129],[75,130],[15,329],[91,-115],[306,165],[147,-112],[229,2],[320,222],[149,-10],[316,92]],[[62817,73469],[-113,342],[1,91],[-123,-2],[-82,159],[-58,-16]],[[62442,74043],[-109,172],[-207,147],[27,288],[-47,208]],[[62106,74858],[386,92]],[[62492,74950],[57,-155],[106,-103],[-56,-148],[148,-202],[-78,-189],[118,-160],[124,-97],[7,-410]],[[55734,91409],[371,-289],[433,-402],[8,-910],[93,-230]],[[56639,89578],[-478,-167],[-269,-413],[43,-361],[-441,-475],[-537,-509],[-202,-832],[198,-416],[265,-328],[-255,-666],[-289,-138],[-106,-992],[-157,-554],[-337,57],[-158,-468],[-321,-27],[-89,558],[-232,671],[-211,835]],[[58829,81362],[-239,-35],[-85,-129],[-18,-298],[-111,57],[-250,-28],[-73,138],[-104,-103],[-105,86],[-218,12],[-310,141],[-281,47],[-215,-14],[-152,-160],[-133,-23]],[[56535,81053],[-6,263],[-85,274],[166,121],[2,235],[-77,225],[-12,261]],[[56523,82432],[268,-4],[302,223],[64,333],[228,190],[-26,264]],[[57359,83438],[169,100],[298,228]],[[60617,78409],[-222,-48],[-185,-191],[-260,-31],[-239,-220],[14,-317]],[[59287,77741],[-38,64],[-432,149],[-19,221],[-257,-73],[-103,-325],[-215,-437]],[[58223,77340],[-126,101],[-131,-95],[-124,109]],[[57842,77455],[70,64],[49,203],[76,188],[-20,106],[58,47],[27,-81],[164,-18],[74,44],[-52,60],[19,88],[-97,150],[-40,247],[-101,97],[20,200],[-125,159],[-115,22],[-204,184],[-185,-58],[-66,-87]],[[57394,79070],[-118,0],[-69,-139],[-205,-56],[-95,-91],[-129,144],[-178,3],[-172,65],[-120,-127]],[[56308,78869],[-19,159],[-155,161]],[[56134,79189],[55,238],[77,154]],[[56266,79581],[60,-35],[-71,266],[252,491],[138,69],[29,166],[-139,515]],[[56266,79581],[-264,227],[-200,-84],[-131,61],[-165,-127],[-140,210],[-114,-81],[-16,36]],[[55236,79823],[-127,291],[-207,36],[-26,185],[-191,66],[-41,-153],[-151,122],[17,163],[-207,51],[-132,191]],[[54171,80775],[-114,377],[22,204],[-69,316],[-101,210],[77,158],[-64,300]],[[53922,82340],[189,174],[434,273],[350,200],[277,-100],[21,-144],[268,-7]],[[56314,82678],[142,-64],[67,-182]],[[54716,79012],[-21,-241],[-156,-2],[53,-128],[-92,-380]],[[54500,78261],[-53,-100],[-243,-14],[-140,-134],[-229,45]],[[53835,78058],[-398,153],[-62,205],[-274,-102],[-32,-113],[-169,84]],[[52900,78285],[-142,16],[-125,108],[42,145],[-10,104]],[[52665,78658],[83,33],[141,-164],[39,156],[245,-25],[199,106],[133,-18],[87,-121],[26,100],[-40,385],[100,75],[98,272]],[[53776,79457],[206,-190],[157,242],[98,44],[215,-180],[131,30],[128,-111]],[[54711,79292],[-23,-75],[28,-205]],[[56308,78869],[-170,-123],[-131,-401],[-168,-401],[-223,-111]],[[55616,77833],[-173,26],[-213,-155]],[[55230,77704],[-104,-89],[-229,114],[-208,253],[-88,73]],[[54601,78055],[-54,200],[-47,6]],[[54716,79012],[141,-151],[103,-65],[233,73],[22,118],[111,18],[135,92],[30,-38],[130,74],[66,139],[91,36],[297,-180],[59,61]],[[57842,77455],[-50,270],[30,252],[-9,259],[-160,352],[-89,249],[-86,175],[-84,58]],[[58223,77340],[6,-152],[-135,-128],[-84,56],[-78,-713]],[[57932,76403],[-163,62],[-202,215],[-327,-138],[-138,-150],[-408,31],[-213,92],[-108,-43],[-80,243]],[[56293,76715],[-51,103],[65,99],[-69,74],[-87,-133],[-162,172],[-22,244],[-169,139],[-31,188],[-151,232]],[[55907,83187],[-59,497]],[[55848,83684],[318,181],[466,-38],[273,59],[39,-123],[148,-38],[267,-287]],[[55848,83684],[10,445],[136,371],[262,202],[221,-442],[223,12],[53,453]],[[56753,84725],[237,105],[121,-73],[239,-219],[229,-1]],[[56753,84725],[32,349],[-102,-75],[-176,210],[-24,340],[351,164],[350,86],[301,-97],[287,17]],[[54171,80775],[-124,-62],[-73,68],[-70,-113],[-200,-114],[-103,-147],[-202,-129],[49,-176],[30,-249],[141,-142],[157,-254]],[[52665,78658],[-298,181],[-57,-128],[-236,4]],[[51718,79804],[16,259],[-56,133]],[[51678,80196],[32,400]],[[51710,80596],[-47,619],[167,0],[70,222],[69,541],[-51,200]],[[51918,82178],[54,125],[232,32],[52,-130],[188,291],[-63,222],[-13,335]],[[52368,83053],[210,-78],[178,90]],[[52756,83065],[4,-228],[281,-138],[-3,-210],[283,111],[156,162],[313,-233],[132,-189]],[[57932,76403],[-144,-245],[-101,-422],[89,-337]],[[57776,75399],[-239,79],[-283,-186]],[[57254,75292],[-3,-294],[-252,-56],[-196,206],[-222,-162],[-206,17]],[[56375,75003],[-20,391],[-139,189]],[[56216,75583],[46,84],[-30,70],[47,188],[105,185],[-135,255],[-24,216],[68,134]],[[57302,71436],[-35,-175],[-400,-50],[3,98],[-339,115],[52,251],[152,-199],[216,34],[207,-42],[-7,-103],[151,71]],[[57254,75292],[135,-157],[-86,-369],[-66,-67]],[[57237,74699],[-169,17],[-145,56],[-336,-154],[192,-332],[-141,-96],[-154,-1],[-147,305],[-52,-130],[62,-353],[139,-277],[-105,-129],[155,-273],[137,-171],[4,-334],[-257,157],[82,-302],[-176,-62],[105,-521],[-184,-8],[-228,257],[-104,473],[-49,393],[-108,272],[-143,337],[-18,168]],[[55597,73991],[129,287],[16,192],[91,85],[5,155]],[[55838,74710],[182,53],[106,129],[150,-12],[46,103],[53,20]],[[60041,71744],[-102,268],[105,222],[-169,-51],[-233,136],[-191,-340],[-421,-66],[-225,317],[-300,20],[-64,-245],[-192,-70],[-268,314],[-303,-11],[-165,588],[-203,328],[135,459],[-176,283],[308,565],[428,23],[117,449],[529,-78],[334,383],[324,167],[459,13],[485,-417],[399,-228],[323,91],[239,-53],[328,309]],[[61542,75120],[296,28],[268,-290]],[[57776,75399],[33,-228],[243,-190],[-51,-145],[-330,-33],[-118,-182],[-232,-319],[-87,276],[3,121]],[[55597,73991],[-48,41],[-5,130],[-154,199],[-24,281],[23,403],[38,184],[-47,93]],[[55380,75322],[-18,188],[120,291],[18,-111],[75,52]],[[55575,75742],[59,-159],[66,-60],[19,-214]],[[55719,75309],[-35,-201],[39,-254],[115,-144]],[[55230,77704],[67,-229],[89,-169],[-107,-222]],[[55279,77084],[-126,131],[-192,-8],[-239,98],[-130,-13],[-60,-123],[-99,136],[-59,-245],[136,-277],[61,-183],[127,-221],[106,-130],[105,-247],[246,-224]],[[55155,75778],[-31,-100]],[[55124,75678],[-261,218],[-161,213],[-254,176],[-233,434],[56,45],[-127,248],[-5,200],[-179,93],[-85,-255],[-82,198],[6,205],[10,9]],[[53809,77462],[194,-20],[51,100],[94,-97],[109,-11],[-1,165],[97,60],[27,239],[221,157]],[[52900,78285],[-22,-242],[-122,-100],[-206,75],[-60,-239],[-132,-19],[-48,94],[-156,-200],[-134,-28],[-120,126]],[[51576,79843],[30,331],[72,22]],[[50698,80799],[222,117]],[[50920,80916],[204,-47],[257,123],[176,-258],[153,-138]],[[50920,80916],[143,162],[244,869],[380,248],[231,-17]],[[47490,75324],[101,150],[113,86],[70,-289],[164,0],[47,75],[162,-21],[78,-296],[-129,-160],[-3,-461],[-45,-86],[-11,-280],[-120,-48],[111,-355],[-77,-388],[96,-175],[-38,-161],[-103,-222],[23,-195]],[[47929,72498],[-112,-153],[-146,83],[-143,-65],[42,462],[-26,363],[-124,55],[-67,224],[22,386],[111,215],[20,239],[58,355],[-6,250],[-56,212],[-12,200]],[[47490,75324],[14,420],[-114,257],[393,426],[340,-106],[373,3],[296,-101],[230,31],[449,-19]],[[50829,75674],[15,-344],[-263,-393],[-356,-125],[-25,-199],[-171,-327],[-107,-481],[108,-338],[-160,-263],[-60,-384],[-210,-118],[-197,-454],[-352,-9],[-265,11],[-174,-209],[-106,-223],[-136,49],[-103,199],[-79,340],[-259,92]],[[48278,82406],[46,-422],[-210,-528],[-493,-349],[-393,89],[225,617],[-145,601],[378,463],[210,276]],[[47896,83153],[57,-317],[-57,-317],[172,9],[210,-122]],[[96049,38125],[228,-366],[144,-272],[-105,-142],[-153,160],[-199,266],[-179,313],[-184,416],[-38,201],[119,-9],[156,-201],[122,-200],[89,-166]],[[95032,44386],[78,-203],[-194,4],[-106,363],[166,-142],[56,-22]],[[94910,44908],[-42,-109],[-206,512],[-57,353],[94,0],[100,-473],[111,-283]],[[94680,44747],[-108,-14],[-170,60],[-58,91],[17,235],[183,-93],[91,-124],[45,-155]],[[94344,45841],[65,-187],[12,-119],[-218,251],[-152,212],[-104,197],[41,60],[128,-142],[228,-272]],[[93649,46431],[111,-193],[-56,-33],[-121,134],[-114,243],[14,99],[166,-250]],[[99134,26908],[-105,-319],[-138,-404],[-214,-236],[-48,155],[-116,85],[160,486],[-91,326],[-299,236],[8,214],[201,206],[47,455],[-13,382],[-113,396],[8,104],[-133,244],[-218,523],[-117,418],[104,46],[151,-328],[216,-153],[78,-526],[202,-622],[5,403],[126,-161],[41,-447],[224,-192],[188,-48],[158,226],[141,-69],[-67,-524],[-85,-345],[-212,12],[-74,-179],[26,-254],[-41,-110]],[[97129,24846],[238,310],[167,306],[123,441],[106,149],[41,330],[195,273],[61,-251],[63,-244],[198,239],[80,-249],[0,-249],[-103,-274],[-182,-435],[-142,-238],[103,-284],[-214,-7],[-238,-223],[-75,-387],[-157,-597],[-219,-264],[-138,-169],[-256,13],[-180,194],[-302,42],[-46,217],[149,438],[349,583],[179,111],[200,225]],[[91024,26469],[166,-39],[20,-702],[-95,-203],[-29,-476],[-97,162],[-193,-412],[-57,32],[-171,19],[-171,505],[-38,390],[-160,515],[7,271],[181,-52],[269,-204],[151,81],[217,113]],[[85040,31546],[-294,-303],[-241,-137],[-53,-309],[-103,-240],[-236,-15],[-174,-52],[-246,107],[-199,-64],[-191,-27],[-165,-315],[-81,26],[-140,-167],[-133,-187],[-203,23],[-186,0],[-295,377],[-149,113],[6,338],[138,81],[47,134],[-10,212],[34,411],[-31,350],[-147,598],[-45,337],[12,336],[-111,385],[-7,174],[-123,235],[-35,463],[-158,467],[-39,252],[122,-255],[-93,548],[137,-171],[83,-229],[-5,303],[-138,465],[-26,186],[-65,177],[31,341],[56,146],[38,295],[-29,346],[114,425],[21,-450],[118,406],[225,198],[136,252],[212,217],[126,46],[77,-73],[219,220],[168,66],[42,129],[74,54],[153,-14],[292,173],[151,262],[71,316],[163,300],[13,236],[7,321],[194,502],[117,-510],[119,118],[-99,279],[87,287],[122,-128],[34,449],[152,291],[67,233],[140,101],[4,165],[122,-69],[5,148],[122,85],[134,80],[205,-271],[155,-350],[173,-4],[177,-56],[-59,325],[133,473],[126,155],[-44,147],[121,338],[168,208],[142,-70],[234,111],[-5,302],[-204,195],[148,86],[184,-147],[148,-242],[234,-151],[79,60],[172,-182],[162,169],[105,-51],[65,113],[127,-292],[-74,-316],[-105,-239],[-96,-20],[32,-236],[-81,-295],[-99,-291],[20,-166],[221,-327],[214,-189],[143,-204],[201,-350],[78,1],[145,-151],[43,-183],[265,-200],[183,202],[55,317],[56,262],[34,324],[85,470],[-39,286],[20,171],[-32,339],[37,445],[53,120],[-43,197],[67,313],[52,325],[7,168],[104,222],[78,-289],[19,-371],[70,-71],[11,-249],[101,-300],[21,-335],[-10,-214],[100,-464],[179,223],[92,-250],[133,-231],[-29,-262],[60,-506],[42,-295],[70,-72],[75,-505],[-27,-307],[90,-400],[301,-309],[197,-281],[186,-257],[-37,-143],[159,-371],[108,-639],[111,130],[113,-256],[68,91],[48,-626],[197,-363],[129,-226],[217,-478],[78,-475],[7,-337],[-19,-365],[132,-502],[-16,-523],[-48,-274],[-75,-527],[6,-339],[-55,-423],[-123,-538],[-205,-290],[-102,-458],[-93,-292],[-82,-510],[-107,-294],[-70,-442],[-36,-407],[14,-187],[-159,-205],[-311,-22],[-257,-242],[-127,-229],[-168,-254],[-230,262],[-170,104],[43,308],[-152,-112],[-243,-428],[-240,160],[-158,94],[-159,42],[-269,171],[-179,364],[-52,449],[-64,298],[-137,240],[-267,71],[91,287],[-67,438],[-136,-408],[-247,-109],[146,327],[42,341],[107,289],[-22,438],[-226,-504],[-174,-202],[-106,-470],[-217,243],[9,313],[-174,429],[-147,221],[52,137],[-356,358],[-195,17],[-267,287],[-498,-56],[-359,-211],[-317,-197],[-265,39]],[[72718,55024],[-42,-615],[-116,-168],[-242,-135],[-132,470],[-49,849],[126,959],[192,-328],[129,-416],[134,-616]],[[80409,61331],[-228,183],[-8,509],[137,267],[304,166],[159,-14],[62,-226],[-122,-260],[-64,-341],[-240,-284]],[[84517,74170],[-388,-171],[-204,-277],[-300,-161],[148,274],[-58,230],[220,397],[-147,310],[-242,-209],[-314,-411],[-171,-381],[-272,-29],[-142,-275],[147,-400],[227,-97],[9,-265],[220,-173],[311,422],[247,-230],[179,-15],[45,-310],[-393,-165],[-130,-319],[-270,-296],[-142,-414],[299,-325],[109,-581],[169,-541],[189,-454],[-5,-439],[-174,-161],[66,-315],[164,-184],[-43,-481],[-71,-468],[-155,-53],[-203,-640],[-225,-775],[-258,-705],[-382,-545],[-386,-498],[-313,-68],[-170,-262],[-96,192],[-157,-294],[-388,-296],[-294,-90],[-95,-624],[-154,-35],[-73,429],[66,228],[-373,189],[-131,-96]],[[83826,64992],[-167,-947],[-119,-485],[-146,499],[-32,438],[163,581],[223,447],[127,-176],[-49,-357]],[[53835,78058],[-31,-291],[67,-251]],[[53871,77516],[-221,86],[-226,-210],[15,-293],[-34,-168],[91,-301],[261,-298],[140,-488],[309,-476],[217,3],[68,-130],[-78,-118],[249,-214],[204,-178],[238,-308],[29,-111],[-52,-211],[-154,276],[-242,97],[-116,-382],[200,-219],[-33,-309],[-116,-35],[-148,-506],[-116,-46],[1,181],[57,317],[60,126],[-108,342],[-85,298],[-115,74],[-82,255],[-179,107],[-120,238],[-206,38],[-217,267],[-254,384],[-189,340],[-86,585],[-138,68],[-226,195],[-128,-80],[-161,-274],[-115,-43]],[[54100,73116],[211,51],[-100,-465],[41,-183],[-58,-303],[-213,222],[-141,64],[-387,300],[38,304],[325,-54],[284,64]],[[52419,74744],[139,183],[166,-419],[-39,-782],[-126,38],[-113,-197],[-105,156],[-11,713],[-64,338],[153,-30]],[[52368,83053],[-113,328],[-8,604],[46,159],[80,177],[244,37],[98,163],[223,167],[-9,-304],[-82,-192],[33,-166],[151,-89],[-68,-223],[-83,64],[-200,-425],[76,-288]],[[53436,83731],[88,-296],[-166,-478],[-291,333],[-39,246],[408,195]],[[47896,83153],[233,24],[298,-365],[-149,-406]],[[49140,82132],[1,0],[40,343],[-186,364],[-4,8],[-337,104],[-66,160],[101,264],[-92,163],[-149,-279],[-17,569],[-140,301],[101,611],[216,480],[222,-47],[335,49],[-297,-639],[283,81],[304,-3],[-72,-481],[-250,-530],[287,-38],[22,-62],[248,-697],[190,-95],[171,-673],[79,-233],[337,-113],[-34,-378],[-142,-173],[111,-305],[-250,-310],[-371,6],[-473,-163],[-130,116],[-183,-276],[-257,67],[-195,-226],[-148,118],[407,621],[249,127],[-2,1],[-434,98],[-79,235],[291,183],[-152,319],[52,387],[413,-54]],[[45969,89843],[-64,-382],[314,-403],[-361,-451],[-801,-405],[-240,-107],[-365,87],[-775,187],[273,261],[-605,289],[492,114],[-12,174],[-583,137],[188,385],[421,87],[433,-400],[422,321],[349,-167],[453,315],[461,-42]],[[63495,75281],[146,-311],[141,-419],[130,-28],[85,-159],[-228,-47],[-49,-459],[-48,-207],[-101,-138],[7,-293]],[[62492,74950],[68,96],[207,-169],[149,-36],[38,70],[-136,319],[72,82]],[[61542,75120],[42,252],[-70,403],[-160,218],[-154,68],[-102,181]],[[83564,58086],[-142,450],[238,-22],[97,-213],[-74,-510],[-119,295]],[[84051,56477],[70,165],[30,367],[153,35],[-44,-398],[205,570],[-26,-563],[-100,-195],[-87,-373],[-87,-175],[-171,409],[57,158]],[[85104,55551],[28,-392],[16,-332],[-94,-540],[-102,602],[-130,-300],[89,-435],[-79,-277],[-327,343],[-78,428],[84,280],[-176,280],[-87,-245],[-131,23],[-205,-330],[-46,173],[109,498],[175,166],[151,223],[98,-268],[212,162],[45,264],[196,15],[-16,457],[225,-280],[23,-297],[20,-218]],[[82917,56084],[-369,-561],[136,414],[200,364],[167,409],[146,587],[49,-482],[-183,-325],[-146,-406]],[[83982,61347],[-46,-245],[95,-423],[-73,-491],[-164,-196],[-43,-476],[62,-471],[147,-65],[123,70],[347,-328],[-27,-321],[91,-142],[-29,-272],[-216,290],[-103,310],[-71,-217],[-177,354],[-253,-87],[-138,130],[14,244],[87,151],[-83,136],[-36,-213],[-137,340],[-41,257],[-11,566],[112,-195],[29,925],[90,535],[169,-1],[171,-168],[85,153],[26,-150]],[[83899,57324],[-43,282],[166,-183],[177,1],[-5,-247],[-129,-251],[-176,-178],[-10,275],[20,301]],[[84861,57766],[78,-660],[-214,157],[5,-199],[68,-364],[-132,-133],[-11,416],[-84,31],[-43,357],[163,-47],[-4,224],[-169,451],[266,-13],[77,-220]],[[78372,54256],[64,-56],[164,-356],[116,-396],[16,-398],[-29,-269],[27,-203],[20,-349],[98,-163],[109,-523],[-5,-199],[-197,-40],[-263,438],[-329,469],[-32,301],[-161,395],[-38,489],[-100,322],[30,431],[-61,250]],[[80461,51765],[204,-202],[214,110],[56,500],[119,112],[333,128],[199,467],[137,374]],[[81723,53254],[126,-307],[58,202],[133,-19],[16,377],[13,291]],[[82069,53798],[214,411],[140,462],[112,2],[143,-299],[13,-257],[183,-165],[231,-177],[-20,-232],[-186,-29],[50,-289],[-205,-201]],[[81723,53254],[110,221],[236,323]],[[53809,77462],[62,54]],[[57797,86326],[-504,-47],[-489,-216],[-452,-125],[-161,323],[-269,193],[62,582],[-135,533],[133,345],[252,371],[635,640],[185,124],[-28,250],[-387,279]],[[54711,79292],[39,130],[123,-10],[95,61],[7,55],[54,28],[18,134],[64,26],[43,106],[82,1]],[[60669,61213],[161,-684],[77,-542],[152,-288],[379,-558],[154,-336],[151,-341],[87,-203],[136,-178]],[[61966,58083],[-83,-144],[-119,51]],[[61764,57990],[-95,191],[-114,346],[-124,190],[-71,204],[-242,237],[-191,7],[-67,124],[-163,-139],[-168,268],[-87,-441],[-323,124]],[[89411,73729],[-256,-595],[4,-610],[-104,-472],[48,-296],[-145,-416],[-355,-278],[-488,-36],[-396,-675],[-186,227],[-12,442],[-483,-130],[-329,-279],[-325,-11],[282,-435],[-186,-1004],[-179,-248],[-135,229],[69,533],[-176,172],[-113,405],[263,182],[145,371],[280,306],[203,403],[553,177],[297,-121],[291,1050],[185,-282],[408,591],[158,229],[174,723],[-47,664],[117,374],[295,108],[152,-819],[-9,-479]],[[90169,76553],[197,250],[62,-663],[-412,-162],[-244,-587],[-436,404],[-152,-646],[-308,-9],[-39,587],[138,455],[296,33],[81,817],[83,460],[326,-615],[213,-198],[195,-126]],[[86769,70351],[154,352],[158,-68],[114,248],[204,-127],[35,-203],[-156,-357],[-114,189],[-143,-137],[-73,-346],[-181,168],[2,281]],[[64752,60417],[-201,-158],[-54,-263],[-6,-201],[-277,-249],[-444,-276],[-249,-417],[-122,-33],[-83,35],[-163,-245],[-177,-114],[-233,-30],[-70,-34],[-61,-156],[-73,-43],[-43,-150],[-137,13],[-89,-80],[-192,30],[-72,345],[8,323],[-46,174],[-54,437],[-80,243],[56,29],[-29,270],[34,114],[-12,257]],[[61883,60238],[121,189],[-28,249],[74,290],[114,-153],[75,53],[321,14],[50,-59],[269,-60],[106,30],[70,-197],[130,99],[199,620],[259,266],[801,226]],[[63448,67449],[109,-510],[137,-135],[47,-207],[190,-249],[16,-243],[-27,-197],[35,-199],[80,-165],[37,-194],[41,-145]],[[64274,65130],[53,-226]],[[61883,60238],[-37,252],[-83,178],[-22,236],[-143,212],[-148,495],[-79,482],[-192,406],[-124,97],[-184,563],[-32,411],[12,350],[-159,655],[-130,231],[-150,122],[-92,339],[15,133],[-77,306],[-81,132],[-108,440],[-170,476],[-141,406],[-139,-3],[44,325],[12,206],[34,236]],[[36483,4468],[141,0],[414,127],[419,-127],[342,-255],[120,-359],[33,-254],[11,-301],[-430,-186],[-452,-150],[-522,-139],[-582,-116],[-658,35],[-365,197],[49,243],[593,162],[239,197],[174,254],[126,220],[168,209],[180,243]],[[31586,3163],[625,-23],[599,-58],[207,243],[147,208],[288,-243],[-82,-301],[-81,-266],[-582,81],[-621,-35],[-348,197],[0,23],[-152,174]],[[29468,8472],[190,70],[321,-23],[82,301],[16,219],[-6,475],[158,278],[256,93],[147,-220],[65,-220],[120,-267],[92,-254],[76,-267],[33,-266],[-49,-231],[-76,-220],[-326,-81],[-311,-116],[-364,11],[136,232],[-327,-81],[-310,-81],[-212,174],[-16,243],[305,231]],[[21575,8103],[174,104],[353,-81],[403,-46],[305,-81],[304,69],[163,-335],[-217,46],[-337,-23],[-343,23],[-376,-35],[-283,116],[-146,243]],[[15938,7061],[60,197],[332,-104],[359,-93],[332,104],[-158,-208],[-261,-151],[-386,47],[-278,208]],[[14643,7177],[202,127],[277,-139],[425,-231],[-164,23],[-359,58],[-381,162]],[[4524,4144],[169,220],[517,-93],[277,-185],[212,-209],[76,-266],[-533,-81],[-364,208],[-163,209],[-11,35],[-180,162]],[[0,529],[16,-5],[245,344],[501,-185],[32,21],[294,188],[38,-7],[32,-4],[402,-246],[352,246],[63,34],[816,104],[265,-138],[130,-71],[419,-196],[789,-151],[625,-185],[1072,-139],[800,162],[1181,-116],[669,-185],[734,174],[773,162],[60,278],[-1094,23],[-898,139],[-234,231],[-745,128],[49,266],[103,243],[104,220],[-55,243],[-462,162],[-212,209],[-430,185],[675,-35],[642,93],[402,-197],[495,173],[457,220],[223,197],[-98,243],[-359,162],[-408,174],[-571,35],[-500,81],[-539,58],[-180,220],[-359,185],[-217,208],[-87,672],[136,-58],[250,-185],[457,58],[441,81],[228,-255],[441,58],[370,127],[348,162],[315,197],[419,58],[-11,220],[-97,220],[81,208],[359,104],[163,-196],[425,115],[321,151],[397,12],[375,57],[376,139],[299,128],[337,127],[218,-35],[190,-46],[414,81],[370,-104],[381,11],[364,81],[375,-57],[414,-58],[386,23],[403,-12],[413,-11],[381,23],[283,174],[337,92],[349,-127],[331,104],[300,208],[179,-185],[98,-208],[180,-197],[288,174],[332,-220],[375,-70],[321,-162],[392,35],[354,104],[418,-23],[376,-81],[381,-104],[147,254],[-180,197],[-136,209],[-359,46],[-158,220],[-60,220],[-98,440],[213,-81],[364,-35],[359,35],[327,-93],[283,-174],[119,-208],[376,-35],[359,81],[381,116],[342,70],[283,-139],[370,46],[239,451],[224,-266],[321,-104],[348,58],[228,-232],[365,-23],[337,-69],[332,-128],[218,220],[108,209],[278,-232],[381,58],[283,-127],[190,-197],[370,58],[288,127],[283,151],[337,81],[392,69],[354,81],[272,127],[163,186],[65,254],[-32,244],[-87,231],[-98,232],[-87,231],[-71,209],[-16,231],[27,232],[130,220],[109,243],[44,231],[-55,255],[-32,232],[136,266],[152,173],[180,220],[190,186],[223,173],[109,255],[152,162],[174,151],[267,34],[174,186],[196,115],[228,70],[202,150],[157,186],[218,69],[163,-151],[-103,-196],[-283,-174],[-120,-127],[-206,92],[-229,-58],[-190,-139],[-202,-150],[-136,-174],[-38,-231],[17,-220],[130,-197],[-190,-139],[-261,-46],[-153,-197],[-163,-185],[-174,-255],[-44,-220],[98,-243],[147,-185],[229,-139],[212,-185],[114,-232],[60,-220],[82,-232],[130,-196],[82,-220],[38,-544],[81,-220],[22,-232],[87,-231],[-38,-313],[-152,-243],[-163,-197],[-370,-81],[-125,-208],[-169,-197],[-419,-220],[-370,-93],[-348,-127],[-376,-128],[-223,-243],[-446,-23],[-489,23],[-441,-46],[-468,0],[87,-232],[424,-104],[311,-162],[174,-208],[-310,-185],[-479,58],[-397,-151],[-17,-243],[-11,-232],[327,-196],[60,-220],[353,-220],[588,-93],[500,-162],[398,-185],[506,-186],[690,-92],[681,-162],[473,-174],[517,-197],[272,-278],[136,-220],[337,209],[457,173],[484,186],[577,150],[495,162],[691,12],[680,-81],[560,-139],[180,255],[386,173],[702,12],[550,127],[522,128],[577,81],[614,104],[430,150],[-196,209],[-119,208],[0,220],[-539,-23],[-571,-93],[-544,0],[-77,220],[39,440],[125,128],[397,138],[468,139],[337,174],[337,174],[251,231],[380,104],[376,81],[190,47],[430,23],[408,81],[343,116],[337,139],[305,139],[386,185],[245,197],[261,173],[82,232],[-294,139],[98,243],[185,185],[288,116],[305,139],[283,185],[217,232],[136,277],[202,163],[331,-35],[136,-197],[332,-23],[11,220],[142,231],[299,-58],[71,-220],[331,-34],[360,104],[348,69],[315,-34],[120,-243],[305,196],[283,105],[315,81],[310,81],[283,139],[310,92],[240,128],[168,208],[207,-151],[288,81],[202,-277],[157,-209],[316,116],[125,232],[283,162],[365,-35],[108,-220],[229,220],[299,69],[326,23],[294,-11],[310,-70],[300,-34],[130,-197],[180,-174],[304,104],[327,24],[315,0],[310,11],[278,81],[294,70],[245,162],[261,104],[283,58],[212,162],[152,324],[158,197],[288,-93],[109,-208],[239,-139],[289,46],[196,-208],[206,-151],[283,139],[98,255],[250,104],[289,197],[272,81],[326,116],[218,127],[228,139],[218,127],[261,-69],[250,208],[180,162],[261,-11],[229,139],[54,208],[234,162],[228,116],[278,93],[256,46],[244,-35],[262,-58],[223,-162],[27,-254],[245,-197],[168,-162],[332,-70],[185,-162],[229,-162],[266,-35],[223,116],[240,243],[261,-127],[272,-70],[261,-69],[272,-46],[277,0],[229,-614],[-11,-150],[-33,-267],[-266,-150],[-218,-220],[38,-232],[310,12],[-38,-232],[-141,-220],[-131,-243],[212,-185],[321,-58],[321,104],[153,232],[92,220],[153,185],[174,174],[70,208],[147,289],[174,58],[316,24],[277,69],[283,93],[136,231],[82,220],[190,220],[272,151],[234,115],[153,197],[157,104],[202,93],[277,-58],[250,58],[272,69],[305,-34],[201,162],[142,393],[103,-162],[131,-278],[234,-115],[266,-47],[267,70],[283,-46],[261,-12],[174,58],[234,-35],[212,-127],[250,81],[300,0],[255,81],[289,-81],[185,197],[141,196],[191,163],[348,439],[179,-81],[212,-162],[185,-208],[354,-359],[272,-12],[256,0],[299,70],[299,81],[229,162],[190,174],[310,23],[207,127],[218,-116],[141,-185],[196,-185],[305,23],[190,-150],[332,-151],[348,-58],[288,47],[218,185],[185,185],[250,46],[251,-81],[288,-58],[261,93],[250,0],[245,-58],[256,-58],[250,104],[299,93],[283,23],[316,0],[255,58],[251,46],[76,290],[11,243],[174,-162],[49,-266],[92,-244],[115,-196],[234,-105],[315,35],[365,12],[250,35],[364,0],[262,11],[364,-23],[310,-46],[196,-186],[-54,-220],[179,-173],[299,-139],[310,-151],[360,-104],[375,-92],[283,-93],[315,-12],[180,197],[245,-162],[212,-185],[245,-139],[337,-58],[321,-69],[136,-232],[316,-139],[212,-208],[310,-93],[321,12],[299,-35],[332,12],[332,-47],[310,-81],[288,-139],[289,-116],[195,-173],[-32,-232],[-147,-208],[-125,-266],[-98,-209],[-131,-243],[-364,-93],[-163,-208],[-360,-127],[-125,-232],[-190,-220],[-201,-185],[-115,-243],[-70,-220],[-28,-266],[6,-220],[158,-232],[60,-220],[130,-208],[517,-81],[109,-255],[-501,-93],[-424,-127],[-528,-23],[-234,-336],[-49,-278],[-119,-220],[-147,-220],[370,-196],[141,-244],[239,-219],[338,-197],[386,-186],[419,-185],[636,-185],[142,-289],[800,-128],[53,-45],[208,-175],[767,151],[636,-186],[479,-142],[-99999,0]],[[59092,71341],[19,3],[40,143],[200,-8],[253,176],[-188,-251],[21,-111]],[[59437,71293],[-30,21],[-53,-45],[-42,12],[-14,-22],[-5,59],[-20,37],[-54,6],[-75,-51],[-52,31]],[[59437,71293],[8,-48],[-285,-240],[-136,77],[-64,237],[132,22]],[[45272,63236],[13,274],[106,161],[91,308],[-18,200],[96,417],[155,376],[93,95],[74,344],[6,315],[100,365],[185,216],[177,603],[5,8],[139,227],[259,65],[218,404],[140,158],[232,493],[-70,735],[106,508],[37,312],[179,399],[278,270],[206,244],[186,612],[87,362],[205,-2],[167,-251],[264,41],[288,-131],[121,-6]],[[56944,63578],[0,2175],[0,2101],[-83,476],[71,365],[-43,253],[101,283]],[[56990,69231],[369,10],[268,-156],[275,-175],[129,-92],[214,188],[114,169],[245,49],[198,-75],[75,-293],[65,193],[222,-140],[217,-33],[137,149]],[[59700,68010],[-78,-238],[-60,-446],[-75,-308],[-65,-103],[-93,191],[-125,263],[-198,847],[-29,-53],[115,-624],[171,-594],[210,-920],[102,-321],[90,-334],[249,-654],[-55,-103],[9,-384],[323,-530],[49,-121]],[[53191,70158],[326,-204],[117,51],[232,-98],[368,-264],[130,-526],[250,-114],[391,-248],[296,-293],[136,153],[133,272],[-65,452],[87,288],[200,277],[192,80],[375,-121],[95,-264],[104,-2],[88,-101],[276,-70],[68,-195]],[[59804,53833],[-164,643],[-127,137],[-48,236],[-141,288],[-171,42],[95,337],[147,14],[42,181]],[[61764,57990],[-98,-261],[-94,-277],[22,-163],[4,-180],[155,-10],[67,42],[62,-106]],[[61882,57035],[-61,-209],[103,-325],[102,-285],[106,-210],[909,-702],[233,4]],[[61966,58083],[66,-183],[-9,-245],[-158,-142],[119,-161]],[[61984,57352],[-102,-317]],[[61984,57352],[91,-109],[54,-245],[125,-247],[138,-2],[262,151],[302,70],[245,184],[138,39],[99,108],[158,20]],[[58449,49909],[-166,-182],[-67,60]],[[58564,52653],[115,161],[176,-132],[224,138],[195,-1],[171,272]],[[55279,77084],[100,2],[-69,-260],[134,-227],[-41,-278],[-65,-27]],[[55338,76294],[-52,-53],[-90,-138],[-41,-325]],[[55719,75309],[35,-5],[13,121],[164,91],[62,23]],[[55993,75539],[95,35],[128,9]],[[55993,75539],[-9,44],[33,71],[31,144],[-39,-4],[-54,110],[-46,28],[-36,94],[-52,36],[-40,84],[-50,-33],[-38,-196],[-66,-43]],[[55627,75874],[22,51],[-106,123],[-91,63],[-40,82],[-74,101]],[[55380,75322],[-58,46],[-78,192],[-120,118]],[[55627,75874],[-52,-132]],[[32866,56937],[160,77],[58,-21],[-11,-440],[-232,-65],[-50,53],[81,163],[-6,233]]],"bbox":[-180,-85.60903777459771,180,83.64513000000001],"transform":{"scale":[0.0036000360003600037,0.0016925586033320105],"translate":[-180,-85.60903777459771]}} goaccess-1.9.3/resources/js/0000755000175000017300000000000014626467007011514 5goaccess-1.9.3/resources/js/charts.js0000644000175000017300000010232214624360252013246 /** * ______ ___ * / ____/___ / | _____________ __________ * / / __/ __ \/ /| |/ ___/ ___/ _ \/ ___/ ___/ * / /_/ / /_/ / ___ / /__/ /__/ __(__ |__ ) * \____/\____/_/ |_\___/\___/\___/____/____/ * * The MIT License (MIT) * Copyright (c) 2009-2018 Gerardo Orellana */ 'use strict'; // This is faster than calculating the exact length of each label. // e.g., getComputedTextLength(), slice()... function truncate(text, width) { text.each(function () { var parent = this.parentNode, $d3parent = d3.select(parent); var gw = $d3parent.node().getBBox(); var x = (Math.min(gw.width, width) / 2) * -1; // adjust wrapper width if ('svg' == parent.nodeName) { $d3parent.attr('width', width).attr('x', x); } // wrap within an svg else { $d3parent.insert('svg', function () { return this; }.bind(this)) .attr('class', 'wrap-text') .attr('width', width) .attr('x', x) .append(function () { return this; }.bind(this)); } }); } function WorldMap() { const maxLat = 84; let path = null; let projection = null; let tlast = [0, 0]; let slast = null; let opts = {}; let metric = 'hits'; let margin = { top: 20, right: 50, bottom: 40, left: 50 }; let width = 760; let height = 170; function innerW() { return width - margin.left - margin.right; } function mapData(data) { return data.reduce((countryData, region) => { if (!region.items) countryData.push(region); else region.items.forEach(item => countryData.push({ data: item.data, hits: item.hits.count, visitors: item.visitors.count, bytes: item.bytes.count, region: region.data })); return countryData; }, []); } function formatTooltip(data) { const d = {...data}; let out = {}; out[0] = GoAccess.Util.fmtValue(d['data'], 'str'); out[1] = metric == 'bytes' ? GoAccess.Util.fmtValue(d['bytes'], 'bytes') : d3.format(',')(d['hits']); if (metric == 'hits') out[2] = d3.format(',')(d['visitors']); const template = d3.select('#tpl-chart-tooltip').html(); return Hogan.compile(template).render({ 'data': out }); } function mouseover(event, selection, data) { const tooltip = selection.select('.chart-tooltip-wrap'); tooltip.html(formatTooltip(data)) .style('left', `${d3.pointer(event)[0] + 10}px`) .style('top', `${d3.pointer(event)[1] + 10}px`) .style('display', 'block'); } function mouseout(selection, g) { const tooltip = selection.select('.chart-tooltip-wrap'); tooltip.style('display', 'none'); } function drawLegend(selection, colorScale) { const legendHeight = 10; const legendPadding = 10; let svg = selection.select('.legend-svg'); if (svg.empty()) { svg = selection.append('svg') .attr('class', 'legend-svg') .attr('width', width + margin.left + margin.right) .attr('height', legendHeight + 2 * legendPadding); } let legend = svg.select('.legend'); if (legend.empty()) { legend = svg.append('g') .attr('class', 'legend') .attr('transform', `translate(${margin.left}, ${legendPadding})`); } const legendData = colorScale.quantiles(); const legendRects = legend.selectAll('rect') .data(legendData); legendRects.enter().append('rect') .merge(legendRects) .attr('x', (d, i) => (i * (innerW())) / legendData.length) .attr('y', 0) .attr('width', (innerW()) / legendData.length) .attr('height', legendHeight) .style('fill', d => colorScale(d)); legendRects.exit().remove(); const legendTexts = legend.selectAll('text') .data(legendData); legendTexts.enter().append('text') .merge(legendTexts) .attr('x', (d, i) => (i * (innerW())) / legendData.length) .attr('y', legendHeight + legendPadding) .text(d => Math.round(d)) .style('font-size', '10px') .attr('text-anchor', 'middle') .text(d => metric === 'bytes' ? GoAccess.Util.fmtValue(d, 'bytes') : d3.format(',')(d)); legendTexts.exit().remove(); } function updateMap(selection, svg, data, countries, countryNameToGeoJson) { data = mapData(data); path = d3.geoPath().projection(projection); const colorScale = d3.scaleQuantile().domain(data.map(d => d[metric])).range(['#ffffccc9', '#c2e699', '#a1dab4c9', '#41b6c4c9', '#2c7fb8c9']); if (data.length) drawLegend(selection, colorScale); // Create a mapping from country name to data const dataByName = {}; data.forEach(d => { const k = d.data.split(' ')[0]; dataByName[k] = d; }); let country = svg.select('g').selectAll('.country') .data(countries); // set initial opacity to 0 for entering elements let countryEnter = country.enter().append('path') .attr('class', 'country') .attr('d', path) .attr('opacity', 0); country = countryEnter.merge(country) .on('mouseover', function(event, d) { const countryData = dataByName[d.id]; if (countryData) mouseover(event, selection, countryData); }) .on('mouseout', function(d) { mouseout(selection); }); country.transition().duration(500) .style('fill', function(d) { const countryData = dataByName[d.id]; return countryData ? colorScale(countryData[metric]) : '#cccccc54'; }) .attr('opacity', 1); country.exit() .transition().duration(500) .attr('opacity', 0) .remove(); } function setBounds(projection, maxLat) { const [yaw] = projection.rotate(); // Top left corner const xymax = projection([-yaw + 180 - 1e-6, -maxLat]); // Bottom right corner const xymin = projection([-yaw - 180 + 1e-6, maxLat]); return [xymin, xymax]; } function zoomed(event, projection, path, scaleExtent, g) { const newX = event.transform.x % width; const newY = event.transform.y; const scale = event.transform.k; if (scale != slast) { // Adjust the scale of the projection based on the zoom level projection.scale(scale * (innerW() / (2 * Math.PI))); } else { // Calculate the new longitude based on the x-coordinate let [longitude] = projection.rotate(); // Use the X translation to rotate, based on the current scale longitude += 360 * ((newX - tlast[0]) / width) * (scaleExtent[0] / scale); projection.rotate([longitude, 0, 0]); // Calculate the new latitude based on the y-coordinate const b = setBounds(projection, maxLat); let dy = newY - tlast[1]; if (b[0][1] + dy > 0) dy = -b[0][1]; else if (b[1][1] + dy < height) dy = height - b[1][1]; projection.translate([projection.translate()[0], projection.translate()[1] + dy]); } // Redraw paths with the updated projection g.selectAll('path').attr('d', path); // Save last values slast = scale; tlast = [newX, newY]; } function createSVG(selection) { const svg = d3.select(selection) .append('svg') .attr('class', 'map') .attr('width', width) .attr('height', height) .lower(); const g = svg.append('g') .attr('transform', `translate(${margin.left}, 0)`) .attr('transform-origin', '50% 50%'); projection = d3.geoMercator() .center([0, 15]) .scale([(innerW()) / (2 * Math.PI)]) .translate([(innerW()) / 2, height / 1.5]); path = d3.geoPath().projection(projection); // Calculate scale extent and initial scale const bounds = setBounds(projection, maxLat); const s = width / (bounds[1][0] - bounds[0][0]); // The minimum and maximum zoom scales const scaleExtent = [s, 5 * s]; const zoom = d3.zoom() .scaleExtent(scaleExtent) .on('zoom', event => { zoomed(event, projection, path, scaleExtent, g); }); svg.call(zoom); return svg; } function chart(selection) { selection.each(function(data) { const worldData = window.countries110m; const countries = topojson.feature(worldData, worldData.objects.countries).features; const countryNameToGeoJson = {}; countries.forEach(country => { countryNameToGeoJson[country.properties.name] = country; }); let svg = d3.select(this).select('svg.map'); // if the SVG element doesn't exist, create it if (svg.empty()) svg = createSVG(this); updateMap(selection, svg, data, countries, countryNameToGeoJson); }); } chart.metric = function(_) { if (!arguments.length) return metric; metric = _; return chart; }; chart.opts = function (_) { if (!arguments.length) return opts; opts = _; return chart; }; chart.width = function(_) { if (!arguments.length) return width; width = _; return chart; }; chart.height = function(_) { if (!arguments.length) return height; height = _; return chart; }; return chart; } function AreaChart(dualYaxis) { var opts = {}; var margin = { top : 20, right : 50, bottom : 40, left : 50, }, height = 170, nTicks = 10, padding = 10, width = 760; var labels = { x: 'Unnamed', y0: 'Unnamed', y1: 'Unnamed' }; var format = { x: null, y0: null, y1: null}; var xValue = function (d) { return d[0]; }, yValue0 = function (d) { return d[1]; }, yValue1 = function (d) { return d[2]; }; var xScale = d3.scaleBand(); var yScale0 = d3.scaleLinear().nice(); var yScale1 = d3.scaleLinear().nice(); var xAxis = d3.axisBottom(xScale) .tickFormat(function(d) { if (format.x) return GoAccess.Util.fmtValue(d, format.x); return d; }); var yAxis0 = d3.axisLeft(yScale0) .tickFormat(function(d) { return d3.format('.2s')(d); }); var yAxis1 = d3.axisRight(yScale1) .tickFormat(function(d) { if (format.y1) return GoAccess.Util.fmtValue(d, format.y1); return d3.format('.2s')(d); }); var xGrid = d3.axisBottom(xScale); var yGrid = d3.axisLeft(yScale0); var area0 = d3.area() .curve(d3.curveMonotoneX) .x(X) .y0(height) .y1(Y0); var area1 = d3.area() .curve(d3.curveMonotoneX) .x(X) .y0(Y1) .y1(height); var line0 = d3.line() .curve(d3.curveMonotoneX) .x(X) .y(Y0); var line1 = d3.line() .curve(d3.curveMonotoneX) .x(X) .y(Y1); // The x-accessor for the path generator; xScale ∘ xValue. function X(d) { return (xScale(d[0]) + xScale.bandwidth() / 2); } // The x-accessor for the path generator; yScale0 yValue0. function Y0(d) { return yScale0(d[1]); } // The x-accessor for the path generator; yScale0 yValue0. function Y1(d) { return yScale1(d[2]); } function innerW() { return width - margin.left - margin.right; } function innerH() { return height - margin.top - margin.bottom; } function getXTicks(data) { const domain = xScale.domain(); if (data.length < nTicks) return domain; return d3.range(0, nTicks).map(function(i) { const index = Math.floor(i * (domain.length - 1) / (nTicks - 1)); if (index >= 0 && index < domain.length) return domain[index]; return null; }); } function getYTicks(scale) { var domain = scale.domain(); return d3.range(domain[0], domain[1], Math.ceil(domain[1] / nTicks)); } // Convert data to standard representation greedily; // this is needed for nondeterministic accessors. function mapData(data) { var _datum = function (d, i) { var datum = [xValue.call(data, d, i), yValue0.call(data, d, i)]; dualYaxis && datum.push(yValue1.call(data, d, i)); return datum; }; return data.map(function (d, i) { return _datum(d, i); }); } function updateScales(data) { // Update the x-scale. xScale.domain(data.map(function (d) { return d[0]; })) .range([0, innerW()]); // Update the y-scale. yScale0.domain([0, d3.max(data, function (d) { return d[1]; })]) .range([innerH(), 0]); // Update the y-scale. dualYaxis && yScale1.domain([0, d3.max(data, function (d) { return d[2]; })]) .range([innerH(), 0]); } function toggleOpacity(ele, op) { d3.select(ele.parentNode).selectAll('.' + (ele.getAttribute('data-yaxis') == 'y0' ? 'y1' : 'y0')).attr('style', op); } function setLegendLabels(svg) { // Legend Color var rect = svg.selectAll('rect.legend.y0').data([null]); var rectEnter = rect.enter() .append('rect') .attr('class', 'legend y0') .attr('data-yaxis', 'y0') .on('mousemove', function(d, i) { toggleOpacity(this, 'opacity:0.1'); }) .on('mouseleave', function(d, i) { toggleOpacity(this, null); }) .attr('y', (height - 15)); rectEnter.merge(rect) .attr('x', (width / 2) - 100); // Legend Labels var text = svg.selectAll('text.legend.y0').data([null]); var textEnter = text.enter() .append('text') .attr('class', 'legend y0') .attr('data-yaxis', 'y0') .on('mousemove', function(d, i) { toggleOpacity(this, 'opacity:0.1'); }) .on('mouseleave', function(d, i) { toggleOpacity(this, null); }) .attr('y', (height - 6)); textEnter.merge(text) .attr('x', (width / 2) - 85) .text(labels.y0); if (!dualYaxis) return; // Legend Labels rect = svg.selectAll('rect.legend.y1').data([null]); var rectEnter = rect.enter() .append('rect') .attr('class', 'legend y1') .attr('data-yaxis', 'y1') .on('mousemove', function(d, i) { toggleOpacity(this, 'opacity:0.1'); }) .on('mouseleave', function(d, i) { toggleOpacity(this, null); }) .attr('y', (height - 15)); rectEnter.merge(rect) .attr('x', (width / 2)); // Legend Labels text = svg.selectAll('text.legend.y1').data([null]); var textEnter = text.enter() .append('text') .attr('class', 'legend y1') .attr('data-yaxis', 'y1') .on('mousemove', function(d, i) { toggleOpacity(this, 'opacity:0.1'); }) .on('mouseleave', function(d, i) { toggleOpacity(this, null); }) .attr('y', (height - 6)); textEnter.merge(text) .attr('x', (width / 2) + 15) .text(labels.y1); } function setAxisLabels(svg) { // Labels svg.selectAll('text.axis-label.y0') .data([null]) .enter() .append('text') .attr('class', 'axis-label y0') .attr('y', 10) .attr('x', 53) .text(labels.y0); if (!dualYaxis) return; // Labels var tEnter = svg.selectAll('text.axis-label.y1') .data([null]) .enter() .append('text') .attr('class', 'axis-label y1') .attr('y', 10) .text(labels.y1); dualYaxis && tEnter.attr('x', width - 25); } function createSkeleton(svg) { const g = svg.append('g'); // Lines g.append('g') .attr('class', 'line line0 y0'); dualYaxis && g.append('g') .attr('class', 'line line1 y1'); // Areas g.append('g') .attr('class', 'area area0 y0'); dualYaxis && g.append('g') .attr('class', 'area area1 y1'); // Points g.append('g') .attr('class', 'points y0'); dualYaxis && g.append('g') .attr('class', 'points y1'); // Grid g.append('g') .attr('class', 'x grid'); g.append('g') .attr('class', 'y grid'); // Axis g.append('g') .attr('class', 'x axis'); g.append('g') .attr('class', 'y0 axis'); dualYaxis && g.append('g') .attr('class', 'y1 axis'); // Rects g.append('g') .attr('class', 'rects'); setAxisLabels(svg); setLegendLabels(svg); // Mouseover line g.append('line') .attr('y2', innerH()) .attr('y1', 0) .attr('class', 'indicator'); } function pathLen(d) { return d.node().getTotalLength(); } function addLine(g, data, line, cName) { // Update the line path. var path = g.select('g.' + cName).selectAll('path.' + cName).data([data]); // enter var pathEnter = path.enter() .append('svg:path') .attr('d', line) .attr('class', cName) .attr('stroke-dasharray', function(d) { var pl = pathLen(d3.select(this)); return pl + ' ' + pl; }) .attr('stroke-dashoffset', function(d) { return pathLen(d3.select(this)); }); // update pathEnter.merge(path) .attr('d', line) .transition() .attr('stroke-dasharray', function(d) { var pl = pathLen(d3.select(this)); return pl + ' ' + pl; }) .duration(2000) .attr('stroke-dashoffset', 0); // remove elements path.exit().remove(); } function addArea(g, data, cb, cName) { // Update the area path. var area = g.select('g.' + cName).selectAll('path.' + cName) .data([data]); var areaEnter = area.enter() .append('svg:path') .attr('class', cName); areaEnter.merge(area) .attr('d', cb); // remove elements area.exit().remove(); } // Update the area path and lines. function addAreaLines(g, data) { // Update the area path. addArea(g, data, area0.y0(yScale0.range()[0]), 'area0'); // Update the line path. addLine(g, data, line0, 'line0'); // Update the area path. addArea(g, data, area1.y1(yScale1.range()[0]), 'area1'); // Update the line path. addLine(g, data, line1, 'line1'); } // Update chart points function addPoints(g, data) { var radius = data.length > 100 ? 1 : 2.5; var points = g.select('g.points.y0').selectAll('circle.point').data(data); var pointsEnter = points.enter() .append('svg:circle') .attr('r', radius) .attr('class', 'point'); pointsEnter.merge(points) .attr('cx', function(d) { return (xScale(d[0]) + xScale.bandwidth() / 2); }) .attr('cy', function(d) { return yScale0(d[1]); }); // remove elements points.exit().remove(); if (!dualYaxis) return; points = g.select('g.points.y1').selectAll('circle.point').data(data); pointsEnter = points.enter() .append('svg:circle') .attr('r', radius) .attr('class', 'point'); pointsEnter.merge(points) .attr('cx', function(d) { return (xScale(d[0]) + xScale.bandwidth() / 2); }) .attr('cy', function(d) { return yScale1(d[2]); }); // remove elements points.exit().remove(); } function addAxis(g, data) { var xTicks = getXTicks(data); var tickDistance = xTicks.length > 1 ? (xScale(xTicks[1]) - xScale(xTicks[0])) : innerW(); var labelW = tickDistance - padding; // Update the x-axis. g.select('.x.axis') .attr('transform', 'translate(0,' + yScale0.range()[0] + ')') .call(xAxis.tickValues(xTicks)) .selectAll(".tick text") .call(truncate, labelW > 0 ? labelW : innerW()); // Update the y0-axis. g.select('.y0.axis') .call(yAxis0.tickValues(getYTicks(yScale0))); if (!dualYaxis) return; // Update the y1-axis. g.select('.y1.axis') .attr('transform', 'translate(' + innerW() + ', 0)') .call(yAxis1.tickValues(getYTicks(yScale1))); } // Update the X-Y grid. function addGrid(g, data) { g.select('.x.grid') .attr('transform', 'translate(0,' + yScale0.range()[0] + ')') .call(xGrid .tickValues(getXTicks(data)) .tickSize(-innerH(), 0, 0) .tickSizeOuter(0) .tickFormat('') ); g.select('.y.grid') .call(yGrid .tickValues(getYTicks(yScale0)) .tickSize(-innerW(), 0) .tickSizeOuter(0) .tickFormat('') ); } function formatTooltip(data) { var d = data.slice(0); d[0] = (format.x) ? GoAccess.Util.fmtValue(d[0], format.x) : d[0]; d[1] = (format.y0) ? GoAccess.Util.fmtValue(d[1], format.y0) : d3.format(',')(d[1]); dualYaxis && (d[2] = (format.y1) ? GoAccess.Util.fmtValue(d[2], format.y1) : d3.format(',')(d[2])); var template = d3.select('#tpl-chart-tooltip').html(); return Hogan.compile(template).render({ 'data': d }); } function mouseover(event, selection, data) { var tooltip = selection.select('.chart-tooltip-wrap'); tooltip.html(formatTooltip(data)) .style('left', X(data) + 'px') .style('top', (d3.pointer(event)[1] + 10) + 'px') .style('display', 'block'); selection.select('line.indicator') .style('display', 'block') .attr('transform', 'translate(' + X(data) + ',' + 0 + ')'); } function mouseout(selection, g) { var tooltip = selection.select('.chart-tooltip-wrap'); tooltip.style('display', 'none'); g.select('line.indicator').style('display', 'none'); } function addRects(selection, g, data) { var w = (innerW() / data.length); var rects = g.select('g.rects').selectAll('rect').data(data); var rectsEnter = rects.enter() .append('svg:rect') .attr('height', innerH()) .attr('class', 'point'); rectsEnter.merge(rects) .attr('width', w) .attr('x', function(d, i) { return (w * i); }) .attr('y', 0) .on('mousemove', function(event) { mouseover(event, selection, d3.select(this).datum()); }) .on('mouseleave', function(event) { mouseout(selection, g); }); // remove elements rects.exit().remove(); } function chart(selection) { selection.each(function (data) { // normalize data data = mapData(data); // updates X-Y scales updateScales(data); // select the SVG element, if it exists let svg = d3.select(this).select('svg'); // if the SVG element doesn't exist, create it if (svg.empty()) { svg = d3.select(this).append('svg').attr('width', width).attr('height', height); createSkeleton(svg); } // Update the inner dimensions. var g = svg.select('g') .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')'); // Add grid addGrid(g, data); // Add chart lines and areas addAreaLines(g, data); // Add chart points addPoints(g, data); // Add axis addAxis(g, data); // Add rects addRects(selection, g, data); }); } chart.opts = function (_) { if (!arguments.length) return opts; opts = _; return chart; }; chart.format = function (_) { if (!arguments.length) return format; format = _; return chart; }; chart.labels = function (_) { if (!arguments.length) return labels; labels = _; return chart; }; chart.margin = function (_) { if (!arguments.length) return margin; margin = _; return chart; }; chart.width = function (_) { if (!arguments.length) return width; width = _; return chart; }; chart.height = function (_) { if (!arguments.length) return height; height = _; return chart; }; chart.x = function (_) { if (!arguments.length) return xValue; xValue = _; return chart; }; chart.y0 = function (_) { if (!arguments.length) return yValue0; yValue0 = _; return chart; }; chart.y1 = function (_) { if (!arguments.length) return yValue1; yValue1 = _; return chart; }; return chart; } function BarChart(dualYaxis) { var opts = {}; var margin = { top : 20, right : 50, bottom : 40, left : 50, }, height = 170, nTicks = 10, padding = 10, width = 760; var labels = { x: 'Unnamed', y0: 'Unnamed', y1: 'Unnamed' }; var format = { x: null, y0: null, y1: null}; var xValue = function (d) { return d[0]; }, yValue0 = function (d) { return d[1]; }, yValue1 = function (d) { return d[2]; }; var xScale = d3.scaleBand() .paddingInner(0.1) .paddingOuter(0.1); var yScale0 = d3.scaleLinear().nice(); var yScale1 = d3.scaleLinear().nice(); var xAxis = d3.axisBottom(xScale) .tickFormat(function (d) { if (format.x) return GoAccess.Util.fmtValue(d, format.x); return d; }); var yAxis0 = d3.axisLeft(yScale0) .tickFormat(function (d) { return d3.format('.2s')(d); }); var yAxis1 = d3.axisRight(yScale1) .tickFormat(function (d) { if (format.y1) return GoAccess.Util.fmtValue(d, format.y1); return d3.format('.2s')(d); }); var xGrid = d3.axisBottom(xScale); var yGrid = d3.axisLeft(yScale0); function innerW() { return width - margin.left - margin.right; } function innerH() { return height - margin.top - margin.bottom; } function getXTicks(data) { const domain = xScale.domain(); if (data.length < nTicks) return domain; return d3.range(0, nTicks).map(function(i) { const index = Math.floor(i * (domain.length - 1) / (nTicks - 1)); if (index >= 0 && index < domain.length) return domain[index]; return null; }); } function getYTicks(scale) { var domain = scale.domain(); return d3.range(domain[0], domain[1], Math.ceil(domain[1] / nTicks)); } // The x-accessor for the path generator; xScale ∘ xValue. function X(d) { return (xScale(d[0]) + xScale.bandwidth() / 2); } // Convert data to standard representation greedily; // this is needed for nondeterministic accessors. function mapData(data) { var _datum = function (d, i) { var datum = [xValue.call(data, d, i), yValue0.call(data, d, i)]; dualYaxis && datum.push(yValue1.call(data, d, i)); return datum; }; return data.map(function (d, i) { return _datum(d, i); }); } function updateScales(data) { // Update the x-scale. xScale.domain(data.map(function (d) { return d[0]; })) .range([0, innerW()]); // Update the y-scale. yScale0.domain([0, d3.max(data, function (d) { return d[1]; })]) .range([innerH(), 0]); // Update the y-scale. // If all values are [0, 0]. This can cause issues when drawing the // chart because all values passed to the scale will be mapped to the // same value in the range, thus + 0.1 e.g., Not Found visitors. dualYaxis && yScale1.domain([0, d3.max(data, function (d) { return d[2]; }) + 0.1]) .range([innerH(), 0]); } function toggleOpacity(ele, op) { d3.select(ele.parentNode).selectAll('.' + (ele.getAttribute('data-yaxis') == 'y0' ? 'y1' : 'y0')).attr('style', op); } function setLegendLabels(svg) { // Legend Color var rect = svg.selectAll('rect.legend.y0').data([null]); var rectEnter = rect.enter() .append('rect') .attr('class', 'legend y0') .attr('data-yaxis', 'y0') .on('mousemove', function(d, i) { toggleOpacity(this, 'opacity:0.1'); }) .on('mouseleave', function(d, i) { toggleOpacity(this, null); }) .attr('y', (height - 15)); rectEnter.merge(rect) .attr('x', (width / 2) - 100); // Legend Labels var text = svg.selectAll('text.legend.y0').data([null]); var textEnter = text.enter() .append('text') .attr('class', 'legend y0') .attr('data-yaxis', 'y0') .on('mousemove', function(d, i) { toggleOpacity(this, 'opacity:0.1'); }) .on('mouseleave', function(d, i) { toggleOpacity(this, null); }) .attr('y', (height - 6)); textEnter.merge(text) .attr('x', (width / 2) - 85) .text(labels.y0); if (!dualYaxis) return; // Legend Labels rect = svg.selectAll('rect.legend.y1').data([null]); var rectEnter = rect.enter() .append('rect') .attr('class', 'legend y1') .attr('data-yaxis', 'y1') .on('mousemove', function(d, i) { toggleOpacity(this, 'opacity:0.1'); }) .on('mouseleave', function(d, i) { toggleOpacity(this, null); }) .attr('y', (height - 15)); rectEnter.merge(rect) .attr('x', (width / 2)); // Legend Labels text = svg.selectAll('text.legend.y1').data([null]); var textEnter = text.enter() .append('text') .attr('class', 'legend y1') .attr('data-yaxis', 'y1') .on('mousemove', function(d, i) { toggleOpacity(this, 'opacity:0.1'); }) .on('mouseleave', function(d, i) { toggleOpacity(this, null); }) .attr('y', (height - 6)); textEnter.merge(text) .attr('x', (width / 2) + 15) .text(labels.y1); } function setAxisLabels(svg) { // Labels svg.selectAll('text.axis-label.y0') .data([null]) .enter() .append('text') .attr('class', 'axis-label y0') .attr('y', 10) .attr('x', 53) .text(labels.y0); if (!dualYaxis) return; // Labels var tEnter = svg.selectAll('text.axis-label.y1') .data([null]) .enter() .append('text') .attr('class', 'axis-label y1') .attr('y', 10) .text(labels.y1); dualYaxis && tEnter.attr('x', width - 25); } function createSkeleton(svg) { const g = svg.append('g'); // Grid g.append('g') .attr('class', 'x grid'); g.append('g') .attr('class', 'y grid'); // Axis g.append('g') .attr('class', 'x axis'); g.append('g') .attr('class', 'y0 axis'); dualYaxis && g.append('g') .attr('class', 'y1 axis'); // Bars g.append('g') .attr('class', 'bars y0'); dualYaxis && g.append('g') .attr('class', 'bars y1'); // Rects g.append('g') .attr('class', 'rects'); setAxisLabels(svg); setLegendLabels(svg); // Mouseover line g.append('line') .attr('y2', innerH()) .attr('y1', 0) .attr('class', 'indicator'); } // Update the area path and lines. function addBars(g, data) { var bars = g.select('g.bars.y0').selectAll('rect.bar').data(data); // enter var enter = bars.enter() .append('svg:rect') .attr('class', 'bar') .attr('height', 0) .attr('width', function (d, i) { return xScale.bandwidth() / 2; }) .attr('x', function (d, i) { return xScale(d[0]); }) .attr('y', function (d, i) { return innerH(); }); // update bars.merge(enter) .attr('width', xScale.bandwidth() / 2) .attr('x', function (d) { return xScale(d[0]); }) .transition() .delay(function (d, i) { return i / data.length * 1000; }) .duration(500) .attr('height', function (d, i) { return innerH() - yScale0(d[1]); }) .attr('y', function (d, i) { return yScale0(d[1]); }); // remove elements bars.exit().remove(); if (!dualYaxis) return; bars = g.select('g.bars.y1').selectAll('rect.bar').data(data); // enter enter = bars.enter() .append('svg:rect') .attr('class', 'bar') .attr('height', 0) .attr('width', function (d, i) { return xScale.bandwidth() / 2; }) .attr('x', function (d) { return (xScale(d[0]) + xScale.bandwidth() / 2); }) .attr('y', function (d, i) { return innerH(); }); // update bars.merge(enter) .attr('width', xScale.bandwidth() / 2) .attr('x', function (d) { return (xScale(d[0]) + xScale.bandwidth() / 2); }) .transition() .delay(function (d, i) { return i / data.length * 1000; }) .duration(500) .attr('height', function (d, i) { return innerH() - yScale1(d[2]); }) .attr('y', function (d, i) { return yScale1(d[2]); }); // remove elements bars.exit().remove(); } function addAxis(g, data) { var xTicks = getXTicks(data); var tickDistance = xTicks.length > 1 ? (xScale(xTicks[1]) - xScale(xTicks[0])) : innerW(); var labelW = tickDistance - padding; // Update the x-axis. g.select('.x.axis') .attr('transform', 'translate(0,' + yScale0.range()[0] + ')') .call(xAxis.tickValues(xTicks)) .selectAll(".tick text") .call(truncate, labelW > 0 ? labelW : innerW()); // Update the y0-axis. g.select('.y0.axis') .call(yAxis0.tickValues(getYTicks(yScale0))); if (!dualYaxis) return; // Update the y1-axis. g.select('.y1.axis') .attr('transform', 'translate(' + innerW() + ', 0)') .call(yAxis1.tickValues(getYTicks(yScale1))); } // Update the X-Y grid. function addGrid(g, data) { g.select('.x.grid') .attr('transform', 'translate(0,' + yScale0.range()[0] + ')') .call(xGrid .tickValues(getXTicks(data)) .tickSize(-innerH(), 0, 0) .tickSizeOuter(0) .tickFormat('') ); g.select('.y.grid') .call(yGrid .tickValues(getYTicks(yScale0)) .tickSize(-innerW(), 0) .tickSizeOuter(0) .tickFormat('') ); } function formatTooltip(data) { var d = data.slice(0); d[0] = (format.x) ? GoAccess.Util.fmtValue(d[0], format.x) : d[0]; d[1] = (format.y0) ? GoAccess.Util.fmtValue(d[1], format.y0) : d3.format(',')(d[1]); dualYaxis && (d[2] = (format.y1) ? GoAccess.Util.fmtValue(d[2], format.y1) : d3.format(',')(d[2])); var template = d3.select('#tpl-chart-tooltip').html(); return Hogan.compile(template).render({ 'data': d }); } function mouseover(event, selection, data) { var tooltip = selection.select('.chart-tooltip-wrap'); tooltip.html(formatTooltip(data)) .style('left', X(data) + 'px') .style('top', (d3.pointer(event)[1] + 10) + 'px') .style('display', 'block'); selection.select('line.indicator') .style('display', 'block') .attr('transform', 'translate(' + X(data) + ',' + 0 + ')'); } function mouseout(selection, g) { var tooltip = selection.select('.chart-tooltip-wrap'); tooltip.style('display', 'none'); g.select('line.indicator').style('display', 'none'); } function addRects(selection, g, data) { var w = (innerW() / data.length); var rects = g.select('g.rects').selectAll('rect').data(data); var rectsEnter = rects.enter() .append('svg:rect') .attr('height', innerH()) .attr('class', 'point'); rectsEnter.merge(rects) .attr('width', w) .attr('x', function(d, i) { return (w * i); }) .attr('y', 0) .on('mousemove', function(event) { mouseover(event, selection, d3.select(this).datum()); }) .on('mouseleave', function(event) { mouseout(selection, g); }); // remove elements rects.exit().remove(); } function chart(selection) { selection.each(function (data) { // normalize data data = mapData(data); // updates X-Y scales updateScales(data); // select the SVG element, if it exists let svg = d3.select(this).select('svg'); // if the SVG element doesn't exist, create it if (svg.empty()) { svg = d3.select(this).append('svg').attr('width', width).attr('height', height); createSkeleton(svg); } // Update the inner dimensions. var g = svg.select('g') .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')'); // Add grid addGrid(g, data); // Add axis addAxis(g, data); // Add chart lines and areas addBars(g, data); // Add rects addRects(selection, g, data); }); } chart.opts = function (_) { if (!arguments.length) return opts; opts = _; return chart; }; chart.format = function (_) { if (!arguments.length) return format; format = _; return chart; }; chart.labels = function (_) { if (!arguments.length) return labels; labels = _; return chart; }; chart.width = function (_) { if (!arguments.length) return width; width = _; return chart; }; chart.height = function (_) { if (!arguments.length) return height; height = _; return chart; }; chart.x = function (_) { if (!arguments.length) return xValue; xValue = _; return chart; }; chart.y0 = function (_) { if (!arguments.length) return yValue0; yValue0 = _; return chart; }; chart.y1 = function (_) { if (!arguments.length) return yValue1; yValue1 = _; return chart; }; return chart; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/resources/js/d3.v7.min.js������������������������������������������������������������0000644�0001750�0001730�00001042151�14613301754�013411� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* https://d3js.org v7.8.4 Copyright 2010-2023 Mike Bostock */ !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return null==t||null==n?NaN:tn?1:t>=n?0:NaN}function e(t,n){return null==t||null==n?NaN:nt?1:n>=t?0:NaN}function r(t){let r,o,a;function u(t,n,e=0,i=t.length){if(e>>1;o(t[r],n)<0?e=r+1:i=r}while(en(t(e),r),a=(n,e)=>t(n)-e):(r=t===n||t===e?t:i,o=t,a=t),{left:u,center:function(t,n,e=0,r=t.length){const i=u(t,n,e,r-1);return i>e&&a(t[i-1],n)>-a(t[i],n)?i-1:i},right:function(t,n,e=0,i=t.length){if(e>>1;o(t[r],n)<=0?e=r+1:i=r}while(e=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}const u=r(n),c=u.right,f=u.left,s=r(o).center;var l=c;const h=p(v),d=p((function(t){const n=v(t);return(t,e,r,i,o)=>{n(t,e,(r<<=2)+0,(i<<=2)+0,o<<=2),n(t,e,r+1,i+1,o),n(t,e,r+2,i+2,o),n(t,e,r+3,i+3,o)}}));function p(t){return function(n,e,r=e){if(!((e=+e)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=n;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(void 0!==a?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!e&&!r)return n;const u=e&&t(e),c=r&&t(r),f=i.slice();return u&&c?(g(u,f,i,o,a),g(u,i,f,o,a),g(u,f,i,o,a),y(c,i,f,o,a),y(c,f,i,o,a),y(c,i,f,o,a)):u?(g(u,i,f,o,a),g(u,f,i,o,a),g(u,i,f,o,a)):c&&(y(c,i,f,o,a),y(c,f,i,o,a),y(c,i,f,o,a)),n}}function g(t,n,e,r,i){for(let o=0,a=r*i;o{if(!((o-=a)>=i))return;let u=t*r[i];const c=a*t;for(let t=i,n=i+c;t{if(!((a-=u)>=o))return;let c=n*i[o];const f=u*n,s=f+u;for(let t=o,n=o+f;t=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function b(t){return 0|t.length}function m(t){return!(t>0)}function x(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function w(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function M(t,n){const e=w(t,n);return e?Math.sqrt(e):e}function T(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r=o&&(e=r=o):(e>o&&(e=o),r0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(S(this,t))}has(t){return super.has(S(this,t))}set(t,n){return super.set(E(this,t),n)}delete(t){return super.delete(N(this,t))}}class InternSet extends Set{constructor(t,n=k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(S(this,t))}add(t){return super.add(E(this,t))}delete(t){return super.delete(N(this,t))}}function S({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function E({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function N({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function k(t){return null!==t&&"object"==typeof t?t.valueOf():t}function C(t){return t}function P(t,...n){return q(t,C,C,n)}function z(t,...n){return q(t,Array.from,C,n)}function $(t,n){for(let e=1,r=n.length;et.pop().map((([n,e])=>[...t,n,e]))));return t}function D(t,n,...e){return q(t,C,n,e)}function R(t,n,...e){return q(t,Array.from,n,e)}function F(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function q(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new InternMap,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function U(t,n){return Array.from(n,(n=>t[n]))}function I(t,...n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=B(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>B(e[t],e[n])))),U(t,r)}return t.sort(O(e))}function O(t=n){if(t===n)return B;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function B(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(tn?1:0)}var Y=Array.prototype.slice;function L(t){return()=>t}const j=Math.sqrt(50),H=Math.sqrt(10),X=Math.sqrt(2);function G(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=j?10:o>=H?5:o>=X?2:1;let u,c,f;return i<0?(f=Math.pow(10,-i)/a,u=Math.round(t*f),c=Math.round(n*f),u/fn&&--c,f=-f):(f=Math.pow(10,i)*a,u=Math.round(t/f),c=Math.round(n/f),u*fn&&--c),c0))return[];if((t=+t)===(n=+n))return[t];const r=n=i))return[];const u=o-i+1,c=new Array(u);if(r)if(a<0)for(let t=0;t0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function Q(t){return Math.max(1,Math.ceil(Math.log(_(t))/Math.LN2)+1)}function J(){var t=C,n=T,e=Q;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,u=r.length,c=new Array(u);for(i=0;i=h)if(t>=h&&n===T){const t=W(s,h,e);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else d.pop()}for(var p=d.length,g=0,y=p;d[g]<=s;)++g;for(;d[y-1]>h;)--y;(g||y0?d[i-1]:s,v.x1=i0)for(i=0;i=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function nt(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e=o)&&(e=o,r=i);return r}function et(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}function rt(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e>o||void 0===e&&o>=o)&&(e=o,r=i);return r}function it(t,n,e=0,r=1/0,i){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),r=Math.floor(Math.min(t.length-1,r)),!(e<=n&&n<=r))return t;for(i=void 0===i?B:O(i);r>e;){if(r-e>600){const o=r-e+1,a=n-e+1,u=Math.log(o),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(o-c)/o)*(a-o/2<0?-1:1);it(t,n,Math.max(e,Math.floor(n-a*c/o+f)),Math.min(r,Math.floor(n+(o-a)*c/o+f)),i)}const o=t[n];let a=e,u=r;for(ot(t,e,n),i(t[r],o)>0&&ot(t,e,r);a0;)--u}0===i(t[e],o)?ot(t,e,u):(++u,ot(t,u,r)),u<=n&&(e=u+1),n<=u&&(r=u-1)}return t}function ot(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function at(t,e=n){let r,i=!1;if(1===e.length){let o;for(const a of t){const t=e(a);(i?n(t,o)>0:0===n(t,t))&&(r=a,o=t,i=!0)}}else for(const n of t)(i?e(n,r)>0:0===e(n,n))&&(r=n,i=!0);return r}function ut(t,n,e){if((r=(t=Float64Array.from(a(t,e))).length)&&!isNaN(n=+n)){if(n<=0||r<2)return et(t);if(n>=1)return tt(t);var r,i=(r-1)*n,o=Math.floor(i),u=tt(it(t,o).subarray(0,o+1));return u+(et(t.subarray(o+1))-u)*(i-o)}}function ct(t,n,e=o){if((r=t.length)&&!isNaN(n=+n)){if(n<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,a=Math.floor(i),u=+e(t[a],a,t);return u+(+e(t[a+1],a+1,t)-u)*(i-a)}}function ft(t,n,e){if((r=(t=Float64Array.from(a(t,e))).length)&&!isNaN(n=+n)){if(n<=0||r<2)return rt(t);if(n>=1)return nt(t);var r,i=Math.floor((r-1)*n),o=it(Uint32Array.from(t,((t,n)=>n)),i,0,r-1,((n,e)=>B(t[n],t[e])));return at(o.subarray(0,i+1),(n=>t[n]))}}function st(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}function lt(t,n){return[t,n]}function ht(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r+t(n)}function Ct(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function Pt(){return!this.__axis}function zt(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,f=t===wt||t===At?-1:1,s=t===At||t===Mt?"x":"y",l=t===wt||t===Tt?Et:Nt;function h(h){var d=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):xt:i,g=Math.max(o,0)+u,y=n.range(),v=+y[0]+c,_=+y[y.length-1]+c,b=(n.bandwidth?Ct:kt)(n.copy(),c),m=h.selection?h.selection():h,x=m.selectAll(".domain").data([null]),w=m.selectAll(".tick").data(d,n).order(),M=w.exit(),T=w.enter().append("g").attr("class","tick"),A=w.select("line"),S=w.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(T),A=A.merge(T.append("line").attr("stroke","currentColor").attr(s+"2",f*o)),S=S.merge(T.append("text").attr("fill","currentColor").attr(s,f*g).attr("dy",t===wt?"0em":t===Tt?"0.71em":"0.32em")),h!==m&&(x=x.transition(h),w=w.transition(h),A=A.transition(h),S=S.transition(h),M=M.transition(h).attr("opacity",St).attr("transform",(function(t){return isFinite(t=b(t))?l(t+c):this.getAttribute("transform")})),T.attr("opacity",St).attr("transform",(function(t){var n=this.parentNode.__axis;return l((n&&isFinite(n=n(t))?n:b(t))+c)}))),M.remove(),x.attr("d",t===At||t===Mt?a?"M"+f*a+","+v+"H"+c+"V"+_+"H"+f*a:"M"+c+","+v+"V"+_:a?"M"+v+","+f*a+"V"+c+"H"+_+"V"+f*a:"M"+v+","+c+"H"+_),w.attr("opacity",1).attr("transform",(function(t){return l(b(t)+c)})),A.attr(s+"2",f*o),S.attr(s,f*g).text(p),m.filter(Pt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Mt?"start":t===At?"end":"middle"),m.each((function(){this.__axis=b}))}return h.scale=function(t){return arguments.length?(n=t,h):n},h.ticks=function(){return e=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),h):e.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(u=+t,h):u},h.offset=function(t){return arguments.length?(c=+t,h):c},h}var $t={value:()=>{}};function Dt(){for(var t,n=0,e=arguments.length,r={};n=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),a=-1,u=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++a0)for(var e,r,i=new Array(e),o=0;o=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),It.hasOwnProperty(n)?{space:It[n],local:t}:t}function Bt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Ut&&n.documentElement.namespaceURI===Ut?n.createElement(t):n.createElementNS(e,t)}}function Yt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Lt(t){var n=Ot(t);return(n.local?Yt:Bt)(n)}function jt(){}function Ht(t){return null==t?jt:function(){return this.querySelector(t)}}function Xt(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Gt(){return[]}function Vt(t){return null==t?Gt:function(){return this.querySelectorAll(t)}}function Wt(t){return function(){return this.matches(t)}}function Zt(t){return function(n){return n.matches(t)}}var Kt=Array.prototype.find;function Qt(){return this.firstElementChild}var Jt=Array.prototype.filter;function tn(){return Array.from(this.children)}function nn(t){return new Array(t.length)}function en(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function rn(t,n,e,r,i,o){for(var a,u=0,c=n.length,f=o.length;un?1:t>=n?0:NaN}function fn(t){return function(){this.removeAttribute(t)}}function sn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ln(t,n){return function(){this.setAttribute(t,n)}}function hn(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function dn(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function pn(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function gn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function yn(t){return function(){this.style.removeProperty(t)}}function vn(t,n,e){return function(){this.style.setProperty(t,n,e)}}function _n(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function bn(t,n){return t.style.getPropertyValue(n)||gn(t).getComputedStyle(t,null).getPropertyValue(n)}function mn(t){return function(){delete this[t]}}function xn(t,n){return function(){this[t]=n}}function wn(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Mn(t){return t.trim().split(/^|\s+/)}function Tn(t){return t.classList||new An(t)}function An(t){this._node=t,this._names=Mn(t.getAttribute("class")||"")}function Sn(t,n){for(var e=Tn(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Vn=[null];function Wn(t,n){this._groups=t,this._parents=n}function Zn(){return new Wn([[document.documentElement]],Vn)}function Kn(t){return"string"==typeof t?new Wn([[document.querySelector(t)]],[document.documentElement]):new Wn([[t]],Vn)}Wn.prototype=Zn.prototype={constructor:Wn,select:function(t){"function"!=typeof t&&(t=Ht(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i=m&&(m=b+1);!(_=y[m])&&++m=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=cn);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?yn:"function"==typeof n?_n:vn)(t,n,null==e?"":e)):bn(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?mn:"function"==typeof n?wn:xn)(t,n)):this.node()[t]},classed:function(t,n){var e=Mn(t+"");if(arguments.length<2){for(var r=Tn(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?jn:Ln,r=0;r()=>t;function se(t,{sourceEvent:n,subject:e,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:f,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:s}})}function le(t){return!t.ctrlKey&&!t.button}function he(){return this.parentNode}function de(t,n){return null==n?{x:t.x,y:t.y}:n}function pe(){return navigator.maxTouchPoints||"ontouchstart"in this}function ge(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function ye(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function ve(){}se.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var _e=.7,be=1/_e,me="\\s*([+-]?\\d+)\\s*",xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Me=/^#([0-9a-f]{3,8})$/,Te=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),Ae=new RegExp(`^rgb\\(${we},${we},${we}\\)$`),Se=new RegExp(`^rgba\\(${me},${me},${me},${xe}\\)$`),Ee=new RegExp(`^rgba\\(${we},${we},${we},${xe}\\)$`),Ne=new RegExp(`^hsl\\(${xe},${we},${we}\\)$`),ke=new RegExp(`^hsla\\(${xe},${we},${we},${xe}\\)$`),Ce={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Pe(){return this.rgb().formatHex()}function ze(){return this.rgb().formatRgb()}function $e(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Me.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?De(n):3===e?new Ue(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Re(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Re(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Te.exec(t))?new Ue(n[1],n[2],n[3],1):(n=Ae.exec(t))?new Ue(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Se.exec(t))?Re(n[1],n[2],n[3],n[4]):(n=Ee.exec(t))?Re(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Ne.exec(t))?je(n[1],n[2]/100,n[3]/100,1):(n=ke.exec(t))?je(n[1],n[2]/100,n[3]/100,n[4]):Ce.hasOwnProperty(t)?De(Ce[t]):"transparent"===t?new Ue(NaN,NaN,NaN,0):null}function De(t){return new Ue(t>>16&255,t>>8&255,255&t,1)}function Re(t,n,e,r){return r<=0&&(t=n=e=NaN),new Ue(t,n,e,r)}function Fe(t){return t instanceof ve||(t=$e(t)),t?new Ue((t=t.rgb()).r,t.g,t.b,t.opacity):new Ue}function qe(t,n,e,r){return 1===arguments.length?Fe(t):new Ue(t,n,e,null==r?1:r)}function Ue(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Ie(){return`#${Le(this.r)}${Le(this.g)}${Le(this.b)}`}function Oe(){const t=Be(this.opacity);return`${1===t?"rgb(":"rgba("}${Ye(this.r)}, ${Ye(this.g)}, ${Ye(this.b)}${1===t?")":`, ${t})`}`}function Be(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ye(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Le(t){return((t=Ye(t))<16?"0":"")+t.toString(16)}function je(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Ge(t,n,e,r)}function He(t){if(t instanceof Ge)return new Ge(t.h,t.s,t.l,t.opacity);if(t instanceof ve||(t=$e(t)),!t)return new Ge;if(t instanceof Ge)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e0&&c<1?0:a,new Ge(a,u,c,t.opacity)}function Xe(t,n,e,r){return 1===arguments.length?He(t):new Ge(t,n,e,null==r?1:r)}function Ge(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Ve(t){return(t=(t||0)%360)<0?t+360:t}function We(t){return Math.max(0,Math.min(1,t||0))}function Ze(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}ge(ve,$e,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Pe,formatHex:Pe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return He(this).formatHsl()},formatRgb:ze,toString:ze}),ge(Ue,qe,ye(ve,{brighter(t){return t=null==t?be:Math.pow(be,t),new Ue(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?_e:Math.pow(_e,t),new Ue(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ue(Ye(this.r),Ye(this.g),Ye(this.b),Be(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ie,formatHex:Ie,formatHex8:function(){return`#${Le(this.r)}${Le(this.g)}${Le(this.b)}${Le(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Oe,toString:Oe})),ge(Ge,Xe,ye(ve,{brighter(t){return t=null==t?be:Math.pow(be,t),new Ge(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?_e:Math.pow(_e,t),new Ge(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Ue(Ze(t>=240?t-240:t+120,i,r),Ze(t,i,r),Ze(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ge(Ve(this.h),We(this.s),We(this.l),Be(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Be(this.opacity);return`${1===t?"hsl(":"hsla("}${Ve(this.h)}, ${100*We(this.s)}%, ${100*We(this.l)}%${1===t?")":`, ${t})`}`}}));const Ke=Math.PI/180,Qe=180/Math.PI,Je=.96422,tr=1,nr=.82521,er=4/29,rr=6/29,ir=3*rr*rr,or=rr*rr*rr;function ar(t){if(t instanceof cr)return new cr(t.l,t.a,t.b,t.opacity);if(t instanceof gr)return yr(t);t instanceof Ue||(t=Fe(t));var n,e,r=hr(t.r),i=hr(t.g),o=hr(t.b),a=fr((.2225045*r+.7168786*i+.0606169*o)/tr);return r===i&&i===o?n=e=a:(n=fr((.4360747*r+.3850649*i+.1430804*o)/Je),e=fr((.0139322*r+.0971045*i+.7141733*o)/nr)),new cr(116*a-16,500*(n-a),200*(a-e),t.opacity)}function ur(t,n,e,r){return 1===arguments.length?ar(t):new cr(t,n,e,null==r?1:r)}function cr(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function fr(t){return t>or?Math.pow(t,1/3):t/ir+er}function sr(t){return t>rr?t*t*t:ir*(t-er)}function lr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function hr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function dr(t){if(t instanceof gr)return new gr(t.h,t.c,t.l,t.opacity);if(t instanceof cr||(t=ar(t)),0===t.a&&0===t.b)return new gr(NaN,0=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r()=>t;function Pr(t,n){return function(e){return t+e*n}}function zr(t,n){var e=n-t;return e?Pr(t,e>180||e<-180?e-360*Math.round(e/360):e):Cr(isNaN(t)?n:t)}function $r(t){return 1==(t=+t)?Dr:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Cr(isNaN(n)?e:n)}}function Dr(t,n){var e=n-t;return e?Pr(t,e):Cr(isNaN(t)?n:t)}var Rr=function t(n){var e=$r(n);function r(t,n){var r=e((t=qe(t)).r,(n=qe(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=Dr(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function Fr(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;eo&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:Lr(e,r)})),o=Xr.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Lr(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Lr(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Lr(t,e)},{i:u-2,x:Lr(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(void 0,t),n=n._next;--vi}function Pi(){wi=(xi=Ti.now())+Mi,vi=_i=0;try{Ci()}finally{vi=0,function(){var t,n,e=gi,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:gi=n);yi=t,$i(r)}(),wi=0}}function zi(){var t=Ti.now(),n=t-xi;n>mi&&(Mi-=n,xi=t)}function $i(t){vi||(_i&&(_i=clearTimeout(_i)),t-wi>24?(t<1/0&&(_i=setTimeout(Pi,t-Ti.now()-Mi)),bi&&(bi=clearInterval(bi))):(bi||(xi=Ti.now(),bi=setInterval(zi,mi)),vi=1,Ai(Pi)))}function Di(t,n,e){var r=new Ni;return n=null==n?0:+n,r.restart((e=>{r.stop(),t(e+n)}),n,e),r}Ni.prototype=ki.prototype={constructor:Ni,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Si():+e)+(null==n?0:+n),this._next||yi===this||(yi?yi._next=this:gi=this,yi=this),this._call=t,this._time=e,$i()},stop:function(){this._call&&(this._call=null,this._time=1/0,$i())}};var Ri=Dt("start","end","cancel","interrupt"),Fi=[],qi=0,Ui=1,Ii=2,Oi=3,Bi=4,Yi=5,Li=6;function ji(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(t){e.state=Ui,e.timer.restart(a,e.delay,e.time),e.delay<=t&&a(t-e.delay)}function a(o){var f,s,l,h;if(e.state!==Ui)return c();for(f in i)if((h=i[f]).name===e.name){if(h.state===Oi)return Di(a);h.state===Bi?(h.state=Li,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fqi)throw new Error("too late; already scheduled");return e}function Xi(t,n){var e=Gi(t,n);if(e.state>Oi)throw new Error("too late; already running");return e}function Gi(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Vi(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>Ii&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Hi:Xi;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var e=Ot(t),r="transform"===e?ei:Qi;return this.attrTween(t,"function"==typeof n?(e.local?io:ro)(e,r,Ki(this,"attr."+t,n)):null==n?(e.local?to:Ji)(e):(e.local?eo:no)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=Ot(t);return this.tween(e,(r.local?oo:ao)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?ni:Qi;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=bn(this,t),a=(this.style.removeProperty(t),bn(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,ho(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=bn(this,t),u=e(this),c=u+"";return null==u&&(this.style.removeProperty(t),c=u=bn(this,t)),a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u))}}(t,r,Ki(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var c=Xi(this,t),f=c.on,s=null==c.value[a]?o||(o=ho(n)):void 0;f===e&&i===s||(r=(e=f).copy()).on(u,i=s),c.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=bn(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Ki(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Gi(this.node(),e).tween,o=0,a=i.length;o()=>t;function Jo(t,{sourceEvent:n,target:e,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function ta(t){t.preventDefault(),t.stopImmediatePropagation()}var na={name:"drag"},ea={name:"space"},ra={name:"handle"},ia={name:"center"};const{abs:oa,max:aa,min:ua}=Math;function ca(t){return[+t[0],+t[1]]}function fa(t){return[ca(t[0]),ca(t[1])]}var sa={name:"x",handles:["w","e"].map(_a),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},la={name:"y",handles:["n","s"].map(_a),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},ha={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(_a),input:function(t){return null==t?null:fa(t)},output:function(t){return t}},da={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},pa={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ga={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ya={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},va={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function _a(t){return{type:t}}function ba(t){return!t.ctrlKey&&!t.button}function ma(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function xa(){return navigator.maxTouchPoints||"ontouchstart"in this}function wa(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ma(t){var n,e=ma,r=ba,i=xa,o=!0,a=Dt("start","brush","end"),u=6;function c(n){var e=n.property("__brush",g).selectAll(".overlay").data([_a("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",da.overlay).merge(e).each((function(){var t=wa(this).extent;Kn(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([_a("selection")]).enter().append("rect").attr("class","selection").attr("cursor",da.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return da[t.type]})),n.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var t=Kn(this),n=wa(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(t,n,e){var r=t.__brush.emitter;return!r||e&&r.clean?new l(t,n,e):r}function l(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function h(e){if((!n||e.touches)&&r.apply(this,arguments)){var i,a,u,c,l,h,d,p,g,y,v,_=this,b=e.target.__data__.type,m="selection"===(o&&e.metaKey?b="overlay":b)?na:o&&e.altKey?ia:ra,x=t===la?null:ya[b],w=t===sa?null:va[b],M=wa(_),T=M.extent,A=M.selection,S=T[0][0],E=T[0][1],N=T[1][0],k=T[1][1],C=0,P=0,z=x&&w&&o&&e.shiftKey,$=Array.from(e.touches||[e],(t=>{const n=t.identifier;return(t=ee(t,_)).point0=t.slice(),t.identifier=n,t}));Vi(_);var D=s(_,arguments,!0).beforestart();if("overlay"===b){A&&(g=!0);const n=[$[0],$[1]||$[0]];M.selection=A=[[i=t===la?S:ua(n[0][0],n[1][0]),u=t===sa?E:ua(n[0][1],n[1][1])],[l=t===la?N:aa(n[0][0],n[1][0]),d=t===sa?k:aa(n[0][1],n[1][1])]],$.length>1&&I(e)}else i=A[0][0],u=A[0][1],l=A[1][0],d=A[1][1];a=i,c=u,h=l,p=d;var R=Kn(_).attr("pointer-events","none"),F=R.selectAll(".overlay").attr("cursor",da[b]);if(e.touches)D.moved=U,D.ended=O;else{var q=Kn(e.view).on("mousemove.brush",U,!0).on("mouseup.brush",O,!0);o&&q.on("keydown.brush",(function(t){switch(t.keyCode){case 16:z=x&&w;break;case 18:m===ra&&(x&&(l=h-C*x,i=a+C*x),w&&(d=p-P*w,u=c+P*w),m=ia,I(t));break;case 32:m!==ra&&m!==ia||(x<0?l=h-C:x>0&&(i=a-C),w<0?d=p-P:w>0&&(u=c-P),m=ea,F.attr("cursor",da.selection),I(t));break;default:return}ta(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:z&&(y=v=z=!1,I(t));break;case 18:m===ia&&(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=ra,I(t));break;case 32:m===ea&&(t.altKey?(x&&(l=h-C*x,i=a+C*x),w&&(d=p-P*w,u=c+P*w),m=ia):(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=ra),F.attr("cursor",da[b]),I(t));break;default:return}ta(t)}),!0),ue(e.view)}f.call(_),D.start(e,m.name)}function U(t){for(const n of t.changedTouches||[t])for(const t of $)t.identifier===n.identifier&&(t.cur=ee(n,_));if(z&&!y&&!v&&1===$.length){const t=$[0];oa(t.cur[0]-t[0])>oa(t.cur[1]-t[1])?v=!0:y=!0}for(const t of $)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,ta(t),I(t)}function I(t){const n=$[0],e=n.point0;var r;switch(C=n[0]-e[0],P=n[1]-e[1],m){case ea:case na:x&&(C=aa(S-i,ua(N-l,C)),a=i+C,h=l+C),w&&(P=aa(E-u,ua(k-d,P)),c=u+P,p=d+P);break;case ra:$[1]?(x&&(a=aa(S,ua(N,$[0][0])),h=aa(S,ua(N,$[1][0])),x=1),w&&(c=aa(E,ua(k,$[0][1])),p=aa(E,ua(k,$[1][1])),w=1)):(x<0?(C=aa(S-i,ua(N-i,C)),a=i+C,h=l):x>0&&(C=aa(S-l,ua(N-l,C)),a=i,h=l+C),w<0?(P=aa(E-u,ua(k-u,P)),c=u+P,p=d):w>0&&(P=aa(E-d,ua(k-d,P)),c=u,p=d+P));break;case ia:x&&(a=aa(S,ua(N,i-C*x)),h=aa(S,ua(N,l+C*x))),w&&(c=aa(E,ua(k,u-P*w)),p=aa(E,ua(k,d+P*w)))}ht+e))}function $a(t,n){var e=0,r=null,i=null,o=null;function a(a){var u,c=a.length,f=new Array(c),s=za(0,c),l=new Array(c*c),h=new Array(c),d=0;a=Float64Array.from({length:c*c},n?(t,n)=>a[n%c][n/c|0]:(t,n)=>a[n/c|0][n%c]);for(let n=0;nr(f[t],f[n])));for(const e of s){const r=n;if(t){const t=za(1+~c,c).filter((t=>t<0?a[~t*c+e]:a[e*c+t]));i&&t.sort(((t,n)=>i(t<0?-a[~t*c+e]:a[e*c+t],n<0?-a[~n*c+e]:a[e*c+n])));for(const r of t)if(r<0){(l[~r*c+e]||(l[~r*c+e]={source:null,target:null})).target={index:e,startAngle:n,endAngle:n+=a[~r*c+e]*d,value:a[~r*c+e]}}else{(l[e*c+r]||(l[e*c+r]={source:null,target:null})).source={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]}}h[e]={index:e,startAngle:r,endAngle:n,value:f[e]}}else{const t=za(0,c).filter((t=>a[e*c+t]||a[t*c+e]));i&&t.sort(((t,n)=>i(a[e*c+t],a[e*c+n])));for(const r of t){let t;if(e=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Ua;const e=10**n;return function(t){this._+=t[0];for(let n=1,r=t.length;nFa)if(Math.abs(s*u-c*f)>Fa&&i){let h=e-o,d=r-a,p=u*u+c*c,g=h*h+d*d,y=Math.sqrt(p),v=Math.sqrt(l),_=i*Math.tan((Da-Math.acos((p+l-g)/(2*y*v)))/2),b=_/v,m=_/y;Math.abs(b-1)>Fa&&this._append`L${t+b*f},${n+b*s}`,this._append`A${i},${i},0,0,${+(s*h>f*d)},${this._x1=t+m*u},${this._y1=n+m*c}`}else this._append`L${this._x1=t},${this._y1=n}`;else;}arc(t,n,e,r,i,o){if(t=+t,n=+n,o=!!o,(e=+e)<0)throw new Error(`negative radius: ${e}`);let a=e*Math.cos(r),u=e*Math.sin(r),c=t+a,f=n+u,s=1^o,l=o?r-i:i-r;null===this._x1?this._append`M${c},${f}`:(Math.abs(this._x1-c)>Fa||Math.abs(this._y1-f)>Fa)&&this._append`L${c},${f}`,e&&(l<0&&(l=l%Ra+Ra),l>qa?this._append`A${e},${e},0,1,${s},${t-a},${n-u}A${e},${e},0,1,${s},${this._x1=c},${this._y1=f}`:l>Fa&&this._append`A${e},${e},0,${+(l>=Da)},${s},${this._x1=t+e*Math.cos(i)},${this._y1=n+e*Math.sin(i)}`)}rect(t,n,e,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${e=+e}v${+r}h${-e}Z`}toString(){return this._}};function Oa(){return new Ia}Oa.prototype=Ia.prototype;var Ba=Array.prototype.slice;function Ya(t){return function(){return t}}function La(t){return t.source}function ja(t){return t.target}function Ha(t){return t.radius}function Xa(t){return t.startAngle}function Ga(t){return t.endAngle}function Va(){return 0}function Wa(){return 10}function Za(t){var n=La,e=ja,r=Ha,i=Ha,o=Xa,a=Ga,u=Va,c=null;function f(){var f,s=n.apply(this,arguments),l=e.apply(this,arguments),h=u.apply(this,arguments)/2,d=Ba.call(arguments),p=+r.apply(this,(d[0]=s,d)),g=o.apply(this,d)-Na,y=a.apply(this,d)-Na,v=+i.apply(this,(d[0]=l,d)),_=o.apply(this,d)-Na,b=a.apply(this,d)-Na;if(c||(c=f=Oa()),h>Pa&&(Ta(y-g)>2*h+Pa?y>g?(g+=h,y-=h):(g-=h,y+=h):g=y=(g+y)/2,Ta(b-_)>2*h+Pa?b>_?(_+=h,b-=h):(_-=h,b+=h):_=b=(_+b)/2),c.moveTo(p*Aa(g),p*Sa(g)),c.arc(0,0,p,g,y),g!==_||y!==b)if(t){var m=v-+t.apply(this,arguments),x=(_+b)/2;c.quadraticCurveTo(0,0,m*Aa(_),m*Sa(_)),c.lineTo(v*Aa(x),v*Sa(x)),c.lineTo(m*Aa(b),m*Sa(b))}else c.quadraticCurveTo(0,0,v*Aa(_),v*Sa(_)),c.arc(0,0,v,_,b);if(c.quadraticCurveTo(0,0,p*Aa(g),p*Sa(g)),c.closePath(),f)return c=null,f+""||null}return t&&(f.headRadius=function(n){return arguments.length?(t="function"==typeof n?n:Ya(+n),f):t}),f.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:Ya(+t),f):r},f.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:Ya(+t),f):r},f.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:Ya(+t),f):i},f.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ya(+t),f):o},f.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ya(+t),f):a},f.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:Ya(+t),f):u},f.source=function(t){return arguments.length?(n=t,f):n},f.target=function(t){return arguments.length?(e=t,f):e},f.context=function(t){return arguments.length?(c=null==t?null:t,f):c},f}var Ka=Array.prototype.slice;function Qa(t,n){return t-n}var Ja=t=>()=>t;function tu(t,n){for(var e,r=-1,i=n.length;++rr!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function eu(t,n,e){var r,i,o,a;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],a=n[r],i<=o&&o<=a||a<=o&&o<=i)}function ru(){}var iu=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ou(){var t=1,n=1,e=Q,r=u;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(Qa);else{const e=T(t,au);for(n=V(...K(e[0],e[1],n),n);n[n.length-1]>=e[1];)n.pop();for(;n[1]o(t,n)))}function o(e,i){const o=null==i?NaN:+i;if(isNaN(o))throw new Error(`invalid value: ${i}`);var u=[],c=[];return function(e,r,i){var o,u,c,f,s,l,h=new Array,d=new Array;o=u=-1,f=uu(e[0],r),iu[f<<1].forEach(p);for(;++o=r,iu[s<<2].forEach(p);for(;++o0?u.push([t]):c.push(t)})),c.forEach((function(t){for(var n,e=0,r=u.length;e0&&o0&&a=0&&o>=0))throw new Error("invalid size");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?Ja(Ka.call(t)):Ja(t),i):e},i.smooth=function(t){return arguments.length?(r=t?u:ru,i):r===u},i}function au(t){return isFinite(t)?t:NaN}function uu(t,n){return null!=t&&+t>=n}function cu(t){return null==t||isNaN(t=+t)?-1/0:t}function fu(t,n,e,r){const i=r-n,o=e-n,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function su(t){return t[0]}function lu(t){return t[1]}function hu(){return 1}const du=134217729,pu=33306690738754706e-32;function gu(t,n,e,r,i){let o,a,u,c,f=n[0],s=r[0],l=0,h=0;s>f==s>-f?(o=f,f=n[++l]):(o=s,s=r[++h]);let d=0;if(lf==s>-f?(a=f+o,u=o-(a-f),f=n[++l]):(a=s+o,u=o-(a-s),s=r[++h]),o=a,0!==u&&(i[d++]=u);lf==s>-f?(a=o+f,c=a-o,u=o-(a-c)+(f-c),f=n[++l]):(a=o+s,c=a-o,u=o-(a-c)+(s-c),s=r[++h]),o=a,0!==u&&(i[d++]=u);for(;l0!=u>0)return c;const f=Math.abs(a+u);return Math.abs(c)>=33306690738754716e-32*f?c:-function(t,n,e,r,i,o,a){let u,c,f,s,l,h,d,p,g,y,v,_,b,m,x,w,M,T;const A=t-i,S=e-i,E=n-o,N=r-o;m=A*N,h=du*A,d=h-(h-A),p=A-d,h=du*N,g=h-(h-N),y=N-g,x=p*y-(m-d*g-p*g-d*y),w=E*S,h=du*E,d=h-(h-E),p=E-d,h=du*S,g=h-(h-S),y=S-g,M=p*y-(w-d*g-p*g-d*y),v=x-M,l=x-v,bu[0]=x-(v+l)+(l-M),_=m+v,l=_-m,b=m-(_-l)+(v-l),v=b-w,l=b-v,bu[1]=b-(v+l)+(l-w),T=_+v,l=T-_,bu[2]=_-(T-l)+(v-l),bu[3]=T;let k=function(t,n){let e=n[0];for(let r=1;r=C||-k>=C)return k;if(l=t-A,u=t-(A+l)+(l-i),l=e-S,f=e-(S+l)+(l-i),l=n-E,c=n-(E+l)+(l-o),l=r-N,s=r-(N+l)+(l-o),0===u&&0===c&&0===f&&0===s)return k;if(C=_u*a+pu*Math.abs(k),k+=A*s+N*u-(E*f+S*c),k>=C||-k>=C)return k;m=u*N,h=du*u,d=h-(h-u),p=u-d,h=du*N,g=h-(h-N),y=N-g,x=p*y-(m-d*g-p*g-d*y),w=c*S,h=du*c,d=h-(h-c),p=c-d,h=du*S,g=h-(h-S),y=S-g,M=p*y-(w-d*g-p*g-d*y),v=x-M,l=x-v,Mu[0]=x-(v+l)+(l-M),_=m+v,l=_-m,b=m-(_-l)+(v-l),v=b-w,l=b-v,Mu[1]=b-(v+l)+(l-w),T=_+v,l=T-_,Mu[2]=_-(T-l)+(v-l),Mu[3]=T;const P=gu(4,bu,4,Mu,mu);m=A*s,h=du*A,d=h-(h-A),p=A-d,h=du*s,g=h-(h-s),y=s-g,x=p*y-(m-d*g-p*g-d*y),w=E*f,h=du*E,d=h-(h-E),p=E-d,h=du*f,g=h-(h-f),y=f-g,M=p*y-(w-d*g-p*g-d*y),v=x-M,l=x-v,Mu[0]=x-(v+l)+(l-M),_=m+v,l=_-m,b=m-(_-l)+(v-l),v=b-w,l=b-v,Mu[1]=b-(v+l)+(l-w),T=_+v,l=T-_,Mu[2]=_-(T-l)+(v-l),Mu[3]=T;const z=gu(P,mu,4,Mu,xu);m=u*s,h=du*u,d=h-(h-u),p=u-d,h=du*s,g=h-(h-s),y=s-g,x=p*y-(m-d*g-p*g-d*y),w=c*f,h=du*c,d=h-(h-c),p=c-d,h=du*f,g=h-(h-f),y=f-g,M=p*y-(w-d*g-p*g-d*y),v=x-M,l=x-v,Mu[0]=x-(v+l)+(l-M),_=m+v,l=_-m,b=m-(_-l)+(v-l),v=b-w,l=b-v,Mu[1]=b-(v+l)+(l-w),T=_+v,l=T-_,Mu[2]=_-(T-l)+(v-l),Mu[3]=T;const $=gu(z,xu,4,Mu,wu);return wu[$-1]}(t,n,e,r,i,o,f)}const Au=Math.pow(2,-52),Su=new Uint32Array(512);class Eu{static from(t,n=$u,e=Du){const r=t.length,i=new Float64Array(2*r);for(let o=0;o>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const e=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*e),this._halfedges=new Int32Array(3*e),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:e,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let a=1/0,u=1/0,c=-1/0,f=-1/0;for(let n=0;nc&&(c=e),r>f&&(f=r),this._ids[n]=n}const s=(a+c)/2,l=(u+f)/2;let h,d,p,g=1/0;for(let n=0;n0&&(d=n,g=e)}let _=t[2*d],b=t[2*d+1],m=1/0;for(let n=0;nr&&(n[e++]=i,r=this._dists[i])}return this.hull=n.subarray(0,e),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Tu(y,v,_,b,x,w)<0){const t=d,n=_,e=b;d=p,_=x,b=w,p=t,x=n,w=e}const M=function(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,f=o-n,s=a*a+u*u,l=c*c+f*f,h=.5/(a*f-u*c),d=t+(f*s-u*l)*h,p=n+(a*l-c*s)*h;return{x:d,y:p}}(y,v,_,b,x,w);this._cx=M.x,this._cy=M.y;for(let n=0;n0&&Math.abs(f-o)<=Au&&Math.abs(s-a)<=Au)continue;if(o=f,a=s,c===h||c===d||c===p)continue;let l=0;for(let t=0,n=this._hashKey(f,s);t=0;)if(y=g,y===l){y=-1;break}if(-1===y)continue;let v=this._addTriangle(y,c,e[y],-1,-1,r[y]);r[c]=this._legalize(v+2),r[y]=v,T++;let _=e[y];for(;g=e[_],Tu(f,s,t[2*_],t[2*_+1],t[2*g],t[2*g+1])<0;)v=this._addTriangle(_,c,g,r[c],-1,r[_]),r[c]=this._legalize(v+2),e[_]=_,T--,_=g;if(y===l)for(;g=n[y],Tu(f,s,t[2*g],t[2*g+1],t[2*y],t[2*y+1])<0;)v=this._addTriangle(g,c,y,-1,r[y],r[g]),this._legalize(v+2),r[g]=v,e[y]=y,T--,y=g;this._hullStart=n[c]=y,e[y]=n[_]=c,e[c]=_,i[this._hashKey(f,s)]=c,i[this._hashKey(t[2*y],t[2*y+1])]=y}this.hull=new Uint32Array(T);for(let t=0,n=this._hullStart;t0?3-e:1+e)/4}(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:e,coords:r}=this;let i=0,o=0;for(;;){const a=e[t],u=t-t%3;if(o=u+(t+2)%3,-1===a){if(0===i)break;t=Su[--i];continue}const c=a-a%3,f=u+(t+1)%3,s=c+(a+2)%3,l=n[o],h=n[t],d=n[f],p=n[s];if(ku(r[2*l],r[2*l+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){n[t]=p,n[a]=l;const r=e[s];if(-1===r){let n=this._hullStart;do{if(this._hullTri[n]===s){this._hullTri[n]=t;break}n=this._hullPrev[n]}while(n!==this._hullStart)}this._link(t,r),this._link(a,e[o]),this._link(o,s);const u=c+(a+1)%3;i=e&&n[t[a]]>o;)t[a+1]=t[a--];t[a+1]=r}else{let i=e+1,o=r;zu(t,e+r>>1,i),n[t[e]]>n[t[r]]&&zu(t,e,r),n[t[i]]>n[t[r]]&&zu(t,i,r),n[t[e]]>n[t[i]]&&zu(t,e,i);const a=t[i],u=n[a];for(;;){do{i++}while(n[t[i]]u);if(o=o-e?(Pu(t,n,i,r),Pu(t,n,e,o-1)):(Pu(t,n,e,o-1),Pu(t,n,i,r))}}function zu(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function $u(t){return t[0]}function Du(t){return t[1]}const Ru=1e-6;class Fu{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,e){const r=(t=+t)+(e=+e),i=n=+n;if(e<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>Ru||Math.abs(this._y1-i)>Ru)&&(this._+="L"+r+","+i),e&&(this._+=`A${e},${e},0,1,1,${t-e},${n}A${e},${e},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,n,e,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+e}v${+r}h${-e}Z`}value(){return this._||null}}class qu{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class Uu{constructor(t,[n,e,r,i]=[0,0,960,500]){if(!((r=+r)>=(n=+n)&&(i=+i)>=(e=+e)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=n,this.ymax=i,this.ymin=e,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:e},vectors:r}=this;let i,o;const a=this.circumcenters=this._circumcenters.subarray(0,e.length/3*2);for(let r,u,c=0,f=0,s=e.length;c1;)i-=2;for(let t=2;t0){if(n>=this.ymax)return null;(i=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/e)this.xmax?2:0)|(nthis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n2&&function(t){const{triangles:n,coords:e}=t;for(let t=0;t1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:n.length/2},((t,n)=>n)).sort(((t,e)=>n[2*t]-n[2*e]||n[2*t+1]-n[2*e+1]));const t=this.collinear[0],e=this.collinear[this.collinear.length-1],r=[n[2*t],n[2*t+1],n[2*e],n[2*e+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,e=n.length/2;t0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new Uu(this,t)}*neighbors(t){const{inedges:n,hull:e,_hullIndex:r,halfedges:i,triangles:o,collinear:a}=this;if(a){const n=a.indexOf(t);return n>0&&(yield a[n-1]),void(n=0&&i!==e&&i!==r;)e=i;return i}_step(t,n,e){const{inedges:r,hull:i,_hullIndex:o,halfedges:a,triangles:u,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let f=t,s=Ou(n-c[2*t],2)+Ou(e-c[2*t+1],2);const l=r[t];let h=l;do{let r=u[h];const l=Ou(n-c[2*r],2)+Ou(e-c[2*r+1],2);if(l9999?"+"+Qu(n,6):Qu(n,4))+"-"+Qu(t.getUTCMonth()+1,2)+"-"+Qu(t.getUTCDate(),2)+(o?"T"+Qu(e,2)+":"+Qu(r,2)+":"+Qu(i,2)+"."+Qu(o,3)+"Z":i?"T"+Qu(e,2)+":"+Qu(r,2)+":"+Qu(i,2)+"Z":r||e?"T"+Qu(e,2)+":"+Qu(r,2)+"Z":"")}function tc(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return Xu;if(f)return f=!1,Hu;var n,r,i=a;if(t.charCodeAt(i)===Gu){for(;a++=o?c=!0:(r=t.charCodeAt(a++))===Vu?f=!0:r===Wu&&(f=!0,t.charCodeAt(a)===Vu&&++a),t.slice(i+1,n-1).replace(/""/g,'"')}for(;axc(n,e).then((n=>(new DOMParser).parseFromString(n,t)))}var Ec=Sc("application/xml"),Nc=Sc("text/html"),kc=Sc("image/svg+xml");function Cc(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,c,f,s,l,h,d=t._root,p={data:r},g=t._x0,y=t._y0,v=t._x1,_=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((f=n>=(o=(g+v)/2))?g=o:v=o,(s=e>=(a=(y+_)/2))?y=a:_=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(g+v)/2))?g=o:v=o,(s=e>=(a=(y+_)/2))?y=a:_=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function Pc(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function zc(t){return t[0]}function $c(t){return t[1]}function Dc(t,n,e){var r=new Rc(null==n?zc:n,null==e?$c:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Rc(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Fc(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var qc=Dc.prototype=Rc.prototype;function Uc(t){return function(){return t}}function Ic(t){return 1e-6*(t()-.5)}function Oc(t){return t.x+t.vx}function Bc(t){return t.y+t.vy}function Yc(t){return t.index}function Lc(t,n){var e=t.get(n);if(!e)throw new Error("node not found: "+n);return e}qc.copy=function(){var t,n,e=new Rc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Fc(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Fc(n));return e},qc.add=function(t){const n=+this._x.call(null,t),e=+this._y.call(null,t);return Cc(this.cover(n,e),n,e,t)},qc.addAll=function(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;et||t>=i||r>n||n>=o;)switch(u=(nh||(o=c.y0)>d||(a=c.x1)=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,g.data),b=n-+this._y.call(null,g.data),m=_*_+b*b;if(m=(u=(p+y)/2))?p=u:y=u,(s=a>=(c=(g+v)/2))?g=c:v=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},qc.removeAll=function(t){for(var n=0,e=t.length;n1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Kc(t){return(t=Zc(Math.abs(t)))?t[1]:NaN}var Qc,Jc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tf(t){if(!(n=Jc.exec(t)))throw new Error("invalid format: "+t);var n;return new nf({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function nf(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ef(t,n){var e=Zc(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}tf.prototype=nf.prototype,nf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var rf={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>ef(100*t,n),r:ef,s:function(t,n){var e=Zc(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Qc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Zc(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function of(t){return t}var af,uf=Array.prototype.map,cf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ff(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?of:(n=uf.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(t.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?of:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(uf.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",f=void 0===t.minus?"−":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var n=(t=tf(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,v=t.trim,_=t.type;"n"===_?(g=!0,_="g"):rf[_]||(void 0===y&&(y=12),v=!0,_="g"),(d||"0"===n&&"="===e)&&(d=!0,n="0",e="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",m="$"===h?o:/[%p]/.test(_)?c:"",x=rf[_],w=/[defgprs%]/.test(_);function M(t){var i,o,c,h=b,M=m;if("c"===_)M=x(t)+M,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),y),v&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),T&&0==+t&&"+"!==l&&(T=!1),h=(T?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===_?cf[8+Qc/3]:"")+M+(T&&"("===l?")":""),w)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){M=(46===c?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var A=h.length+t.length+M.length,S=A>1)+h+t+M+S.slice(A);break;default:t=S+h+t+M}return u(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=tf(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Kc(n)/3))),i=Math.pow(10,-r),o=cf[8+r/3];return function(t){return e(i*t)+o}}}}function sf(n){return af=ff(n),t.format=af.format,t.formatPrefix=af.formatPrefix,af}function lf(t){return Math.max(0,-Kc(Math.abs(t)))}function hf(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Kc(n)/3)))-Kc(Math.abs(t)))}function df(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Kc(n)-Kc(t))+1}t.format=void 0,t.formatPrefix=void 0,sf({thousands:",",grouping:[3],currency:["$",""]});var pf=1e-6,gf=1e-12,yf=Math.PI,vf=yf/2,_f=yf/4,bf=2*yf,mf=180/yf,xf=yf/180,wf=Math.abs,Mf=Math.atan,Tf=Math.atan2,Af=Math.cos,Sf=Math.ceil,Ef=Math.exp,Nf=Math.hypot,kf=Math.log,Cf=Math.pow,Pf=Math.sin,zf=Math.sign||function(t){return t>0?1:t<0?-1:0},$f=Math.sqrt,Df=Math.tan;function Rf(t){return t>1?0:t<-1?yf:Math.acos(t)}function Ff(t){return t>1?vf:t<-1?-vf:Math.asin(t)}function qf(t){return(t=Pf(t/2))*t}function Uf(){}function If(t,n){t&&Bf.hasOwnProperty(t.type)&&Bf[t.type](t,n)}var Of={Feature:function(t,n){If(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=Af(n=(n*=xf)/2+_f),a=Pf(n),u=Wf*a,c=Vf*o+u*Af(i),f=u*r*Pf(i);us.add(Tf(f,c)),Gf=t,Vf=o,Wf=a}function ps(t){return[Tf(t[1],t[0]),Ff(t[2])]}function gs(t){var n=t[0],e=t[1],r=Af(e);return[r*Af(n),r*Pf(n),Pf(e)]}function ys(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function vs(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function _s(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function bs(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function ms(t){var n=$f(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var xs,ws,Ms,Ts,As,Ss,Es,Ns,ks,Cs,Ps,zs,$s,Ds,Rs,Fs,qs={point:Us,lineStart:Os,lineEnd:Bs,polygonStart:function(){qs.point=Ys,qs.lineStart=Ls,qs.lineEnd=js,is=new A,fs.polygonStart()},polygonEnd:function(){fs.polygonEnd(),qs.point=Us,qs.lineStart=Os,qs.lineEnd=Bs,us<0?(Zf=-(Qf=180),Kf=-(Jf=90)):is>pf?Jf=90:is<-pf&&(Kf=-90),as[0]=Zf,as[1]=Qf},sphere:function(){Zf=-(Qf=180),Kf=-(Jf=90)}};function Us(t,n){os.push(as=[Zf=t,Qf=t]),nJf&&(Jf=n)}function Is(t,n){var e=gs([t*xf,n*xf]);if(rs){var r=vs(rs,e),i=vs([r[1],-r[0],0],r);ms(i),i=ps(i);var o,a=t-ts,u=a>0?1:-1,c=i[0]*mf*u,f=wf(a)>180;f^(u*tsJf&&(Jf=o):f^(u*ts<(c=(c+360)%360-180)&&cJf&&(Jf=n)),f?tHs(Zf,Qf)&&(Qf=t):Hs(t,Qf)>Hs(Zf,Qf)&&(Zf=t):Qf>=Zf?(tQf&&(Qf=t)):t>ts?Hs(Zf,t)>Hs(Zf,Qf)&&(Qf=t):Hs(t,Qf)>Hs(Zf,Qf)&&(Zf=t)}else os.push(as=[Zf=t,Qf=t]);nJf&&(Jf=n),rs=e,ts=t}function Os(){qs.point=Is}function Bs(){as[0]=Zf,as[1]=Qf,qs.point=Us,rs=null}function Ys(t,n){if(rs){var e=t-ts;is.add(wf(e)>180?e+(e>0?360:-360):e)}else ns=t,es=n;fs.point(t,n),Is(t,n)}function Ls(){fs.lineStart()}function js(){Ys(ns,es),fs.lineEnd(),wf(is)>pf&&(Zf=-(Qf=180)),as[0]=Zf,as[1]=Qf,rs=null}function Hs(t,n){return(n-=t)<0?n+360:n}function Xs(t,n){return t[0]-n[0]}function Gs(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nyf&&(t-=Math.round(t/bf)*bf),[t,n]}function cl(t,n,e){return(t%=bf)?n||e?al(sl(t),ll(n,e)):sl(t):n||e?ll(n,e):ul}function fl(t){return function(n,e){return wf(n+=t)>yf&&(n-=Math.round(n/bf)*bf),[n,e]}}function sl(t){var n=fl(t);return n.invert=fl(-t),n}function ll(t,n){var e=Af(t),r=Pf(t),i=Af(n),o=Pf(n);function a(t,n){var a=Af(n),u=Af(t)*a,c=Pf(t)*a,f=Pf(n),s=f*e+u*r;return[Tf(c*i-s*o,u*e-f*r),Ff(s*i+c*o)]}return a.invert=function(t,n){var a=Af(n),u=Af(t)*a,c=Pf(t)*a,f=Pf(n),s=f*i-c*o;return[Tf(c*i+f*o,u*e+s*r),Ff(s*e-u*r)]},a}function hl(t){function n(n){return(n=t(n[0]*xf,n[1]*xf))[0]*=mf,n[1]*=mf,n}return t=cl(t[0]*xf,t[1]*xf,t.length>2?t[2]*xf:0),n.invert=function(n){return(n=t.invert(n[0]*xf,n[1]*xf))[0]*=mf,n[1]*=mf,n},n}function dl(t,n,e,r,i,o){if(e){var a=Af(n),u=Pf(n),c=r*e;null==i?(i=n+r*bf,o=n-c/2):(i=pl(a,i),o=pl(a,o),(r>0?io)&&(i+=r*bf));for(var f,s=i;r>0?s>o:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function yl(t,n){return wf(t[0]-n[0])=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function bl(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,E=S*T,N=E>yf,k=y*w;if(c.add(Tf(k*S*Pf(E),v*M+k*Af(E))),a+=N?T+S*bf:T,N^p>=e^m>=e){var C=vs(gs(d),gs(b));ms(C);var P=vs(o,C);ms(P);var z=(N^T>=0?-1:1)*Ff(P[2]);(r>z||r===z&&(C[0]||C[1]))&&(u+=N^T>=0?1:-1)}}return(a<-pf||a0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(Ml))}return h}}function Ml(t){return t.length>1}function Tl(t,n){return((t=t.x)[0]<0?t[1]-vf-pf:vf-t[1])-((n=n.x)[0]<0?n[1]-vf-pf:vf-n[1])}ul.invert=ul;var Al=wl((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?yf:-yf,c=wf(o-e);wf(c-yf)0?vf:-vf),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=yf&&(wf(e-i)pf?Mf((Pf(n)*(o=Af(r))*Pf(e)-Pf(r)*(i=Af(n))*Pf(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*vf,r.point(-yf,i),r.point(0,i),r.point(yf,i),r.point(yf,0),r.point(yf,-i),r.point(0,-i),r.point(-yf,-i),r.point(-yf,0),r.point(-yf,i);else if(wf(t[0]-n[0])>pf){var o=t[0]0,i=wf(n)>pf;function o(t,e){return Af(t)*Af(e)>n}function a(t,e,r){var i=[1,0,0],o=vs(gs(t),gs(e)),a=ys(o,o),u=o[0],c=a-u*u;if(!c)return!r&&t;var f=n*a/c,s=-n*u/c,l=vs(i,o),h=bs(i,f);_s(h,bs(o,s));var d=l,p=ys(h,d),g=ys(d,d),y=p*p-g*(ys(h,h)-1);if(!(y<0)){var v=$f(y),_=bs(d,(-p-v)/g);if(_s(_,h),_=ps(_),!r)return _;var b,m=t[0],x=e[0],w=t[1],M=e[1];x0^_[1]<(wf(_[0]-m)yf^(m<=_[0]&&_[0]<=x)){var S=bs(d,(-p+v)/g);return _s(S,h),[_,ps(S)]}}}function u(n,e){var i=r?t:yf-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return wl(o,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],g=o(l,h),y=r?g?0:u(l,h):g?u(l+(l<0?yf:-yf),h):0;if(!n&&(f=c=g)&&t.lineStart(),g!==c&&(!(d=a(n,p))||yl(n,d)||yl(p,d))&&(p[2]=1),g!==c)s=0,g?(t.lineStart(),d=a(p,n),t.point(d[0],d[1])):(d=a(n,p),t.point(d[0],d[1],2),t.lineEnd()),n=d;else if(i&&n&&r^g){var v;y&e||!(v=a(p,n,!0))||(s=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!g||n&&yl(n,p)||t.point(p[0],p[1]),n=p,c=g,e=y},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,o){dl(o,t,e,i,n,r)}),r?[0,-t]:[-yf,t-yf])}var El,Nl,kl,Cl,Pl=1e9,zl=-Pl;function $l(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,f){var s=0,l=0;if(null==i||(s=a(i,u))!==(l=a(o,u))||c(i,o)<0^u>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+u+4)%4)!==l);else f.point(o[0],o[1])}function a(r,i){return wf(r[0]-t)0?0:3:wf(r[0]-e)0?2:1:wf(r[1]-n)0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,f,s,l,h,d,p,g,y,v,_,b=a,m=gl(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);v=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(M(l,h),d&&y&&m.rejoin(),c.push(m.result()));x.point=w,y&&b.lineEnd()},polygonStart:function(){b=m,c=[],f=[],_=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;er&&(h-o)*(r-a)>(d-a)*(t-o)&&++n:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--n;return n}(),e=_&&n,i=(c=st(c)).length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&_l(c,u,n,o,a),a.polygonEnd());b=a,c=f=s=null}};function w(t,n){i(t,n)&&b.point(t,n)}function M(o,a){var u=i(o,a);if(f&&s.push([o,a]),v)l=o,h=a,d=u,v=!1,u&&(b.lineStart(),b.point(o,a));else if(u&&y)b.point(o,a);else{var c=[p=Math.max(zl,Math.min(Pl,p)),g=Math.max(zl,Math.min(Pl,g))],m=[o=Math.max(zl,Math.min(Pl,o)),a=Math.max(zl,Math.min(Pl,a))];!function(t,n,e,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=n[0]-u,h=n[1]-c;if(a=e-u,l||!(a>0)){if(a/=l,l<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a0)){if(a/=h,h<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(n[0]=u+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?u&&(b.lineStart(),b.point(o,a),_=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(m[0],m[1]),u||b.lineEnd(),_=!1)}p=o,g=a,y=u}return x}}var Dl={sphere:Uf,point:Uf,lineStart:function(){Dl.point=Fl,Dl.lineEnd=Rl},lineEnd:Uf,polygonStart:Uf,polygonEnd:Uf};function Rl(){Dl.point=Dl.lineEnd=Uf}function Fl(t,n){Nl=t*=xf,kl=Pf(n*=xf),Cl=Af(n),Dl.point=ql}function ql(t,n){t*=xf;var e=Pf(n*=xf),r=Af(n),i=wf(t-Nl),o=Af(i),a=r*Pf(i),u=Cl*e-kl*r*o,c=kl*e+Cl*r*o;El.add(Tf($f(a*a+u*u),c)),Nl=t,kl=e,Cl=r}function Ul(t){return El=new A,jf(t,Dl),+El}var Il=[null,null],Ol={type:"LineString",coordinates:Il};function Bl(t,n){return Il[0]=t,Il[1]=n,Ul(Ol)}var Yl={Feature:function(t,n){return jl(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r0&&(i=Bl(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))pf})).map(c)).concat(ht(Sf(o/d)*d,i,d).filter((function(t){return wf(t%g)>pf})).map(f))}return v.lines=function(){return _().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(a).slice(1),s(e).reverse().slice(1),l(u).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),u>a&&(t=u,u=a,a=t),v.precision(y)):[[r,u],[e,a]]},v.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),v.precision(y)):[[n,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],v):[p,g]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(y=+h,c=Zl(o,i,90),f=Kl(n,t,y),s=Zl(u,a,90),l=Kl(r,e,y),v):y},v.extentMajor([[-180,-90+pf],[180,90-pf]]).extentMinor([[-180,-80-pf],[180,80+pf]])}var Jl,th,nh,eh,rh=t=>t,ih=new A,oh=new A,ah={point:Uf,lineStart:Uf,lineEnd:Uf,polygonStart:function(){ah.lineStart=uh,ah.lineEnd=sh},polygonEnd:function(){ah.lineStart=ah.lineEnd=ah.point=Uf,ih.add(wf(oh)),oh=new A},result:function(){var t=ih/2;return ih=new A,t}};function uh(){ah.point=ch}function ch(t,n){ah.point=fh,Jl=nh=t,th=eh=n}function fh(t,n){oh.add(eh*t-nh*n),nh=t,eh=n}function sh(){fh(Jl,th)}var lh=ah,hh=1/0,dh=hh,ph=-hh,gh=ph,yh={point:function(t,n){tph&&(ph=t);ngh&&(gh=n)},lineStart:Uf,lineEnd:Uf,polygonStart:Uf,polygonEnd:Uf,result:function(){var t=[[hh,dh],[ph,gh]];return ph=gh=-(dh=hh=1/0),t}};var vh,_h,bh,mh,xh=yh,wh=0,Mh=0,Th=0,Ah=0,Sh=0,Eh=0,Nh=0,kh=0,Ch=0,Ph={point:zh,lineStart:$h,lineEnd:Fh,polygonStart:function(){Ph.lineStart=qh,Ph.lineEnd=Uh},polygonEnd:function(){Ph.point=zh,Ph.lineStart=$h,Ph.lineEnd=Fh},result:function(){var t=Ch?[Nh/Ch,kh/Ch]:Eh?[Ah/Eh,Sh/Eh]:Th?[wh/Th,Mh/Th]:[NaN,NaN];return wh=Mh=Th=Ah=Sh=Eh=Nh=kh=Ch=0,t}};function zh(t,n){wh+=t,Mh+=n,++Th}function $h(){Ph.point=Dh}function Dh(t,n){Ph.point=Rh,zh(bh=t,mh=n)}function Rh(t,n){var e=t-bh,r=n-mh,i=$f(e*e+r*r);Ah+=i*(bh+t)/2,Sh+=i*(mh+n)/2,Eh+=i,zh(bh=t,mh=n)}function Fh(){Ph.point=zh}function qh(){Ph.point=Ih}function Uh(){Oh(vh,_h)}function Ih(t,n){Ph.point=Oh,zh(vh=bh=t,_h=mh=n)}function Oh(t,n){var e=t-bh,r=n-mh,i=$f(e*e+r*r);Ah+=i*(bh+t)/2,Sh+=i*(mh+n)/2,Eh+=i,Nh+=(i=mh*t-bh*n)*(bh+t),kh+=i*(mh+n),Ch+=3*i,zh(bh=t,mh=n)}var Bh=Ph;function Yh(t){this._context=t}Yh.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,bf)}},result:Uf};var Lh,jh,Hh,Xh,Gh,Vh=new A,Wh={point:Uf,lineStart:function(){Wh.point=Zh},lineEnd:function(){Lh&&Kh(jh,Hh),Wh.point=Uf},polygonStart:function(){Lh=!0},polygonEnd:function(){Lh=null},result:function(){var t=+Vh;return Vh=new A,t}};function Zh(t,n){Wh.point=Kh,jh=Xh=t,Hh=Gh=n}function Kh(t,n){Xh-=t,Gh-=n,Vh.add($f(Xh*Xh+Gh*Gh)),Xh=t,Gh=n}var Qh=Wh;let Jh,td,nd,ed;class rd{constructor(t){this._append=null==t?id:function(t){const n=Math.floor(t);if(!(n>=0))throw new RangeError(`invalid digits: ${t}`);if(n>15)return id;if(n!==Jh){const t=10**n;Jh=n,td=function(n){let e=1;this._+=n[0];for(const r=n.length;e4*n&&g--){var m=a+h,x=u+d,w=c+p,M=$f(m*m+x*x+w*w),T=Ff(w/=M),A=wf(wf(w)-1)n||wf((v*k+_*C)/b-.5)>.3||a*h+u*d+c*p2?t[2]%360*xf:0,k()):[y*mf,v*mf,_*mf]},E.angle=function(t){return arguments.length?(b=t%360*xf,k()):b*mf},E.reflectX=function(t){return arguments.length?(m=t?-1:1,k()):m<0},E.reflectY=function(t){return arguments.length?(x=t?-1:1,k()):x<0},E.precision=function(t){return arguments.length?(a=pd(u,S=t*t),C()):$f(S)},E.fitExtent=function(t,n){return cd(E,t,n)},E.fitSize=function(t,n){return fd(E,t,n)},E.fitWidth=function(t,n){return sd(E,t,n)},E.fitHeight=function(t,n){return ld(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&N,k()}}function bd(t){var n=0,e=yf/3,r=_d(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*xf,e=t[1]*xf):[n*mf,e*mf]},i}function md(t,n){var e=Pf(t),r=(e+Pf(n))/2;if(wf(r)0?n<-vf+pf&&(n=-vf+pf):n>vf-pf&&(n=vf-pf);var e=i/Cf(kd(n),r);return[e*Pf(r*t),i-e*Af(r*t)]}return o.invert=function(t,n){var e=i-n,o=zf(r)*$f(t*t+e*e),a=Tf(t,wf(e))*zf(e);return e*r<0&&(a-=yf*zf(t)*zf(e)),[a/r,2*Mf(Cf(i/o,1/r))-vf]},o}function Pd(t,n){return[t,n]}function zd(t,n){var e=Af(t),r=t===n?Pf(t):(e-Af(n))/(n-t),i=e/r+t;if(wf(r)=0;)n+=e[r].value;else n=1;t.value=n}function Vd(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Zd)):void 0===n&&(n=Wd);for(var e,r,i,o,a,u=new Jd(t),c=[u];e=c.pop();)if((i=n(e.data))&&(a=(i=Array.from(i)).length))for(e.children=i,o=a-1;o>=0;--o)c.push(r=i[o]=new Jd(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(Qd)}function Wd(t){return t.children}function Zd(t){return Array.isArray(t)?t[1]:null}function Kd(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Qd(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Jd(t){this.data=t,this.depth=this.height=0,this.parent=null}function tp(t){return null==t?null:np(t)}function np(t){if("function"!=typeof t)throw new Error;return t}function ep(){return 0}function rp(t){return function(){return t}}Ud.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=e=(r*($d+Dd*i+o*(Rd+Fd*i))-n)/($d+3*Dd*i+o*(7*Rd+9*Fd*i)))*r)*i*i,!(wf(e)pf&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Bd.invert=Td(Ff),Yd.invert=Td((function(t){return 2*Mf(t)})),Ld.invert=function(t,n){return[-n,2*Mf(Ef(t))-vf]},Jd.prototype=Vd.prototype={constructor:Jd,count:function(){return this.eachAfter(Gd)},each:function(t,n){let e=-1;for(const r of this)t.call(n,r,++e,this);return this},eachAfter:function(t,n){for(var e,r,i,o=this,a=[o],u=[],c=-1;o=a.pop();)if(u.push(o),e=o.children)for(r=0,i=e.length;r=0;--r)o.push(e[r]);return this},find:function(t,n){let e=-1;for(const r of this)if(t.call(n,r,++e,this))return r},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return Vd(this).eachBefore(Kd)},[Symbol.iterator]:function*(){var t,n,e,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,n=i.children)for(e=0,r=n.length;e(t=(ip*t+op)%ap)/ap}function cp(t,n){for(var e,r,i=0,o=(t=function(t,n){let e,r,i=t.length;for(;i;)r=n()*i--|0,e=t[i],t[i]=t[r],t[r]=e;return t}(Array.from(t),n)).length,a=[];i0&&e*e>r*r+i*i}function hp(t,n){for(var e=0;e1e-6?(E+Math.sqrt(E*E-4*S*N))/(2*S):N/E);return{x:r+w+M*k,y:i+T+A*k,r:k}}function yp(t,n,e){var r,i,o,a,u=t.x-n.x,c=t.y-n.y,f=u*u+c*c;f?(i=n.r+e.r,i*=i,a=t.r+e.r,i>(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),e.x=t.x-r*u-o*c,e.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*u-o*c,e.y=n.y+r*c+o*u)):(e.x=n.x+e.r,e.y=n.y)}function vp(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function _p(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function bp(t){this._=t,this.next=null,this.previous=null}function mp(t,n){if(!(o=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var e,r,i,o,a,u,c,f,s,l,h;if((e=t[0]).x=0,e.y=0,!(o>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(o>2))return e.r+r.r;yp(r,e,i=t[2]),e=new bp(e),r=new bp(r),i=new bp(i),e.next=i.previous=r,r.next=e.previous=i,i.next=r.previous=e;t:for(c=3;c1&&!$p(t,n););return t.slice(0,n)}function $p(t,n){if("/"===t[n]){let e=0;for(;n>0&&"\\"===t[--n];)++e;if(0==(1&e))return!0}return!1}function Dp(t,n){return t.parent===n.parent?1:2}function Rp(t){var n=t.children;return n?n[0]:t.t}function Fp(t){var n=t.children;return n?n[n.length-1]:t.t}function qp(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Up(t,n,e){return t.a.parent===n.parent?t.a:e}function Ip(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function Op(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(i-e)/t.value;++uh&&(h=u),y=s*s*g,(d=Math.max(h/y,y/l))>p){s-=u;break}p=d}v.push(a={value:s,dice:c1?n:1)},e}(Bp);var jp=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l1?n:1)},e}(Bp);function Hp(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function Xp(t,n){return t[0]-n[0]||t[1]-n[1]}function Gp(t){const n=t.length,e=[0,1];let r,i=2;for(r=2;r1&&Hp(t[e[i-2]],t[e[i-1]],t[r])<=0;)--i;e[i++]=r}return e.slice(0,i)}var Vp=Math.random,Wp=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(Vp),Zp=function t(n){function e(t,e){return arguments.length<2&&(e=t,t=0),t=Math.floor(t),e=Math.floor(e)-t,function(){return Math.floor(n()*e+t)}}return e.source=t,e}(Vp),Kp=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Vp),Qp=function t(n){var e=Kp.source(n);function r(){var t=e.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Vp),Jp=function t(n){function e(t){return(t=+t)<=0?()=>0:function(){for(var e=0,r=t;r>1;--r)e+=n();return e+r*n()}}return e.source=t,e}(Vp),tg=function t(n){var e=Jp.source(n);function r(t){if(0==(t=+t))return n;var r=e(t);return function(){return r()/t}}return r.source=t,r}(Vp),ng=function t(n){function e(t){return function(){return-Math.log1p(-n())/t}}return e.source=t,e}(Vp),eg=function t(n){function e(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-n(),t)}}return e.source=t,e}(Vp),rg=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(n()+t)}}return e.source=t,e}(Vp),ig=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-n())/t)})}return e.source=t,e}(Vp),og=function t(n){var e=Kp.source(n)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-n())*r;var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),a=t<1?()=>Math.pow(n(),1/t):()=>1;return function(){do{do{var t=e(),u=1+o*t}while(u<=0);u*=u*u;var c=1-n()}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-u+Math.log(u)));return i*u*a()*r}}return r.source=t,r}(Vp),ag=function t(n){var e=og.source(n);function r(t,n){var r=e(t),i=e(n);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(Vp),ug=function t(n){var e=ig.source(n),r=ag.source(n);function i(t,n){return t=+t,(n=+n)>=1?()=>t:n<=0?()=>0:function(){for(var i=0,o=t,a=n;o*a>16&&o*(1-a)>16;){var u=Math.floor((o+1)*a),c=r(u,o-u+1)();c<=a?(i+=u,o-=u,a=(a-c)/(1-c)):(o=u-1,a/=c)}for(var f=a<.5,s=e(f?a:1-a),l=s(),h=0;l<=o;++h)l+=s();return i+(f?h:o-h)}}return i.source=t,i}(Vp),cg=function t(n){function e(t,e,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=n=>Math.pow(n,t)),e=null==e?0:+e,r=null==r?1:+r,function(){return e+r*i(-Math.log1p(-n()))}}return e.source=t,e}(Vp),fg=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){return t+e*Math.tan(Math.PI*n())}}return e.source=t,e}(Vp),sg=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){var r=n();return t+e*Math.log(r/(1-r))}}return e.source=t,e}(Vp),lg=function t(n){var e=og.source(n),r=ug.source(n);function i(t){return function(){for(var i=0,o=t;o>16;){var a=Math.floor(.875*o),u=e(a)();if(u>o)return i+r(a-1,o/u)();i+=a,o-=u}for(var c=-Math.log1p(-n()),f=0;c<=o;++f)c-=Math.log1p(-n());return i+f}}return i.source=t,i}(Vp);const hg=1/4294967296;function dg(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function pg(t,n){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof n?this.interpolator(n):this.range(n)}return this}const gg=Symbol("implicit");function yg(){var t=new InternMap,n=[],e=[],r=gg;function i(i){let o=t.get(i);if(void 0===o){if(r!==gg)return r;t.set(i,o=n.push(i)-1)}return e[o%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new InternMap;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return i},i.range=function(t){return arguments.length?(e=Array.from(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return yg(n,e).unknown(r)},dg.apply(i,arguments),i}function vg(){var t,n,e=yg().unknown(void 0),r=e.domain,i=e.range,o=0,a=1,u=!1,c=0,f=0,s=.5;function l(){var e=r().length,l=an&&(e=t,t=n,n=e),function(e){return Math.max(t,Math.min(n,e))}}(a[0],a[t-1])),r=t>2?Tg:Mg,i=o=null,l}function l(n){return null==n||isNaN(n=+n)?e:(i||(i=r(a.map(t),u,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(u,a.map(t),Lr)))(e)))},l.domain=function(t){return arguments.length?(a=Array.from(t,bg),s()):a.slice()},l.range=function(t){return arguments.length?(u=Array.from(t),s()):u.slice()},l.rangeRound=function(t){return u=Array.from(t),c=Wr,s()},l.clamp=function(t){return arguments.length?(f=!!t||xg,s()):f!==xg},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function Eg(){return Sg()(xg,xg)}function Ng(n,e,r,i){var o,a=Z(n,e,r);switch((i=tf(null==i?",f":i)).type){case"s":var u=Math.max(Math.abs(n),Math.abs(e));return null!=i.precision||isNaN(o=hf(a,u))||(i.precision=o),t.formatPrefix(i,u);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=df(a,Math.max(Math.abs(n),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=lf(a))||(i.precision=o-2*("%"===i.type))}return t.format(i)}function kg(t){var n=t.domain;return t.ticks=function(t){var e=n();return V(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return Ng(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),a=0,u=o.length-1,c=o[a],f=o[u],s=10;for(f0;){if((i=W(c,f,e))===r)return o[a]=c,o[u]=f,n(o);if(i>0)c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i}r=i}return t},t}function Cg(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a-t(-n,e)}function qg(n){const e=n(Pg,zg),r=e.domain;let i,o,a=10;function u(){return i=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(a),o=function(t){return 10===t?Rg:t===Math.E?Math.exp:n=>Math.pow(t,n)}(a),r()[0]<0?(i=Fg(i),o=Fg(o),n($g,Dg)):n(Pg,zg),e}return e.base=function(t){return arguments.length?(a=+t,u()):a},e.domain=function(t){return arguments.length?(r(t),u()):r()},e.ticks=t=>{const n=r();let e=n[0],u=n[n.length-1];const c=u0){for(;l<=h;++l)for(f=1;fu)break;p.push(s)}}else for(;l<=h;++l)for(f=a-1;f>=1;--f)if(s=l>0?f/o(-l):f*o(l),!(su)break;p.push(s)}2*p.length{if(null==n&&(n=10),null==r&&(r=10===a?"s":","),"function"!=typeof r&&(a%1||null!=(r=tf(r)).precision||(r.trim=!0),r=t.format(r)),n===1/0)return r;const u=Math.max(1,a*n/e.ticks().length);return t=>{let n=t/o(Math.round(i(t)));return n*ar(Cg(r(),{floor:t=>o(Math.floor(i(t))),ceil:t=>o(Math.ceil(i(t)))})),e}function Ug(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function Ig(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Og(t){var n=1,e=t(Ug(n),Ig(n));return e.constant=function(e){return arguments.length?t(Ug(n=+e),Ig(n)):n},kg(e)}function Bg(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Yg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Lg(t){return t<0?-t*t:t*t}function jg(t){var n=t(xg,xg),e=1;return n.exponent=function(n){return arguments.length?1===(e=+n)?t(xg,xg):.5===e?t(Yg,Lg):t(Bg(e),Bg(1/e)):e},kg(n)}function Hg(){var t=jg(Sg());return t.copy=function(){return Ag(t,Hg()).exponent(t.exponent())},dg.apply(t,arguments),t}function Xg(t){return Math.sign(t)*t*t}const Gg=new Date,Vg=new Date;function Wg(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=n=>(t(n=new Date(+n)),n),i.ceil=e=>(t(e=new Date(e-1)),n(e,1),t(e),e),i.round=t=>{const n=i(t),e=i.ceil(t);return t-n(n(t=new Date(+t),null==e?1:Math.floor(e)),t),i.range=(e,r,o)=>{const a=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e0))return a;let u;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(uWg((n=>{if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})),e&&(i.count=(n,r)=>(Gg.setTime(+n),Vg.setTime(+r),t(Gg),t(Vg),Math.floor(e(Gg,Vg))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?n=>r(n)%t==0:n=>i.count(0,n)%t==0):i:null)),i}const Zg=Wg((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Zg.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Wg((n=>{n.setTime(Math.floor(n/t)*t)}),((n,e)=>{n.setTime(+n+e*t)}),((n,e)=>(e-n)/t)):Zg:null);const Kg=Zg.range,Qg=1e3,Jg=6e4,ty=60*Jg,ny=24*ty,ey=7*ny,ry=30*ny,iy=365*ny,oy=Wg((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Qg)}),((t,n)=>(n-t)/Qg),(t=>t.getUTCSeconds())),ay=oy.range,uy=Wg((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qg)}),((t,n)=>{t.setTime(+t+n*Jg)}),((t,n)=>(n-t)/Jg),(t=>t.getMinutes())),cy=uy.range,fy=Wg((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*Jg)}),((t,n)=>(n-t)/Jg),(t=>t.getUTCMinutes())),sy=fy.range,ly=Wg((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qg-t.getMinutes()*Jg)}),((t,n)=>{t.setTime(+t+n*ty)}),((t,n)=>(n-t)/ty),(t=>t.getHours())),hy=ly.range,dy=Wg((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*ty)}),((t,n)=>(n-t)/ty),(t=>t.getUTCHours())),py=dy.range,gy=Wg((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Jg)/ny),(t=>t.getDate()-1)),yy=gy.range,vy=Wg((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/ny),(t=>t.getUTCDate()-1)),_y=vy.range,by=Wg((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/ny),(t=>Math.floor(t/ny))),my=by.range;function xy(t){return Wg((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Jg)/ey))}const wy=xy(0),My=xy(1),Ty=xy(2),Ay=xy(3),Sy=xy(4),Ey=xy(5),Ny=xy(6),ky=wy.range,Cy=My.range,Py=Ty.range,zy=Ay.range,$y=Sy.range,Dy=Ey.range,Ry=Ny.range;function Fy(t){return Wg((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/ey))}const qy=Fy(0),Uy=Fy(1),Iy=Fy(2),Oy=Fy(3),By=Fy(4),Yy=Fy(5),Ly=Fy(6),jy=qy.range,Hy=Uy.range,Xy=Iy.range,Gy=Oy.range,Vy=By.range,Wy=Yy.range,Zy=Ly.range,Ky=Wg((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth())),Qy=Ky.range,Jy=Wg((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth())),tv=Jy.range,nv=Wg((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));nv.every=t=>isFinite(t=Math.floor(t))&&t>0?Wg((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,e)=>{n.setFullYear(n.getFullYear()+e*t)})):null;const ev=nv.range,rv=Wg((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));rv.every=t=>isFinite(t=Math.floor(t))&&t>0?Wg((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null;const iv=rv.range;function ov(t,n,e,i,o,a){const u=[[oy,1,Qg],[oy,5,5e3],[oy,15,15e3],[oy,30,3e4],[a,1,Jg],[a,5,5*Jg],[a,15,15*Jg],[a,30,30*Jg],[o,1,ty],[o,3,3*ty],[o,6,6*ty],[o,12,12*ty],[i,1,ny],[i,2,2*ny],[e,1,ey],[n,1,ry],[n,3,3*ry],[t,1,iy]];function c(n,e,i){const o=Math.abs(e-n)/i,a=r((([,,t])=>t)).right(u,o);if(a===u.length)return t.every(Z(n/iy,e/iy,i));if(0===a)return Zg.every(Math.max(Z(n,e,i),1));const[c,f]=u[o/u[a-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:C_,s:P_,S:Kv,u:Qv,U:Jv,V:n_,w:e_,W:r_,x:null,X:null,y:i_,Y:a_,Z:c_,"%":k_},m={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:f_,e:f_,f:p_,g:A_,G:E_,H:s_,I:l_,j:h_,L:d_,m:g_,M:y_,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:C_,s:P_,S:v_,u:__,U:b_,V:x_,w:w_,W:M_,x:null,X:null,y:T_,Y:S_,Z:N_,"%":k_},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=_.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:$v,e:$v,f:Iv,g:kv,G:Nv,H:Rv,I:Rv,j:Dv,L:Uv,m:zv,M:Fv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s.get(r[0].toLowerCase()),e+r[0].length):-1},q:Pv,Q:Bv,s:Yv,S:qv,u:Tv,U:Av,V:Sv,w:Mv,W:Ev,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:kv,Y:Nv,Z:Cv,"%":Ov};function w(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++u53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=lv(hv(o.y,0,1))).getUTCDay(),r=i>4||0===i?Uy.ceil(r):Uy(r),r=vy.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=sv(hv(o.y,0,1))).getDay(),r=i>4||0===i?My.ceil(r):My(r),r=gy.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?lv(hv(o.y,0,1)).getUTCDay():sv(hv(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,lv(o)):sv(o)}}function T(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a=c)return-1;if(37===(i=n.charCodeAt(a++))){if(i=n.charAt(a++),!(o=x[i in gv?n.charAt(a++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}var pv,gv={"-":"",_:" ",0:"0"},yv=/^\s*\d+/,vv=/^%/,_v=/[\\^$*+?|[\]().{}]/g;function bv(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),n])))}function Mv(t,n,e){var r=yv.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Tv(t,n,e){var r=yv.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function Av(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function Sv(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function Ev(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function Nv(t,n,e){var r=yv.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function kv(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function Cv(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Pv(t,n,e){var r=yv.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function zv(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function $v(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Dv(t,n,e){var r=yv.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Rv(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Fv(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function qv(t,n,e){var r=yv.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Uv(t,n,e){var r=yv.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Iv(t,n,e){var r=yv.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Ov(t,n,e){var r=vv.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Bv(t,n,e){var r=yv.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function Yv(t,n,e){var r=yv.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function Lv(t,n){return bv(t.getDate(),n,2)}function jv(t,n){return bv(t.getHours(),n,2)}function Hv(t,n){return bv(t.getHours()%12||12,n,2)}function Xv(t,n){return bv(1+gy.count(nv(t),t),n,3)}function Gv(t,n){return bv(t.getMilliseconds(),n,3)}function Vv(t,n){return Gv(t,n)+"000"}function Wv(t,n){return bv(t.getMonth()+1,n,2)}function Zv(t,n){return bv(t.getMinutes(),n,2)}function Kv(t,n){return bv(t.getSeconds(),n,2)}function Qv(t){var n=t.getDay();return 0===n?7:n}function Jv(t,n){return bv(wy.count(nv(t)-1,t),n,2)}function t_(t){var n=t.getDay();return n>=4||0===n?Sy(t):Sy.ceil(t)}function n_(t,n){return t=t_(t),bv(Sy.count(nv(t),t)+(4===nv(t).getDay()),n,2)}function e_(t){return t.getDay()}function r_(t,n){return bv(My.count(nv(t)-1,t),n,2)}function i_(t,n){return bv(t.getFullYear()%100,n,2)}function o_(t,n){return bv((t=t_(t)).getFullYear()%100,n,2)}function a_(t,n){return bv(t.getFullYear()%1e4,n,4)}function u_(t,n){var e=t.getDay();return bv((t=e>=4||0===e?Sy(t):Sy.ceil(t)).getFullYear()%1e4,n,4)}function c_(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+bv(n/60|0,"0",2)+bv(n%60,"0",2)}function f_(t,n){return bv(t.getUTCDate(),n,2)}function s_(t,n){return bv(t.getUTCHours(),n,2)}function l_(t,n){return bv(t.getUTCHours()%12||12,n,2)}function h_(t,n){return bv(1+vy.count(rv(t),t),n,3)}function d_(t,n){return bv(t.getUTCMilliseconds(),n,3)}function p_(t,n){return d_(t,n)+"000"}function g_(t,n){return bv(t.getUTCMonth()+1,n,2)}function y_(t,n){return bv(t.getUTCMinutes(),n,2)}function v_(t,n){return bv(t.getUTCSeconds(),n,2)}function __(t){var n=t.getUTCDay();return 0===n?7:n}function b_(t,n){return bv(qy.count(rv(t)-1,t),n,2)}function m_(t){var n=t.getUTCDay();return n>=4||0===n?By(t):By.ceil(t)}function x_(t,n){return t=m_(t),bv(By.count(rv(t),t)+(4===rv(t).getUTCDay()),n,2)}function w_(t){return t.getUTCDay()}function M_(t,n){return bv(Uy.count(rv(t)-1,t),n,2)}function T_(t,n){return bv(t.getUTCFullYear()%100,n,2)}function A_(t,n){return bv((t=m_(t)).getUTCFullYear()%100,n,2)}function S_(t,n){return bv(t.getUTCFullYear()%1e4,n,4)}function E_(t,n){var e=t.getUTCDay();return bv((t=e>=4||0===e?By(t):By.ceil(t)).getUTCFullYear()%1e4,n,4)}function N_(){return"+0000"}function k_(){return"%"}function C_(t){return+t}function P_(t){return Math.floor(+t/1e3)}function z_(n){return pv=dv(n),t.timeFormat=pv.format,t.timeParse=pv.parse,t.utcFormat=pv.utcFormat,t.utcParse=pv.utcParse,pv}t.timeFormat=void 0,t.timeParse=void 0,t.utcFormat=void 0,t.utcParse=void 0,z_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var $_="%Y-%m-%dT%H:%M:%S.%LZ";var D_=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat($_),R_=D_;var F_=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse($_),q_=F_;function U_(t){return new Date(t)}function I_(t){return t instanceof Date?+t:+new Date(+t)}function O_(t,n,e,r,i,o,a,u,c,f){var s=Eg(),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),g=f("%I:%M"),y=f("%I %p"),v=f("%a %d"),_=f("%b %d"),b=f("%B"),m=f("%Y");function x(t){return(c(t)qr(t[t.length-1]),ib=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(X_),ob=rb(ib),ab=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(X_),ub=rb(ab),cb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(X_),fb=rb(cb),sb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(X_),lb=rb(sb),hb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(X_),db=rb(hb),pb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(X_),gb=rb(pb),yb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(X_),vb=rb(yb),_b=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(X_),bb=rb(_b),mb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(X_),xb=rb(mb),wb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(X_),Mb=rb(wb),Tb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(X_),Ab=rb(Tb),Sb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(X_),Eb=rb(Sb),Nb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(X_),kb=rb(Nb),Cb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(X_),Pb=rb(Cb),zb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(X_),$b=rb(zb),Db=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(X_),Rb=rb(Db),Fb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(X_),qb=rb(Fb),Ub=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(X_),Ib=rb(Ub),Ob=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(X_),Bb=rb(Ob),Yb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(X_),Lb=rb(Yb),jb=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(X_),Hb=rb(jb),Xb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(X_),Gb=rb(Xb),Vb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(X_),Wb=rb(Vb),Zb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(X_),Kb=rb(Zb),Qb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(X_),Jb=rb(Qb),tm=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(X_),nm=rb(tm),em=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(X_),rm=rb(em);var im=di(Ar(300,.5,0),Ar(-240,.5,1)),om=di(Ar(-100,.75,.35),Ar(80,1.5,.8)),am=di(Ar(260,.75,.35),Ar(80,1.5,.8)),um=Ar();var cm=qe(),fm=Math.PI/3,sm=2*Math.PI/3;function lm(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var hm=lm(X_("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),dm=lm(X_("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),pm=lm(X_("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),gm=lm(X_("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ym(t){return function(){return t}}const vm=Math.abs,_m=Math.atan2,bm=Math.cos,mm=Math.max,xm=Math.min,wm=Math.sin,Mm=Math.sqrt,Tm=1e-12,Am=Math.PI,Sm=Am/2,Em=2*Am;function Nm(t){return t>=1?Sm:t<=-1?-Sm:Math.asin(t)}function km(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);n=t}return t},()=>new Ia(n)}function Cm(t){return t.innerRadius}function Pm(t){return t.outerRadius}function zm(t){return t.startAngle}function $m(t){return t.endAngle}function Dm(t){return t&&t.padAngle}function Rm(t,n,e,r,i,o,a){var u=t-e,c=n-r,f=(a?o:-o)/Mm(u*u+c*c),s=f*c,l=-f*u,h=t+s,d=n+l,p=e+s,g=r+l,y=(h+p)/2,v=(d+g)/2,_=p-h,b=g-d,m=_*_+b*b,x=i-o,w=h*g-p*d,M=(b<0?-1:1)*Mm(mm(0,x*x*m-w*w)),T=(w*b-_*M)/m,A=(-w*_-b*M)/m,S=(w*b+_*M)/m,E=(-w*_+b*M)/m,N=T-y,k=A-v,C=S-y,P=E-v;return N*N+k*k>C*C+P*P&&(T=S,A=E),{cx:T,cy:A,x01:-s,y01:-l,x11:T*(i/x-1),y11:A*(i/x-1)}}var Fm=Array.prototype.slice;function qm(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Um(t){this._context=t}function Im(t){return new Um(t)}function Om(t){return t[0]}function Bm(t){return t[1]}function Ym(t,n){var e=ym(!0),r=null,i=Im,o=null,a=km(u);function u(u){var c,f,s,l=(u=qm(u)).length,h=!1;for(null==r&&(o=i(s=a())),c=0;c<=l;++c)!(c=l;--h)u.point(v[h],_[h]);u.lineEnd(),u.areaEnd()}y&&(v[s]=+t(d,s,f),_[s]=+n(d,s,f),u.point(r?+r(d,s,f):v[s],e?+e(d,s,f):_[s]))}if(p)return u=null,p+""||null}function s(){return Ym().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?Om:ym(+t),n="function"==typeof n?n:ym(void 0===n?0:+n),e="function"==typeof e?e:void 0===e?Bm:ym(+e),f.x=function(n){return arguments.length?(t="function"==typeof n?n:ym(+n),r=null,f):t},f.x0=function(n){return arguments.length?(t="function"==typeof n?n:ym(+n),f):t},f.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ym(+t),f):r},f.y=function(t){return arguments.length?(n="function"==typeof t?t:ym(+t),e=null,f):n},f.y0=function(t){return arguments.length?(n="function"==typeof t?t:ym(+t),f):n},f.y1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:ym(+t),f):e},f.lineX0=f.lineY0=function(){return s().x(t).y(n)},f.lineY1=function(){return s().x(t).y(e)},f.lineX1=function(){return s().x(r).y(n)},f.defined=function(t){return arguments.length?(i="function"==typeof t?t:ym(!!t),f):i},f.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),f):a},f.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),f):o},f}function jm(t,n){return nt?1:n>=t?0:NaN}function Hm(t){return t}Um.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Xm=Vm(Im);function Gm(t){this._curve=t}function Vm(t){function n(n){return new Gm(t(n))}return n._curve=t,n}function Wm(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(Vm(t)):n()._curve},t}function Zm(){return Wm(Ym().curve(Xm))}function Km(){var t=Lm().curve(Xm),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Wm(e())},delete t.lineX0,t.lineEndAngle=function(){return Wm(r())},delete t.lineX1,t.lineInnerRadius=function(){return Wm(i())},delete t.lineY0,t.lineOuterRadius=function(){return Wm(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(Vm(t)):n()._curve},t}function Qm(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}Gm.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class Jm{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class tx{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0===this._point)this._point=1;else{const e=Qm(this._x0,this._y0),r=Qm(this._x0,this._y0=(this._y0+n)/2),i=Qm(t,this._y0),o=Qm(t,n);this._context.moveTo(...e),this._context.bezierCurveTo(...r,...i,...o)}this._x0=t,this._y0=n}}function nx(t){return new Jm(t,!0)}function ex(t){return new Jm(t,!1)}function rx(t){return new tx(t)}function ix(t){return t.source}function ox(t){return t.target}function ax(t){let n=ix,e=ox,r=Om,i=Bm,o=null,a=null,u=km(c);function c(){let c;const f=Fm.call(arguments),s=n.apply(this,f),l=e.apply(this,f);if(null==o&&(a=t(c=u())),a.lineStart(),f[0]=s,a.point(+r.apply(this,f),+i.apply(this,f)),f[0]=l,a.point(+r.apply(this,f),+i.apply(this,f)),a.lineEnd(),c)return a=null,c+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(e=t,c):e},c.x=function(t){return arguments.length?(r="function"==typeof t?t:ym(+t),c):r},c.y=function(t){return arguments.length?(i="function"==typeof t?t:ym(+t),c):i},c.context=function(n){return arguments.length?(null==n?o=a=null:a=t(o=n),c):o},c}const ux=Mm(3);var cx={draw(t,n){const e=.59436*Mm(n+xm(n/28,.75)),r=e/2,i=r*ux;t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},fx={draw(t,n){const e=Mm(n/Am);t.moveTo(e,0),t.arc(0,0,e,0,Em)}},sx={draw(t,n){const e=Mm(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}};const lx=Mm(1/3),hx=2*lx;var dx={draw(t,n){const e=Mm(n/hx),r=e*lx;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},px={draw(t,n){const e=.62625*Mm(n);t.moveTo(0,-e),t.lineTo(e,0),t.lineTo(0,e),t.lineTo(-e,0),t.closePath()}},gx={draw(t,n){const e=.87559*Mm(n-xm(n/7,2));t.moveTo(-e,0),t.lineTo(e,0),t.moveTo(0,e),t.lineTo(0,-e)}},yx={draw(t,n){const e=Mm(n),r=-e/2;t.rect(r,r,e,e)}},vx={draw(t,n){const e=.4431*Mm(n);t.moveTo(e,e),t.lineTo(e,-e),t.lineTo(-e,-e),t.lineTo(-e,e),t.closePath()}};const _x=wm(Am/10)/wm(7*Am/10),bx=wm(Em/10)*_x,mx=-bm(Em/10)*_x;var xx={draw(t,n){const e=Mm(.8908130915292852*n),r=bx*e,i=mx*e;t.moveTo(0,-e),t.lineTo(r,i);for(let n=1;n<5;++n){const o=Em*n/5,a=bm(o),u=wm(o);t.lineTo(u*e,-a*e),t.lineTo(a*r-u*i,u*r+a*i)}t.closePath()}};const wx=Mm(3);var Mx={draw(t,n){const e=-Mm(n/(3*wx));t.moveTo(0,2*e),t.lineTo(-wx*e,-e),t.lineTo(wx*e,-e),t.closePath()}};const Tx=Mm(3);var Ax={draw(t,n){const e=.6824*Mm(n),r=e/2,i=e*Tx/2;t.moveTo(0,-e),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}};const Sx=-.5,Ex=Mm(3)/2,Nx=1/Mm(12),kx=3*(Nx/2+1);var Cx={draw(t,n){const e=Mm(n/kx),r=e/2,i=e*Nx,o=r,a=e*Nx+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(Sx*r-Ex*i,Ex*r+Sx*i),t.lineTo(Sx*o-Ex*a,Ex*o+Sx*a),t.lineTo(Sx*u-Ex*c,Ex*u+Sx*c),t.lineTo(Sx*r+Ex*i,Sx*i-Ex*r),t.lineTo(Sx*o+Ex*a,Sx*a-Ex*o),t.lineTo(Sx*u+Ex*c,Sx*c-Ex*u),t.closePath()}},Px={draw(t,n){const e=.6189*Mm(n-xm(n/6,1.7));t.moveTo(-e,-e),t.lineTo(e,e),t.moveTo(-e,e),t.lineTo(e,-e)}};const zx=[fx,sx,dx,yx,xx,Mx,Cx],$x=[fx,gx,Px,Ax,cx,vx,px];function Dx(){}function Rx(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function Fx(t){this._context=t}function qx(t){this._context=t}function Ux(t){this._context=t}function Ix(t,n){this._basis=new Fx(t),this._beta=n}Fx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Rx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Rx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},qx.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Rx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Ux.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Rx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Ix.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Ox=function t(n){function e(t){return 1===n?new Fx(t):new Ix(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Bx(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Yx(t,n){this._context=t,this._k=(1-n)/6}Yx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bx(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Bx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lx=function t(n){function e(t){return new Yx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function jx(t,n){this._context=t,this._k=(1-n)/6}jx.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Bx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Hx=function t(n){function e(t){return new jx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Xx(t,n){this._context=t,this._k=(1-n)/6}Xx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Gx=function t(n){function e(t){return new Xx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Vx(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Tm){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Tm){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Wx(t,n){this._context=t,this._alpha=n}Wx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Vx(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Zx=function t(n){function e(t){return n?new Wx(t,n):new Yx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Kx(t,n){this._context=t,this._alpha=n}Kx.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Vx(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Qx=function t(n){function e(t){return n?new Kx(t,n):new jx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Jx(t,n){this._context=t,this._alpha=n}Jx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vx(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var tw=function t(n){function e(t){return n?new Jx(t,n):new Xx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function nw(t){this._context=t}function ew(t){return t<0?-1:1}function rw(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(ew(o)+ew(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function iw(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function ow(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function aw(t){this._context=t}function uw(t){this._context=new cw(t)}function cw(t){this._context=t}function fw(t){this._context=t}function sw(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n1)for(var e,r,i,o=1,a=t[n[0]],u=a.length;o=0;)e[n]=n;return e}function pw(t,n){return t[n]}function gw(t){const n=[];return n.key=t,n}function yw(t){var n=t.map(vw);return dw(t).sort((function(t,e){return n[t]-n[e]}))}function vw(t){for(var n,e=-1,r=0,i=t.length,o=-1/0;++eo&&(o=n,r=e);return r}function _w(t){var n=t.map(bw);return dw(t).sort((function(t,e){return n[t]-n[e]}))}function bw(t){for(var n,e=0,r=-1,i=t.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var mw=t=>()=>t;function xw(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ww(t,n,e){this.k=t,this.x=n,this.y=e}ww.prototype={constructor:ww,scale:function(t){return 1===t?this:new ww(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ww(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mw=new ww(1,0,0);function Tw(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Mw;return t.__zoom}function Aw(t){t.stopImmediatePropagation()}function Sw(t){t.preventDefault(),t.stopImmediatePropagation()}function Ew(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Nw(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function kw(){return this.__zoom||Mw}function Cw(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Pw(){return navigator.maxTouchPoints||"ontouchstart"in this}function zw(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}Tw.prototype=ww.prototype,t.Adder=A,t.Delaunay=ju,t.FormatSpecifier=nf,t.InternMap=InternMap,t.InternSet=InternSet,t.Node=Jd,t.Path=Ia,t.Voronoi=Uu,t.ZoomTransform=ww,t.active=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+"",i)if((e=i[r]).state>Ui&&e.name===n)return new go([[t]],Ko,n,+r);return null},t.arc=function(){var t=Cm,n=Pm,e=ym(0),r=null,i=zm,o=$m,a=Dm,u=null,c=km(f);function f(){var f,s,l=+t.apply(this,arguments),h=+n.apply(this,arguments),d=i.apply(this,arguments)-Sm,p=o.apply(this,arguments)-Sm,g=vm(p-d),y=p>d;if(u||(u=f=c()),hTm)if(g>Em-Tm)u.moveTo(h*bm(d),h*wm(d)),u.arc(0,0,h,d,p,!y),l>Tm&&(u.moveTo(l*bm(p),l*wm(p)),u.arc(0,0,l,p,d,y));else{var v,_,b=d,m=p,x=d,w=p,M=g,T=g,A=a.apply(this,arguments)/2,S=A>Tm&&(r?+r.apply(this,arguments):Mm(l*l+h*h)),E=xm(vm(h-l)/2,+e.apply(this,arguments)),N=E,k=E;if(S>Tm){var C=Nm(S/l*wm(A)),P=Nm(S/h*wm(A));(M-=2*C)>Tm?(x+=C*=y?1:-1,w-=C):(M=0,x=w=(d+p)/2),(T-=2*P)>Tm?(b+=P*=y?1:-1,m-=P):(T=0,b=m=(d+p)/2)}var z=h*bm(b),$=h*wm(b),D=l*bm(w),R=l*wm(w);if(E>Tm){var F,q=h*bm(m),U=h*wm(m),I=l*bm(x),O=l*wm(x);if(g1?0:t<-1?Am:Math.acos(t)}((B*L+Y*j)/(Mm(B*B+Y*Y)*Mm(L*L+j*j)))/2),X=Mm(F[0]*F[0]+F[1]*F[1]);N=xm(E,(l-X)/(H-1)),k=xm(E,(h-X)/(H+1))}else N=k=0}T>Tm?k>Tm?(v=Rm(I,O,z,$,h,k,y),_=Rm(q,U,D,R,h,k,y),u.moveTo(v.cx+v.x01,v.cy+v.y01),kTm&&M>Tm?N>Tm?(v=Rm(D,R,q,U,l,-N,y),_=Rm(z,$,I,O,l,-N,y),u.lineTo(v.cx+v.x01,v.cy+v.y01),N=0))throw new RangeError("invalid r");let e=t.length;if(!((e=Math.floor(e))>=0))throw new RangeError("invalid length");if(!e||!n)return t;const r=v(n),i=t.slice();return r(t,i,0,e,1),r(i,t,0,e,1),r(t,i,0,e,1),t},t.blur2=h,t.blurImage=d,t.brush=function(){return Ma(ha)},t.brushSelection=function(t){var n=t.__brush;return n?n.dim.output(n.selection):null},t.brushX=function(){return Ma(sa)},t.brushY=function(){return Ma(la)},t.buffer=function(t,n){return fetch(t,n).then(bc)},t.chord=function(){return $a(!1,!1)},t.chordDirected=function(){return $a(!0,!1)},t.chordTranspose=function(){return $a(!1,!0)},t.cluster=function(){var t=jd,n=1,e=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Hd,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Xd,0)}(e)):(n.x=o?a+=t(n,o):0,n.y=0,o=n)}));var u=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=u.x-t(u,c)/2,s=c.x+t(c,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.color=$e,t.contourDensity=function(){var t=su,n=lu,e=hu,r=960,i=500,o=20,a=2,u=3*o,c=r+2*u>>a,f=i+2*u>>a,s=Ja(20);function l(r){var i=new Float32Array(c*f),s=Math.pow(2,-a),l=-1;for(const o of r){var d=(t(o,++l,r)+u)*s,p=(n(o,l,r)+u)*s,g=+e(o,l,r);if(g&&d>=0&&d=0&&pt*r)))(n).map(((t,n)=>(t.value=+e[n],p(t))))}function p(t){return t.coordinates.forEach(g),t}function g(t){t.forEach(y)}function y(t){t.forEach(v)}function v(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function _(){return c=r+2*(u=3*o)>>a,f=i+2*u>>a,d}return d.contours=function(t){var n=l(t),e=ou().size([c,f]),r=Math.pow(2,2*a),i=t=>{t=+t;var i=p(e.contour(n,t*r));return i.value=t,i};return Object.defineProperty(i,"max",{get:()=>tt(n)/r}),i},d.x=function(n){return arguments.length?(t="function"==typeof n?n:Ja(+n),d):t},d.y=function(t){return arguments.length?(n="function"==typeof t?t:Ja(+t),d):n},d.weight=function(t){return arguments.length?(e="function"==typeof t?t:Ja(+t),d):e},d.size=function(t){if(!arguments.length)return[r,i];var n=+t[0],e=+t[1];if(!(n>=0&&e>=0))throw new Error("invalid size");return r=n,i=e,_()},d.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(t)/Math.LN2),_()},d.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?Ja(Ka.call(t)):Ja(t),d):s},d.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*t*t+1)-1)/2,_()},d},t.contours=ou,t.count=_,t.create=function(t){return Kn(Lt(t).call(document.documentElement))},t.creator=Lt,t.cross=function(...t){const n="function"==typeof t[t.length-1]&&function(t){return n=>t(...n)}(t.pop()),e=(t=t.map(x)).map(b),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||e.some(m))return o;for(;;){o.push(i.map(((n,e)=>t[e][n])));let a=r;for(;++i[a]===e[a];){if(0===a)return n?o.map(n):o;i[a--]=0}}},t.csv=Mc,t.csvFormat=ic,t.csvFormatBody=oc,t.csvFormatRow=uc,t.csvFormatRows=ac,t.csvFormatValue=cc,t.csvParse=ec,t.csvParseRows=rc,t.cubehelix=Ar,t.cumsum=function(t,n){var e=0,r=0;return Float64Array.from(t,void 0===n?t=>e+=+t||0:i=>e+=+n(i,r++,t)||0)},t.curveBasis=function(t){return new Fx(t)},t.curveBasisClosed=function(t){return new qx(t)},t.curveBasisOpen=function(t){return new Ux(t)},t.curveBumpX=nx,t.curveBumpY=ex,t.curveBundle=Ox,t.curveCardinal=Lx,t.curveCardinalClosed=Hx,t.curveCardinalOpen=Gx,t.curveCatmullRom=Zx,t.curveCatmullRomClosed=Qx,t.curveCatmullRomOpen=tw,t.curveLinear=Im,t.curveLinearClosed=function(t){return new nw(t)},t.curveMonotoneX=function(t){return new aw(t)},t.curveMonotoneY=function(t){return new uw(t)},t.curveNatural=function(t){return new fw(t)},t.curveStep=function(t){return new lw(t,.5)},t.curveStepAfter=function(t){return new lw(t,1)},t.curveStepBefore=function(t){return new lw(t,0)},t.descending=e,t.deviation=M,t.difference=function(t,...n){t=new InternSet(t);for(const e of n)for(const n of e)t.delete(n);return t},t.disjoint=function(t,n){const e=n[Symbol.iterator](),r=new InternSet;for(const n of t){if(r.has(n))return!1;let t,i;for(;({value:t,done:i}=e.next())&&!i;){if(Object.is(n,t))return!1;r.add(t)}}return!0},t.dispatch=Dt,t.drag=function(){var t,n,e,r,i=le,o=he,a=de,u=pe,c={},f=Dt("start","drag","end"),s=0,l=0;function h(t){t.on("mousedown.drag",d).filter(u).on("touchstart.drag",y).on("touchmove.drag",v,re).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(a,u){if(!r&&i.call(this,a,u)){var c=b(this,o.call(this,a,u),a,u,"mouse");c&&(Kn(a.view).on("mousemove.drag",p,ie).on("mouseup.drag",g,ie),ue(a.view),oe(a),e=!1,t=a.clientX,n=a.clientY,c("start",a))}}function p(r){if(ae(r),!e){var i=r.clientX-t,o=r.clientY-n;e=i*i+o*o>l}c.mouse("drag",r)}function g(t){Kn(t.view).on("mousemove.drag mouseup.drag",null),ce(t.view,e),ae(t),c.mouse("end",t)}function y(t,n){if(i.call(this,t,n)){var e,r,a=t.changedTouches,u=o.call(this,t,n),c=a.length;for(e=0;e+t,t.easePoly=Mo,t.easePolyIn=xo,t.easePolyInOut=Mo,t.easePolyOut=wo,t.easeQuad=bo,t.easeQuadIn=function(t){return t*t},t.easeQuadInOut=bo,t.easeQuadOut=function(t){return t*(2-t)},t.easeSin=So,t.easeSinIn=function(t){return 1==+t?1:1-Math.cos(t*Ao)},t.easeSinInOut=So,t.easeSinOut=function(t){return Math.sin(t*Ao)},t.every=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(!n(r,++e,t))return!1;return!0},t.extent=T,t.fcumsum=function(t,n){const e=new A;let r=-1;return Float64Array.from(t,void 0===n?t=>e.add(+t||0):i=>e.add(+n(i,++r,t)||0))},t.filter=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");const e=[];let r=-1;for(const i of t)n(i,++r,t)&&e.push(i);return e},t.flatGroup=function(t,...n){return $(z(t,...n),n)},t.flatRollup=function(t,n,...e){return $(R(t,n,...e),e)},t.forceCenter=function(t,n){var e,r=1;function i(){var i,o,a=e.length,u=0,c=0;for(i=0;if+p||os+p||ac.index){var g=f-u.x-u.vx,y=s-u.y-u.vy,v=g*g+y*y;vt.r&&(t.r=t[n].r)}function c(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r[u(t,n,r),t])));for(a=0,i=new Array(f);a=u)){(t.data!==n||t.next)&&(0===l&&(p+=(l=Ic(e))*l),0===h&&(p+=(h=Ic(e))*h),p(t=(jc*t+Hc)%Xc)/Xc}();function l(){h(),f.call("tick",n),e1?(null==e?u.delete(t):u.set(t,p(e)),n):u.get(t)},find:function(n,e,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=Uc(.1);function o(t){for(var i,o=0,a=n.length;o=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++eHs(r[0],r[1])&&(r[1]=i[1]),Hs(i[0],r[1])>Hs(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=Hs(r[1],i[0]))>a&&(a=u,Zf=i[0],Qf=r[1])}return os=as=null,Zf===1/0||Kf===1/0?[[NaN,NaN],[NaN,NaN]]:[[Zf,Kf],[Qf,Jf]]},t.geoCentroid=function(t){xs=ws=Ms=Ts=As=Ss=Es=Ns=0,ks=new A,Cs=new A,Ps=new A,jf(t,Vs);var n=+ks,e=+Cs,r=+Ps,i=Nf(n,e,r);return i=0))throw new RangeError(`invalid digits: ${t}`);i=n}return null===n&&(r=new rd(i)),a},a.projection(t).digits(i).context(n)},t.geoProjection=vd,t.geoProjectionMutator=_d,t.geoRotation=hl,t.geoStereographic=function(){return vd(Yd).scale(250).clipAngle(142)},t.geoStereographicRaw=Yd,t.geoStream=jf,t.geoTransform=function(t){return{stream:od(t)}},t.geoTransverseMercator=function(){var t=Nd(Ld),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=Ld,t.gray=function(t,n){return new cr(t,0,0,null==n?1:n)},t.greatest=at,t.greatestIndex=function(t,e=n){if(1===e.length)return nt(t,e);let r,i=-1,o=-1;for(const n of t)++o,(i<0?0===e(n,n):e(n,r)>0)&&(r=n,i=o);return i},t.group=P,t.groupSort=function(t,e,r){return(2!==e.length?I(D(t,e,r),(([t,e],[r,i])=>n(e,i)||n(t,r))):I(P(t,r),(([t,r],[i,o])=>e(r,o)||n(t,i)))).map((([t])=>t))},t.groups=z,t.hcl=pr,t.hierarchy=Vd,t.histogram=J,t.hsl=Xe,t.html=Nc,t.image=function(t,n){return new Promise((function(e,r){var i=new Image;for(var o in n)i[o]=n[o];i.onerror=r,i.onload=function(){e(i)},i.src=t}))},t.index=function(t,...n){return q(t,C,F,n)},t.indexes=function(t,...n){return q(t,Array.from,F,n)},t.interpolate=Vr,t.interpolateArray=function(t,n){return(Or(n)?Ir:Br)(t,n)},t.interpolateBasis=Nr,t.interpolateBasisClosed=kr,t.interpolateBlues=Gb,t.interpolateBrBG=ob,t.interpolateBuGn=Mb,t.interpolateBuPu=Ab,t.interpolateCividis=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},t.interpolateCool=am,t.interpolateCubehelix=hi,t.interpolateCubehelixDefault=im,t.interpolateCubehelixLong=di,t.interpolateDate=Yr,t.interpolateDiscrete=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},t.interpolateGnBu=Eb,t.interpolateGreens=Wb,t.interpolateGreys=Kb,t.interpolateHcl=fi,t.interpolateHclLong=si,t.interpolateHsl=ai,t.interpolateHslLong=ui,t.interpolateHue=function(t,n){var e=zr(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},t.interpolateInferno=pm,t.interpolateLab=function(t,n){var e=Dr((t=ur(t)).l,(n=ur(n)).l),r=Dr(t.a,n.a),i=Dr(t.b,n.b),o=Dr(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}},t.interpolateMagma=dm,t.interpolateNumber=Lr,t.interpolateNumberArray=Ir,t.interpolateObject=jr,t.interpolateOrRd=kb,t.interpolateOranges=rm,t.interpolatePRGn=ub,t.interpolatePiYG=fb,t.interpolatePlasma=gm,t.interpolatePuBu=$b,t.interpolatePuBuGn=Pb,t.interpolatePuOr=lb,t.interpolatePuRd=Rb,t.interpolatePurples=Jb,t.interpolateRainbow=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return um.h=360*t-100,um.s=1.5-1.5*n,um.l=.8-.9*n,um+""},t.interpolateRdBu=db,t.interpolateRdGy=gb,t.interpolateRdPu=qb,t.interpolateRdYlBu=vb,t.interpolateRdYlGn=bb,t.interpolateReds=nm,t.interpolateRgb=Rr,t.interpolateRgbBasis=qr,t.interpolateRgbBasisClosed=Ur,t.interpolateRound=Wr,t.interpolateSinebow=function(t){var n;return t=(.5-t)*Math.PI,cm.r=255*(n=Math.sin(t))*n,cm.g=255*(n=Math.sin(t+fm))*n,cm.b=255*(n=Math.sin(t+sm))*n,cm+""},t.interpolateSpectral=xb,t.interpolateString=Gr,t.interpolateTransformCss=ni,t.interpolateTransformSvg=ei,t.interpolateTurbo=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},t.interpolateViridis=hm,t.interpolateWarm=om,t.interpolateYlGn=Bb,t.interpolateYlGnBu=Ib,t.interpolateYlOrBr=Lb,t.interpolateYlOrRd=Hb,t.interpolateZoom=ii,t.interrupt=Vi,t.intersection=function(t,...n){t=new InternSet(t),n=n.map(_t);t:for(const e of t)for(const r of n)if(!r.has(e)){t.delete(e);continue t}return t},t.interval=function(t,n,e){var r=new Ni,i=n;return null==n?(r.restart(t,n,e),r):(r._restart=r.restart,r.restart=function(t,n,e){n=+n,e=null==e?Si():+e,r._restart((function o(a){a+=i,r._restart(o,i+=n,e),t(a)}),n,e)},r.restart(t,n,e),r)},t.isoFormat=R_,t.isoParse=q_,t.json=function(t,n){return fetch(t,n).then(Ac)},t.lab=ur,t.lch=function(t,n,e,r){return 1===arguments.length?dr(t):new gr(e,n,t,null==r?1:r)},t.least=function(t,e=n){let r,i=!1;if(1===e.length){let o;for(const a of t){const t=e(a);(i?n(t,o)<0:0===n(t,t))&&(r=a,o=t,i=!0)}}else for(const n of t)(i?e(n,r)<0:0===e(n,n))&&(r=n,i=!0);return r},t.leastIndex=dt,t.line=Ym,t.lineRadial=Zm,t.link=ax,t.linkHorizontal=function(){return ax(nx)},t.linkRadial=function(){const t=ax(rx);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return ax(ex)},t.local=Jn,t.map=function(t,n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof n)throw new TypeError("mapper is not a function");return Array.from(t,((e,r)=>n(e,r,t)))},t.matcher=Wt,t.max=tt,t.maxIndex=nt,t.mean=function(t,n){let e=0,r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++e,r+=n);else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(o=+o)>=o&&(++e,r+=o)}if(e)return r/e},t.median=function(t,n){return ut(t,.5,n)},t.medianIndex=function(t,n){return ft(t,.5,n)},t.merge=st,t.min=et,t.minIndex=rt,t.mode=function(t,n){const e=new InternMap;if(void 0===n)for(let n of t)null!=n&&n>=n&&e.set(n,(e.get(n)||0)+1);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&i>=i&&e.set(i,(e.get(i)||0)+1)}let r,i=0;for(const[t,n]of e)n>i&&(i=n,r=t);return r},t.namespace=Ot,t.namespaces=It,t.nice=K,t.now=Si,t.pack=function(){var t=null,n=1,e=1,r=ep;function i(i){const o=up();return i.x=n/2,i.y=e/2,t?i.eachBefore(wp(t)).eachAfter(Mp(r,.5,o)).eachBefore(Tp(1)):i.eachBefore(wp(xp)).eachAfter(Mp(ep,1,o)).eachAfter(Mp(r,i.r/Math.min(n,e),o)).eachBefore(Tp(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=tp(n),i):t},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:rp(+t),i):r},i},t.packEnclose=function(t){return cp(t,up())},t.packSiblings=function(t){return mp(t,up()),t},t.pairs=function(t,n=lt){const e=[];let r,i=!1;for(const o of t)i&&e.push(n(r,o)),r=o,i=!0;return e},t.partition=function(){var t=1,n=1,e=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/o,i.eachBefore(function(t,n){return function(r){r.children&&Sp(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,o=r.y0,a=r.x1-e,u=r.y1-e;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(a[t],a[n])})),u=0,f=d?(v-h*b)/d:0;u0?l*f:0)+b,g[c]={data:a[c],index:u,value:l,startAngle:y,endAngle:s,padAngle:_};return g}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:ym(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:ym(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:ym(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:ym(+t),a):o},a},t.piecewise=pi,t.pointRadial=Qm,t.pointer=ee,t.pointers=function(t,n){return t.target&&(t=ne(t),void 0===n&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>ee(t,n)))},t.polygonArea=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++eu!=f>u&&a<(c-e)*(u-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},t.polygonHull=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[o[n]][2]]);for(n=+u;n(n=1664525*n+1013904223|0,hg*(n>>>0))},t.randomLogNormal=Qp,t.randomLogistic=sg,t.randomNormal=Kp,t.randomPareto=eg,t.randomPoisson=lg,t.randomUniform=Wp,t.randomWeibull=cg,t.range=ht,t.rank=function(t,e=n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");let r=Array.from(t);const i=new Float64Array(r.length);2!==e.length&&(r=r.map(e),e=n);const o=(t,n)=>e(r[t],r[n]);let a,u;return(t=Uint32Array.from(r,((t,n)=>n))).sort(e===n?(t,n)=>B(r[t],r[n]):O(o)),t.forEach(((t,n)=>{const e=o(t,void 0===a?t:a);e>=0?((void 0===a||e>0)&&(a=t,u=n),i[t]=u):i[t]=NaN})),i},t.reduce=function(t,n,e){if("function"!=typeof n)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if(({done:i,value:e}=r.next()),i)return;++a}for(;({done:i,value:o}=r.next()),!i;)e=n(e,o,++a,t);return e},t.reverse=function(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()},t.rgb=qe,t.ribbon=function(){return Za()},t.ribbonArrow=function(){return Za(Wa)},t.rollup=D,t.rollups=R,t.scaleBand=vg,t.scaleDiverging=function t(){var n=kg(j_()(xg));return n.copy=function(){return Y_(n,t())},pg.apply(n,arguments)},t.scaleDivergingLog=function t(){var n=qg(j_()).domain([.1,1,10]);return n.copy=function(){return Y_(n,t()).base(n.base())},pg.apply(n,arguments)},t.scaleDivergingPow=H_,t.scaleDivergingSqrt=function(){return H_.apply(null,arguments).exponent(.5)},t.scaleDivergingSymlog=function t(){var n=Og(j_());return n.copy=function(){return Y_(n,t()).constant(n.constant())},pg.apply(n,arguments)},t.scaleIdentity=function t(n){var e;function r(t){return null==t||isNaN(t=+t)?e:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(n=Array.from(t,bg),r):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return t(n).unknown(e)},n=arguments.length?Array.from(n,bg):[0,1],kg(r)},t.scaleImplicit=gg,t.scaleLinear=function t(){var n=Eg();return n.copy=function(){return Ag(n,t())},dg.apply(n,arguments),kg(n)},t.scaleLog=function t(){const n=qg(Sg()).domain([1,10]);return n.copy=()=>Ag(n,t()).base(n.base()),dg.apply(n,arguments),n},t.scaleOrdinal=yg,t.scalePoint=function(){return _g(vg.apply(null,arguments).paddingInner(1))},t.scalePow=Hg,t.scaleQuantile=function t(){var e,r=[],i=[],o=[];function a(){var t=0,n=Math.max(1,i.length);for(o=new Array(n-1);++t0?o[n-1]:r[0],n=i?[o[i-1],r]:[o[n-1],o[n]]},u.unknown=function(t){return arguments.length?(n=t,u):u},u.thresholds=function(){return o.slice()},u.copy=function(){return t().domain([e,r]).range(a).unknown(n)},dg.apply(kg(u),arguments)},t.scaleRadial=function t(){var n,e=Eg(),r=[0,1],i=!1;function o(t){var r=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(t));return isNaN(r)?n:i?Math.round(r):r}return o.invert=function(t){return e.invert(Xg(t))},o.domain=function(t){return arguments.length?(e.domain(t),o):e.domain()},o.range=function(t){return arguments.length?(e.range((r=Array.from(t,bg)).map(Xg)),o):r.slice()},o.rangeRound=function(t){return o.range(t).round(!0)},o.round=function(t){return arguments.length?(i=!!t,o):i},o.clamp=function(t){return arguments.length?(e.clamp(t),o):e.clamp()},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t(e.domain(),r).round(i).clamp(e.clamp()).unknown(n)},dg.apply(o,arguments),kg(o)},t.scaleSequential=function t(){var n=kg(B_()(xg));return n.copy=function(){return Y_(n,t())},pg.apply(n,arguments)},t.scaleSequentialLog=function t(){var n=qg(B_()).domain([1,10]);return n.copy=function(){return Y_(n,t()).base(n.base())},pg.apply(n,arguments)},t.scaleSequentialPow=L_,t.scaleSequentialQuantile=function t(){var e=[],r=xg;function i(t){if(null!=t&&!isNaN(t=+t))return r((l(e,t,1)-1)/(e.length-1))}return i.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(n),i},i.interpolator=function(t){return arguments.length?(r=t,i):r},i.range=function(){return e.map(((t,n)=>r(n/(e.length-1))))},i.quantiles=function(t){return Array.from({length:t+1},((n,r)=>ut(e,r/t)))},i.copy=function(){return t(r).domain(e)},pg.apply(i,arguments)},t.scaleSequentialSqrt=function(){return L_.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var n=Og(B_());return n.copy=function(){return Y_(n,t()).constant(n.constant())},pg.apply(n,arguments)},t.scaleSqrt=function(){return Hg.apply(null,arguments).exponent(.5)},t.scaleSymlog=function t(){var n=Og(Sg());return n.copy=function(){return Ag(n,t()).constant(n.constant())},dg.apply(n,arguments)},t.scaleThreshold=function t(){var n,e=[.5],r=[0,1],i=1;function o(t){return null!=t&&t<=t?r[l(e,t,0,i)]:n}return o.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,r.length-1),o):e.slice()},o.range=function(t){return arguments.length?(r=Array.from(t),i=Math.min(e.length,r.length-1),o):r.slice()},o.invertExtent=function(t){var n=r.indexOf(t);return[e[n-1],e[n]]},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t().domain(e).range(r).unknown(n)},dg.apply(o,arguments)},t.scaleTime=function(){return dg.apply(O_(cv,fv,nv,Ky,wy,gy,ly,uy,oy,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return dg.apply(O_(av,uv,rv,Jy,qy,vy,dy,fy,oy,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scan=function(t,n){const e=dt(t,n);return e<0?void 0:e},t.schemeAccent=V_,t.schemeBlues=Xb,t.schemeBrBG=ib,t.schemeBuGn=wb,t.schemeBuPu=Tb,t.schemeCategory10=G_,t.schemeDark2=W_,t.schemeGnBu=Sb,t.schemeGreens=Vb,t.schemeGreys=Zb,t.schemeOrRd=Nb,t.schemeOranges=em,t.schemePRGn=ab,t.schemePaired=Z_,t.schemePastel1=K_,t.schemePastel2=Q_,t.schemePiYG=cb,t.schemePuBu=zb,t.schemePuBuGn=Cb,t.schemePuOr=sb,t.schemePuRd=Db,t.schemePurples=Qb,t.schemeRdBu=hb,t.schemeRdGy=pb,t.schemeRdPu=Fb,t.schemeRdYlBu=yb,t.schemeRdYlGn=_b,t.schemeReds=tm,t.schemeSet1=J_,t.schemeSet2=tb,t.schemeSet3=nb,t.schemeSpectral=mb,t.schemeTableau10=eb,t.schemeYlGn=Ob,t.schemeYlGnBu=Ub,t.schemeYlOrBr=Yb,t.schemeYlOrRd=jb,t.select=Kn,t.selectAll=function(t){return"string"==typeof t?new Wn([document.querySelectorAll(t)],[document.documentElement]):new Wn([Xt(t)],Vn)},t.selection=Zn,t.selector=Ht,t.selectorAll=Vt,t.shuffle=pt,t.shuffler=gt,t.some=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(n(r,++e,t))return!0;return!1},t.sort=I,t.stack=function(){var t=ym([]),n=dw,e=hw,r=pw;function i(i){var o,a,u=Array.from(t.apply(this,arguments),gw),c=u.length,f=-1;for(const t of i)for(o=0,++f;o0)for(var e,r,i,o,a,u,c=0,f=t[n[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},t.stackOffsetExpand=function(t,n){if((r=t.length)>0){for(var e,r,i,o=0,a=t[0].length;o0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;afunction(t){t=`${t}`;let n=t.length;$p(t,n-1)&&!$p(t,n-2)&&(t=t.slice(0,-1));return"/"===t[0]?t:`/${t}`}(t(n,e,r)))),e=n.map(zp),i=new Set(n).add("");for(const t of e)i.has(t)||(i.add(t),n.push(t),e.push(zp(t)),h.push(kp));d=(t,e)=>n[e],p=(t,n)=>e[n]}for(a=0,i=h.length;a=0&&(f=h[t]).data===kp;--t)f.data=null}if(u.parent=Ep,u.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(Qd),u.parent=null,i>0)throw new Error("cycle");return u}return r.id=function(t){return arguments.length?(n=tp(t),r):n},r.parentId=function(t){return arguments.length?(e=tp(t),r):e},r.path=function(n){return arguments.length?(t=tp(n),r):t},r},t.style=bn,t.subset=function(t,n){return bt(n,t)},t.sum=function(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e},t.superset=bt,t.svg=kc,t.symbol=function(t,n){let e=null,r=km(i);function i(){let i;if(e||(e=i=r()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return t="function"==typeof t?t:ym(t||fx),n="function"==typeof n?n:ym(void 0===n?64:+n),i.type=function(n){return arguments.length?(t="function"==typeof n?n:ym(n),i):t},i.size=function(t){return arguments.length?(n="function"==typeof t?t:ym(+t),i):n},i.context=function(t){return arguments.length?(e=null==t?null:t,i):e},i},t.symbolAsterisk=cx,t.symbolCircle=fx,t.symbolCross=sx,t.symbolDiamond=dx,t.symbolDiamond2=px,t.symbolPlus=gx,t.symbolSquare=yx,t.symbolSquare2=vx,t.symbolStar=xx,t.symbolTimes=Px,t.symbolTriangle=Mx,t.symbolTriangle2=Ax,t.symbolWye=Cx,t.symbolX=Px,t.symbols=zx,t.symbolsFill=zx,t.symbolsStroke=$x,t.text=xc,t.thresholdFreedmanDiaconis=function(t,n,e){const r=_(t),i=ut(t,.75)-ut(t,.25);return r&&i?Math.ceil((e-n)/(2*i*Math.pow(r,-1/3))):1},t.thresholdScott=function(t,n,e){const r=_(t),i=M(t);return r&&i?Math.ceil((e-n)*Math.cbrt(r)/(3.49*i)):1},t.thresholdSturges=Q,t.tickFormat=Ng,t.tickIncrement=W,t.tickStep=Z,t.ticks=V,t.timeDay=gy,t.timeDays=yy,t.timeFormatDefaultLocale=z_,t.timeFormatLocale=dv,t.timeFriday=Ey,t.timeFridays=Dy,t.timeHour=ly,t.timeHours=hy,t.timeInterval=Wg,t.timeMillisecond=Zg,t.timeMilliseconds=Kg,t.timeMinute=uy,t.timeMinutes=cy,t.timeMonday=My,t.timeMondays=Cy,t.timeMonth=Ky,t.timeMonths=Qy,t.timeSaturday=Ny,t.timeSaturdays=Ry,t.timeSecond=oy,t.timeSeconds=ay,t.timeSunday=wy,t.timeSundays=ky,t.timeThursday=Sy,t.timeThursdays=$y,t.timeTickInterval=fv,t.timeTicks=cv,t.timeTuesday=Ty,t.timeTuesdays=Py,t.timeWednesday=Ay,t.timeWednesdays=zy,t.timeWeek=wy,t.timeWeeks=ky,t.timeYear=nv,t.timeYears=ev,t.timeout=Di,t.timer=ki,t.timerFlush=Ci,t.transition=yo,t.transpose=yt,t.tree=function(){var t=Dp,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,a=new Ip(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new Ip(r[i],i)),e.parent=n;return(a.parent=new Ip(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),g=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,a=n,u=e,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=Fp(u),o=Rp(o),u&&o;)c=Rp(c),(a=Fp(a)).a=n,(i=u.z+l-o.z-f+t(u._,o._))>0&&(qp(Up(u,n,r),n,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!Fp(a)&&(a.t=u,a.m+=l-s),o&&!Rp(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.treemap=function(){var t=Lp,n=!1,e=1,r=1,i=[0],o=ep,a=ep,u=ep,c=ep,f=ep;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Ap),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}var l=f[n],h=r/2+l,d=n+1,p=e-1;for(;d>>1;f[g]c-o){var _=r?(i*v+a*y)/r:a;t(n,d,y,i,o,_,c),t(d,e,v,_,o,a,c)}else{var b=r?(o*v+c*y)/r:c;t(n,d,y,i,o,a,b),t(d,e,v,i,b,a,c)}}(0,c,t.value,n,e,r,i)},t.treemapDice=Sp,t.treemapResquarify=jp,t.treemapSlice=Op,t.treemapSliceDice=function(t,n,e,r,i){(1&t.depth?Op:Sp)(t,n,e,r,i)},t.treemapSquarify=Lp,t.tsv=Tc,t.tsvFormat=hc,t.tsvFormatBody=dc,t.tsvFormatRow=gc,t.tsvFormatRows=pc,t.tsvFormatValue=yc,t.tsvParse=sc,t.tsvParseRows=lc,t.union=function(...t){const n=new InternSet;for(const e of t)for(const t of e)n.add(t);return n},t.unixDay=by,t.unixDays=my,t.utcDay=vy,t.utcDays=_y,t.utcFriday=Yy,t.utcFridays=Wy,t.utcHour=dy,t.utcHours=py,t.utcMillisecond=Zg,t.utcMilliseconds=Kg,t.utcMinute=fy,t.utcMinutes=sy,t.utcMonday=Uy,t.utcMondays=Hy,t.utcMonth=Jy,t.utcMonths=tv,t.utcSaturday=Ly,t.utcSaturdays=Zy,t.utcSecond=oy,t.utcSeconds=ay,t.utcSunday=qy,t.utcSundays=jy,t.utcThursday=By,t.utcThursdays=Vy,t.utcTickInterval=uv,t.utcTicks=av,t.utcTuesday=Iy,t.utcTuesdays=Xy,t.utcWednesday=Oy,t.utcWednesdays=Gy,t.utcWeek=qy,t.utcWeeks=jy,t.utcYear=rv,t.utcYears=iv,t.variance=w,t.version="7.8.4",t.window=gn,t.xml=Ec,t.zip=function(){return yt(arguments)},t.zoom=function(){var t,n,e,r=Ew,i=Nw,o=zw,a=Cw,u=Pw,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=ii,h=Dt("start","zoom","end"),d=500,p=150,g=0,y=10;function v(t){t.property("__zoom",kw).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",S).filter(u).on("touchstart.zoom",E).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new ww(n,t.x,t.y)}function b(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ww(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e,r){t.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,a=w(t,o).event(r),u=i.apply(t,o),c=null==e?m(u):"function"==typeof e?e.apply(t,o):e,f=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),s=t.__zoom,h="function"==typeof n?n.apply(t,o):n,d=l(s.invert(c).concat(f/s.k),h.invert(c).concat(f/h.k));return function(t){if(1===t)t=h;else{var n=d(t),e=f/n[2];t=new ww(e,c[0]-n[0]*e,c[1]-n[1]*e)}a.zoom(null,t)}}))}function w(t,n,e){return!e&&t.__zooming||new M(t,n)}function M(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,n),this.taps=0}function T(t,...n){if(r.apply(this,arguments)){var e=w(this,n).event(t),i=this.__zoom,u=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,a.apply(this,arguments)))),s=ee(t);if(e.wheel)e.mouse[0][0]===s[0]&&e.mouse[0][1]===s[1]||(e.mouse[1]=i.invert(e.mouse[0]=s)),clearTimeout(e.wheel);else{if(i.k===u)return;e.mouse=[s,i.invert(s)],Vi(this),e.start()}Sw(t),e.wheel=setTimeout((function(){e.wheel=null,e.end()}),p),e.zoom("mouse",o(b(_(i,u),e.mouse[0],e.mouse[1]),e.extent,f))}}function A(t,...n){if(!e&&r.apply(this,arguments)){var i=t.currentTarget,a=w(this,n,!0).event(t),u=Kn(t.view).on("mousemove.zoom",(function(t){if(Sw(t),!a.moved){var n=t.clientX-s,e=t.clientY-l;a.moved=n*n+e*e>g}a.event(t).zoom("mouse",o(b(a.that.__zoom,a.mouse[0]=ee(t,i),a.mouse[1]),a.extent,f))}),!0).on("mouseup.zoom",(function(t){u.on("mousemove.zoom mouseup.zoom",null),ce(t.view,a.moved),Sw(t),a.event(t).end()}),!0),c=ee(t,i),s=t.clientX,l=t.clientY;ue(t.view),Aw(t),a.mouse=[c,this.__zoom.invert(c)],Vi(this),a.start()}}function S(t,...n){if(r.apply(this,arguments)){var e=this.__zoom,a=ee(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(a),c=e.k*(t.shiftKey?.5:2),l=o(b(_(e,c),a,u),i.apply(this,n),f);Sw(t),s>0?Kn(this).transition().duration(s).call(x,l,a,t):Kn(this).call(v.transform,l,a,t)}}function E(e,...i){if(r.apply(this,arguments)){var o,a,u,c,f=e.touches,s=f.length,l=w(this,i,e.changedTouches.length===s).event(e);for(Aw(e),a=0;a1)e=o(r,n,t);else for(a=0,e=new Array(i=r.arcs.length);a1)for(var o,a,c=1,f=i(e[0]);cf&&(a=e[0],e[0]=e[c],e[c]=a,f=o);return e})}}function u(r,n,t,e){c(r,n,t),c(r,n,n+e),c(r,n+e,t)}function c(r,n,t){for(var e,o=n+(t---n>>1);n=1)return r[t-1];var t,e=(t-1)*n,o=Math.floor(e),a=r[o];return a+(r[o+1]-a)*(e-o)}}function x(r,n){return n-r}function w(r,n){for(var t,e,o,a=0,i=r.length,u=0,c=r[n?a++:i-1],f=c[0]*rr,s=c[1]*rr/2+$,l=er(s),h=or(s);a=0?1:-1,y=g*p,v=o*h,b=e*l+v*er(y),m=v*g*or(y);u+=tr(m,b)}return u}var k=function(r){return r},A=function(r){if(null==r)return k;var n,t,e=r.scale[0],o=r.scale[1],a=r.translate[0],i=r.translate[1];return function(r,u){u||(n=t=0);var c=2,f=r.length,s=new Array(f);for(s[0]=(n+=r[0])*e+a,s[1]=(t+=r[1])*o+i;cu&&(u=r[0]),r[1]c&&(c=r[1])}function t(r){switch(r.type){case"GeometryCollection":r.geometries.forEach(t);break;case"Point":n(r.coordinates);break;case"MultiPoint":r.coordinates.forEach(n)}}var e,o=A(r.transform),a=1/0,i=a,u=-a,c=-a;r.arcs.forEach(function(r){for(var n,t=-1,e=r.length;++tu&&(u=n[0]),n[1]c&&(c=n[1])});for(e in r.objects)t(r.objects[e]);return[a,i,u,c]},C=function(r,n){for(var t,e=r.length,o=e-n;o<--e;)t=r[o],r[o++]=r[e],r[e]=t},S=function(r,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return n(r,t)})}:n(r,t)},G=function(r,n){function t(n){var t,e=r.arcs[n<0?~n:n],o=e[0];return r.transform?(t=[0,0],e.forEach(function(r){t[0]+=r[0],t[1]+=r[1]})):t=e[e.length-1],n<0?[t,o]:[o,t]}function e(r,n){for(var t in r){var e=r[t];delete n[e.start],delete e.start,delete e.end,e.forEach(function(r){o[r<0?~r:r]=1}),u.push(e)}}var o={},a={},i={},u=[],c=-1;return n.forEach(function(t,e){var o,a=r.arcs[t<0?~t:t];a.length<3&&!a[1][0]&&!a[1][1]&&(o=n[++c],n[c]=t,n[e]=o)}),n.forEach(function(r){var n,e,o=t(r),u=o[0],c=o[1];if(n=i[u])if(delete i[n.end],n.push(r),n.end=c,e=a[c]){delete a[e.start];var f=e===n?n:n.concat(e);a[f.start=n.start]=i[f.end=e.end]=f}else a[n.start]=i[n.end]=n;else if(n=a[c])if(delete a[n.start],n.unshift(r),n.start=u,e=i[u]){delete i[e.end];var s=e===n?n:e.concat(n);a[s.start=e.start]=i[s.end=n.end]=s}else a[n.start]=i[n.end]=n;else a[(n=[r]).start=u]=i[n.end=c]=n}),e(i,a),e(a,i),n.forEach(function(r){o[r<0?~r:r]||u.push([r])}),u},j=function(r,n){for(var t=0,e=r.length;t>>1;r[o]u&&(u=n),tc&&(c=t)}function e(r){r.forEach(t)}function o(r){r.forEach(e)}var a=1/0,i=1/0,u=-1/0,c=-1/0,f={GeometryCollection:function(r){r.geometries.forEach(n)},Point:function(r){t(r.coordinates)},MultiPoint:function(r){r.coordinates.forEach(t)},LineString:function(r){e(r.arcs)},MultiLineString:function(r){r.arcs.forEach(e)},Polygon:function(r){r.arcs.forEach(e)},MultiPolygon:function(r){r.arcs.forEach(o)}};for(var s in r)n(r[s]);return u>=a&&c>=i?[a,i,u,c]:void 0},T=function(r,n,t,e,o){3===arguments.length&&(e=Array,o=null);for(var a=new e(r=1<=r)throw new Error("full hashset");c=a[u=u+1&i]}return a[u]=e,!0},has:function(e){for(var u=n(e)&i,c=a[u],f=0;c!=o;){if(t(c,e))return!0;if(++f>=r)break;c=a[u=u+1&i]}return!1},values:function(){for(var r=[],n=0,t=a.length;n=r)throw new Error("full hashmap");s=i[f=f+1&c]}return i[f]=e,u[f]=a,a},maybeSet:function(e,a){for(var f=n(e)&c,s=i[f],l=0;s!=o;){if(t(s,e))return u[f];if(++l>=r)throw new Error("full hashmap");s=i[f=f+1&c]}return i[f]=e,u[f]=a,a},get:function(e,a){for(var f=n(e)&c,s=i[f],l=0;s!=o;){if(t(s,e))return u[f];if(++l>=r)break;s=i[f=f+1&c]}return a},keys:function(){for(var r=[],n=0,t=i.length;n>7^q[2]^q[3])},z=function(r){function n(r,n,t,e){if(h[t]!==r){h[t]=r;var o=p[t];if(o>=0){var a=g[t];o===n&&a===e||o===e&&a===n||(++v,y[t]=1)}else p[t]=n,g[t]=e}}function t(r){return U(c[r])}function e(r,n){return N(c[r],c[n])}var o,a,i,u,c=r.coordinates,f=r.lines,s=r.rings,l=function(){for(var r=F(1.4*c.length,t,e,Int32Array,-1,Int32Array),n=new Int32Array(c.length),o=0,a=c.length;o=n}},X=function(){function r(r,n){for(;n>0;){var t=(n+1>>1)-1,o=e[t];if(M(r,o)>=0)break;e[o._=n]=o,e[r._=n=t]=r}}function n(r,n){for(;;){var t=n+1<<1,a=t-1,i=n,u=e[i];if(a0&&(r=e[o],n(e[r._=0]=r,0)),t}},t.remove=function(t){var a,i=t._;if(e[i]===t)return i!==--o&&(a=e[o],(M(a,t)<0?r:n)(e[a._=i]=a,i)),i},t},Y=Math.PI,Z=2*Y,$=Y/4,rr=Y/180,nr=Math.abs,tr=Math.atan2,er=Math.cos,or=Math.sin;r.bbox=L,r.feature=S,r.mesh=function(r){return t(r,e.apply(this,arguments))},r.meshArcs=e,r.merge=function(r){return t(r,i.apply(this,arguments))},r.mergeArcs=i,r.neighbors=function(r){function n(r,n){r.forEach(function(r){r<0&&(r=~r);var t=o[r];t?t.push(n):o[r]=[n]})}function t(r,t){r.forEach(function(r){n(r,t)})}function e(r,n){"GeometryCollection"===r.type?r.geometries.forEach(function(r){e(r,n)}):r.type in i&&i[r.type](r.arcs,n)}var o={},a=r.map(function(){return[]}),i={LineString:n,MultiLineString:t,Polygon:t,MultiPolygon:function(r,n){r.forEach(function(r){t(r,n)})}};r.forEach(e);for(var u in o)for(var c=o[u],f=c.length,s=0;s=2))throw new Error("n must be ≥2");var o,a=(f=r.bbox||L(r))[0],i=f[1],u=f[2],c=f[3];n={scale:[u-a?(u-a)/(o-1):1,c-i?(c-i)/(o-1):1],translate:[a,i]}}var f,s,l=_(n),h=r.objects,p={};for(s in h)p[s]=e(h[s]);return{type:"Topology",bbox:f,transform:n,objects:p,arcs:r.arcs.map(function(r){var n,t=0,e=1,o=r.length,a=new Array(o);for(a[0]=l(r[0],0);++t0&&a&&H(r,a,n),u=V(R(B(r))),c=u.coordinates,f=F(1.4*u.arcs.length,p,g);r=u.objects,u.bbox=a,u.arcs=u.arcs.map(function(r,n){return f.set(r,n),c.slice(r[0],r[1]+1)}),delete u.coordinates,c=null;var s={GeometryCollection:function(r){r.geometries.forEach(t)},LineString:function(r){r.arcs=e(r.arcs)},MultiLineString:function(r){r.arcs=r.arcs.map(e)},Polygon:function(r){r.arcs=r.arcs.map(e)},MultiPolygon:function(r){r.arcs=r.arcs.map(o)}};for(var l in r)t(r[l]);return i&&(u.transform=i,u.arcs=W(u.arcs)),u},r.filter=function(r,n){function t(r){var n,o;switch(r.type){case"Polygon":n=(o=e(r.arcs))?{type:"Polygon",arcs:o}:{type:null};break;case"MultiPolygon":n=(o=r.arcs.map(e).filter(v)).length?{type:"MultiPolygon",arcs:o}:{type:null};break;case"GeometryCollection":n=(o=r.geometries.map(t).filter(b)).length?{type:"GeometryCollection",geometries:o}:{type:null};break;default:return r}return null!=r.id&&(n.id=r.id),null!=r.bbox&&(n.bbox=r.bbox),null!=r.properties&&(n.properties=r.properties),n}function e(r){return r.length&&o(r[0])?[r[0]].concat(r.slice(1).filter(a)):null}function o(r){return n(r,!1)}function a(r){return n(r,!0)}var i,u=r.objects,c={};null==n&&(n=y);for(i in u)c[i]=t(u[i]);return J({type:"Topology",bbox:r.bbox,transform:r.transform,objects:c,arcs:r.arcs})},r.filterAttached=K,r.filterAttachedWeight=function(r,n,t){var e=K(r),o=Q(r,n,t);return function(r,n){return e(r,n)||o(r,n)}},r.filterWeight=Q,r.planarRingArea=d,r.planarTriangleArea=m,r.presimplify=function(r,n){function t(r){o.remove(r),r[1][2]=n(r),o.push(r)}var e=r.transform?A(r.transform):E,o=X();null==n&&(n=m);var a=r.arcs.map(function(r){var a,i,u,c=[],f=0;for(i=1,u=(r=r.map(e)).length-1;i=n&&(i[o++]=[t[0],t[1]]);return i.length=o,i});return{type:"Topology",transform:r.transform,bbox:r.bbox,objects:r.objects,arcs:t}},r.sphericalRingArea=function(r,n){var t=w(r,!0);return n&&(t*=-1),2*(t<0?Z+t:t)},r.sphericalTriangleArea=function(r){return 2*nr(w(r,!1))},Object.defineProperty(r,"__esModule",{value:!0})}); ��������������������goaccess-1.9.3/resources/js/hogan.min.js������������������������������������������������������������0000755�0001750�0001730�00000020556�14613301754�013653� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * @preserve Copyright 2012 Twitter, Inc. * @license http://www.apache.org/licenses/LICENSE-2.0.txt */ var Hogan={};!function(t){function n(t,n,e){var i;return n&&"object"==typeof n&&(void 0!==n[t]?i=n[t]:e&&n.get&&"function"==typeof n.get&&(i=n.get(t))),i}function e(t,n,e,i,r,s){function a(){}function o(){}a.prototype=t,o.prototype=t.subs;var u,c=new a;c.subs=new o,c.subsText={},c.buf="",i=i||{},c.stackSubs=i,c.subsText=s;for(u in n)i[u]||(i[u]=n[u]);for(u in i)c.subs[u]=i[u];r=r||{},c.stackPartials=r;for(u in e)r[u]||(r[u]=e[u]);for(u in r)c.partials[u]=r[u];return c}function i(t){return String(null===t||void 0===t?"":t)}function r(t){return t=i(t),l.test(t)?t.replace(s,"&").replace(a,"<").replace(o,">").replace(u,"'").replace(c,"""):t}t.Template=function(t,n,e,i){t=t||{},this.r=t.code||this.r,this.c=e,this.options=i||{},this.text=n||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(){return""},v:r,t:i,render:function(t,n,e){return this.ri([t],n||{},e)},ri:function(t,n,e){return this.r(t,n,e)},ep:function(t,n){var i=this.partials[t],r=n[i.name];if(i.instance&&i.base==r)return i.instance;if("string"==typeof r){if(!this.c)throw new Error("No compiler available.");r=this.c.compile(r,this.options)}if(!r)return null;if(this.partials[t].base=r,i.subs){n.stackText||(n.stackText={});for(key in i.subs)n.stackText[key]||(n.stackText[key]=void 0!==this.activeSub&&n.stackText[this.activeSub]?n.stackText[this.activeSub]:this.text);r=e(r,i.subs,i.partials,this.stackSubs,this.stackPartials,n.stackText)}return this.partials[t].instance=r,r},rp:function(t,n,e,i){var r=this.ep(t,e);return r?r.ri(n,e,i):""},rs:function(t,n,e){var i=t[t.length-1];if(!f(i))return void e(t,n,this);for(var r=0;r=0;c--)if(a=e[c],s=n(t,a,u),void 0!==s){o=!0;break}return o?(r||"function"!=typeof s||(s=this.mv(s,e,i)),s):r?!1:""},ls:function(t,n,e,r,s){var a=this.options.delimiters;return this.options.delimiters=s,this.b(this.ct(i(t.call(n,r)),n,e)),this.options.delimiters=a,!1},ct:function(t,n,e){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(n,e)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,n,e,i,r,s,a){var o,u=n[n.length-1],c=t.call(u);return"function"==typeof c?i?!0:(o=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,e,o.substring(r,s),a)):c},mv:function(t,n,e){var r=n[n.length-1],s=t.call(r);return"function"==typeof s?this.ct(i(s.call(r)),r,e):s},sub:function(t,n,e,i){var r=this.subs[t];r&&(this.activeSub=t,r(n,e,this,i),this.activeSub=!1)}};var s=/&/g,a=//g,u=/\'/g,c=/\"/g,l=/[&<>\"\']/,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}("undefined"!=typeof exports?exports:Hogan),function(t){function n(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function e(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function i(t,n,e){if(n.charAt(e)!=t.charAt(0))return!1;for(var i=1,r=t.length;r>i;i++)if(n.charAt(e+i)!=t.charAt(i))return!1;return!0}function r(n,e,i,o){var u=[],c=null,l=null,f=null;for(l=i[i.length-1];n.length>0;){if(f=n.shift(),l&&"<"==l.tag&&!(f.tag in k))throw new Error("Illegal content in < super tag.");if(t.tags[f.tag]<=t.tags.$||s(f,o))i.push(f),f.nodes=r(n,f.tag,i,o);else{if("/"==f.tag){if(0===i.length)throw new Error("Closing tag without opener: /"+f.n);if(c=i.pop(),f.n!=c.n&&!a(f.n,c.n,o))throw new Error("Nesting error: "+c.n+" vs. "+f.n);return c.end=f.i,u}"\n"==f.tag&&(f.last=0==n.length||"\n"==n[0].tag)}u.push(f)}if(i.length>0)throw new Error("missing closing tag: "+i.pop().n);return u}function s(t,n){for(var e=0,i=n.length;i>e;e++)if(n[e].o==t.n)return t.tag="#",!0}function a(t,n,e){for(var i=0,r=e.length;r>i;i++)if(e[i].c==t&&e[i].o==n)return!0}function o(t){var n=[];for(var e in t)n.push('"'+c(e)+'": function(c,p,t,i) {'+t[e]+"}");return"{ "+n.join(",")+" }"}function u(t){var n=[];for(var e in t.partials)n.push('"'+c(e)+'":{name:"'+c(t.partials[e].name)+'", '+u(t.partials[e])+"}");return"partials: {"+n.join(",")+"}, subs: "+o(t.subs)}function c(t){return t.replace(m,"\\\\").replace(v,'\\"').replace(b,"\\n").replace(d,"\\r").replace(x,"\\u2028").replace(w,"\\u2029")}function l(t){return~t.indexOf(".")?"d":"f"}function f(t,n){var e="<"+(n.prefix||""),i=e+t.n+y++;return n.partials[i]={name:t.n,partials:{}},n.code+='t.b(t.rp("'+c(i)+'",c,p,"'+(t.indent||"")+'"));',i}function h(t,n){n.code+="t.b(t.t(t."+l(t.n)+'("'+c(t.n)+'",c,p,0)));'}function p(t){return"t.b("+t+");"}var g=/\S/,v=/\"/g,b=/\n/g,d=/\r/g,m=/\\/g,x=/\u2028/,w=/\u2029/;t.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(r,s){function a(){m.length>0&&(x.push({tag:"_t",text:new String(m)}),m="")}function o(){for(var n=!0,e=y;e"==e.tag&&(e.indent=x[i].text.toString()),x.splice(i,1));else n||x.push({tag:"\n"});w=!1,y=x.length}function c(t,n){var i="="+S,r=t.indexOf(i,n),s=e(t.substring(t.indexOf("=",n)+1,r)).split(" ");return T=s[0],S=s[s.length-1],r+i.length-1}var l=r.length,f=0,h=1,p=2,v=f,b=null,d=null,m="",x=[],w=!1,k=0,y=0,T="{{",S="}}";for(s&&(s=s.split(" "),T=s[0],S=s[1]),k=0;l>k;k++)v==f?i(T,r,k)?(--k,a(),v=h):"\n"==r.charAt(k)?u(w):m+=r.charAt(k):v==h?(k+=T.length-1,d=t.tags[r.charAt(k+1)],b=d?r.charAt(k+1):"_v","="==b?(k=c(r,k),v=f):(d&&k++,v=p),w=k):i(S,r,k)?(x.push({tag:b,n:e(m),otag:T,ctag:S,i:"/"==b?w-T.length:k+S.length}),m="",k+=S.length-1,v=f,"{"==b&&("}}"==S?k++:n(x[x.length-1]))):m+=r.charAt(k);return u(w,!0),x};var k={_t:!0,"\n":!0,$:!0,"/":!0};t.stringify=function(n){return"{code: function (c,p,i) { "+t.wrapMain(n.code)+" },"+u(n)+"}"};var y=0;t.generate=function(n,e,i){y=0;var r={code:"",subs:{},partials:{}};return t.walk(n,r),i.asString?this.stringify(r,e,i):this.makeTemplate(r,e,i)},t.wrapMain=function(t){return'var t=this;t.b(i=i||"");'+t+"return t.fl();"},t.template=t.Template,t.makeTemplate=function(t,n,e){var i=this.makePartials(t);return i.code=new Function("c","p","i",this.wrapMain(t.code)),new this.template(i,n,this,e)},t.makePartials=function(t){var n,e={subs:{},partials:t.partials,name:t.name};for(n in e.partials)e.partials[n]=this.makePartials(e.partials[n]);for(n in t.subs)e.subs[n]=new Function("c","p","t","i",t.subs[n]);return e},t.codegen={"#":function(n,e){e.code+="if(t.s(t."+l(n.n)+'("'+c(n.n)+'",c,p,1),c,p,0,'+n.i+","+n.end+',"'+n.otag+" "+n.ctag+'")){t.rs(c,p,function(c,p,t){',t.walk(n.nodes,e),e.code+="});c.pop();}"},"^":function(n,e){e.code+="if(!t.s(t."+l(n.n)+'("'+c(n.n)+'",c,p,1),c,p,1,0,0,"")){',t.walk(n.nodes,e),e.code+="};"},">":f,"<":function(n,e){var i={partials:{},code:"",subs:{},inPartial:!0};t.walk(n.nodes,i);var r=e.partials[f(n,e)];r.subs=i.subs,r.partials=i.partials},$:function(n,e){var i={subs:{},code:"",partials:e.partials,prefix:n.n};t.walk(n.nodes,i),e.subs[n.n]=i.code,e.inPartial||(e.code+='t.sub("'+c(n.n)+'",c,p,i);')},"\n":function(t,n){n.code+=p('"\\n"'+(t.last?"":" + i"))},_v:function(t,n){n.code+="t.b(t.v(t."+l(t.n)+'("'+c(t.n)+'",c,p,0)));'},_t:function(t,n){n.code+=p('"'+c(t.text)+'"')},"{":h,"&":h},t.walk=function(n,e){for(var i,r=0,s=n.length;s>r;r++)i=t.codegen[n[r].tag],i&&i(n[r],e);return e},t.parse=function(t,n,e){return e=e||{},r(t,"",[],e.sectionTags||[])},t.cache={},t.cacheKey=function(t,n){return[t,!!n.asString,!!n.disableLambda,n.delimiters,!!n.modelGet].join("||")},t.compile=function(n,e){e=e||{};var i=t.cacheKey(n,e),r=this.cache[i];if(r){var s=r.partials;for(var a in s)delete s[a].instance;return r}return r=this.generate(this.parse(this.scan(n,e.delimiters),n,e),n,e),this.cache[i]=r}}("undefined"!=typeof exports?exports:Hogan);��������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/resources/js/app.js������������������������������������������������������������������0000644�0001750�0001730�00000152766�14624360252�012563� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*jshint sub:true*/ (function () { 'use strict'; // Syntactic sugar function $(selector) { return document.querySelector(selector); } // Syntactic sugar & execute callback function $$(selector, callback) { var elems = document.querySelectorAll(selector); for (var i = 0; i < elems.length; ++i) { if (callback && typeof callback == 'function') callback.call(this, elems[i]); } } var debounce = function (func, wait, now) { var timeout; return function debounced () { var that = this, args = arguments; function delayed() { if (!now) func.apply(that, args); timeout = null; } if (timeout) { clearTimeout(timeout); } else if (now) { func.apply(obj, args); } timeout = setTimeout(delayed, wait || 250); }; }; // global namespace window.GoAccess = window.GoAccess || { initialize: function (options) { this.opts = options; var cw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); this.AppState = {}; // current state app key-value store this.AppTpls = {}; // precompiled templates this.AppCharts = {}; // holds all rendered charts this.AppUIData = (this.opts || {}).uiData || {}; // holds panel definitions this.AppData = (this.opts || {}).panelData || {}; // hold raw data this.AppWSConn = (this.opts || {}).wsConnection || {}; // WebSocket connection this.i18n = (this.opts || {}).i18n || {}; // i18n report labels this.AppPrefs = { 'autoHideTables': true, 'layout': cw > 2560 ? 'wide' : 'horizontal', 'perPage': 7, 'theme': (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'darkPurple' : 'bright', 'hiddenPanels': [], }; this.AppPrefs = GoAccess.Util.merge(this.AppPrefs, this.opts.prefs); // WebSocket reconnection this.wsDelay = this.currDelay = 1E3; this.maxDelay = 20E3; this.retries = 0; this.maxRetries = 20; if (GoAccess.Util.hasLocalStorage()) { var ls = JSON.parse(localStorage.getItem('AppPrefs')); this.AppPrefs = GoAccess.Util.merge(this.AppPrefs, ls); } if (Object.keys(this.AppWSConn).length) this.setWebSocket(this.AppWSConn); }, getPanelUI: function (panel) { return panel ? this.AppUIData[panel] : this.AppUIData; }, getPrefs: function (panel) { return panel ? this.AppPrefs[panel] : this.AppPrefs; }, setPrefs: function () { if (GoAccess.Util.hasLocalStorage()) { localStorage.setItem('AppPrefs', JSON.stringify(GoAccess.getPrefs())); } }, getPanelData: function (panel) { return panel ? this.AppData[panel] : this.AppData; }, reconnect: function (wsConn) { if (this.retries >= this.maxRetries) return window.clearTimeout(this.wsTimer); this.retries++; if (this.currDelay < this.maxDelay) this.currDelay *= 2; // Exponential backoff this.setWebSocket(wsConn); }, buildWSURI: function (wsConn) { var url = null; if (!wsConn.url || !wsConn.port) return null; url = /^wss?:\/\//i.test(wsConn.url) ? wsConn.url : window.location.protocol === "https:" ? 'wss://' + wsConn.url : 'ws://' + wsConn.url; return new URL(url).protocol + '//' + new URL(url).hostname + ':' + wsConn.port + new URL(url).pathname; }, setWebSocket: function (wsConn) { var host = null, pingId = null, uri = null, defURI = null, str = null; defURI = window.location.hostname ? window.location.hostname + ':' + wsConn.port : "localhost" + ':' + wsConn.port; uri = wsConn.url && /^(wss?:\/\/)?[^\/]+:[0-9]{1,5}/.test(wsConn.url) ? wsConn.url : this.buildWSURI(wsConn); str = uri || defURI; str = !/^wss?:\/\//i.test(str) ? (window.location.protocol === "https:" ? 'wss://' : 'ws://') + str : str; var socket = new WebSocket(str); socket.onopen = function (event) { this.currDelay = this.wsDelay; this.retries = 0; // attempt to keep connection alive (e.g., ping/pong) if (wsConn.ping_interval) pingId = setInterval(() => { socket.send('ping'); }, wsConn.ping_interval * 1E3); GoAccess.Nav.WSOpen(str); }.bind(this); socket.onmessage = function (event) { this.AppState['updated'] = true; this.AppData = JSON.parse(event.data); this.App.renderData(); }.bind(this); socket.onclose = function (event) { GoAccess.Nav.WSClose(); window.clearInterval(pingId); socket = null; this.wsTimer = setTimeout(() => { this.reconnect(wsConn); }, this.currDelay); }.bind(this); }, }; // HELPERS GoAccess.Util = { months: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul","Aug", "Sep", "Oct", "Nov", "Dec"], // Add all attributes of n to o merge: function (o, n) { var obj = {}, i = 0, il = arguments.length, key; for (; i < il; i++) { for (key in arguments[i]) { if (arguments[i].hasOwnProperty(key)) { obj[key] = arguments[i][key]; } } } return obj; }, // hash a string hashCode: function (s) { return (s.split('').reduce(function (a, b) { a = ((a << 5) - a) + b.charCodeAt(0); return a&a; }, 0) >>> 0).toString(16); }, // Format bytes to human-readable formatBytes: function (bytes, decimals, numOnly) { if (bytes == 0) return numOnly ? 0 : '0 Byte'; var k = 1024; var dm = decimals + 1 || 2; var sizes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB']; var i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + (numOnly ? '' : (' ' + sizes[i])); }, // Validate number isNumeric: function (n) { return !isNaN(parseFloat(n)) && isFinite(n); }, // Format microseconds to human-readable utime2str: function (usec) { if (usec >= 864E8) return ((usec) / 864E8).toFixed(2) + ' d'; else if (usec >= 36E8) return ((usec) / 36E8).toFixed(2) + ' h'; else if (usec >= 6E7) return ((usec) / 6E7).toFixed(2) + ' m'; else if (usec >= 1E6) return ((usec) / 1E6).toFixed(2) + ' s'; else if (usec >= 1E3) return ((usec) / 1E3).toFixed(2) + ' ms'; return (usec).toFixed(2) + ' us'; }, // Format date from 20120124 to 24/Jan/2012 formatDate: function (str) { var y = str.substr(0,4), m = str.substr(4,2) - 1, d = str.substr(6,2), h = str.substr(8,2) || 0, i = str.substr(10, 2) || 0, s = str.substr(12, 2) || 0; var date = new Date(y,m,d,h,i,s); var out = ('0' + date.getDate()).slice(-2) + '/' + this.months[date.getMonth()] + '/' + date.getFullYear(); 10 <= str.length && (out += ":" + h); 12 <= str.length && (out += ":" + i); 14 <= str.length && (out += ":" + s); return out; }, shortNum: function (n) { if (n < 1e3) return n; if (n >= 1e3 && n < 1e6) return +(n / 1e3).toFixed(1) + "K"; if (n >= 1e6 && n < 1e9) return +(n / 1e6).toFixed(1) + "M"; if (n >= 1e9 && n < 1e12) return +(n / 1e9).toFixed(1) + "B"; if (n >= 1e12) return +(n / 1e12).toFixed(1) + "T"; }, // Format field value to human-readable fmtValue: function (value, dataType, decimals, shorten, hlregex, hlvalue) { var val = 0; if (!dataType) val = value; switch (dataType) { case 'utime': val = this.utime2str(+value); break; case 'date': val = this.formatDate(value); break; case 'numeric': if (this.isNumeric(value)) val = shorten ? this.shortNum(value) : (+value).toLocaleString(); break; case 'bytes': val = this.formatBytes(value, decimals); break; case 'percent': val = value.replace(',', '.') + '%'; break; case 'time': if (this.isNumeric(value)) val = value.toLocaleString(); break; case 'secs': var t = new Date(null); t.setSeconds(value); val = t.toISOString().substr(11, 8); break; default: val = value; } if (hlregex) { let o = JSON.parse(hlregex), tmp = ''; for (var x in o) { if (!val) continue; tmp = val.replace(new RegExp(x, 'gi'), o[x]); if (tmp != val) { val = tmp; break; } val = tmp; } } return value == 0 ? String(val) : (val === undefined ? '—' : val); }, isPanelHidden: function (panel) { return GoAccess.AppPrefs.hiddenPanels.includes(panel); }, isPanelValid: function (panel) { var data = GoAccess.getPanelData(), ui = GoAccess.getPanelUI(); return (!ui.hasOwnProperty(panel) || !data.hasOwnProperty(panel) || !ui[panel].id); }, // Attempts to extract the count from either an object or a scalar. // e.g., item = Object {count: 14351, percent: 5.79} OR item = 4824825140 getCount: function (item) { if (this.isObject(item) && 'count' in item) return item.count; return item; }, getPercent: function (item) { if (this.isObject(item) && 'percent' in item) return this.fmtValue(item.percent, 'percent'); return null; }, isObject: function (o) { return o === Object(o); }, setProp: function (o, s, v) { var schema = o; var a = s.split('.'); for (var i = 0, n = a.length; i < n-1; ++i) { var k = a[i]; if (!schema[k]) schema[k] = {}; schema = schema[k]; } schema[a[n-1]] = v; }, getProp: function (o, s) { s = s.replace(/\[(\w+)\]/g, '.$1'); s = s.replace(/^\./, ''); var a = s.split('.'); for (var i = 0, n = a.length; i < n; ++i) { var k = a[i]; if (this.isObject(o) && k in o) { o = o[k]; } else { return; } } return o; }, hasLocalStorage: function () { try { localStorage.setItem('test', 'test'); localStorage.removeItem('test'); return true; } catch(e) { return false; } }, isWithinViewPort: function (el) { var elemTop = el.getBoundingClientRect().top; var elemBottom = el.getBoundingClientRect().bottom; return elemTop < window.innerHeight && elemBottom >= 0; }, togglePanel: function(panel) { var index = GoAccess.AppPrefs.hiddenPanels.indexOf(panel); if (index == -1) { GoAccess.AppPrefs.hiddenPanels.push(panel); } else { GoAccess.AppPrefs.hiddenPanels.splice(index, 1); } GoAccess.setPrefs(); delete GoAccess.AppCharts[panel]; GoAccess.OverallStats.initialize(); GoAccess.Panels.initialize(); GoAccess.Charts.initialize(); GoAccess.Tables.initialize(); }, }; // OVERALL STATS GoAccess.OverallStats = { total_requests: 0, // Render each overall stats box renderBox: function (data, ui, row, x, idx) { var wrap = $('.wrap-general-items'); // create a new bootstrap row every 6 elements if (idx % 6 == 0) { row = document.createElement('div'); row.setAttribute('class', 'row'); wrap.appendChild(row); } var box = document.createElement('div'); box.innerHTML = GoAccess.AppTpls.General.items.render({ 'id': x, 'className': ui.items[x].className, 'label': ui.items[x].label, 'value': GoAccess.Util.fmtValue(data[x], ui.items[x].dataType), }); row.appendChild(box); return row; }, // Render overall stats renderData: function (data, ui) { var idx = 0, row = null; $('.last-updated').innerHTML = data.date_time; $('.wrap-general').innerHTML = ''; if (GoAccess.Util.isPanelHidden('general')) return false; $('.wrap-general').innerHTML = GoAccess.AppTpls.General.wrap.render(GoAccess.Util.merge(ui, { 'from': data.start_date, 'to': data.end_date, })); // Iterate over general data object for (var x in data) { if (!data.hasOwnProperty(x) || !ui.items.hasOwnProperty(x)) continue; row = this.renderBox(data, ui, row, x, idx); idx++; } }, // Render general/overall analyzed requests. initialize: function () { var ui = GoAccess.getPanelUI('general'); var data = GoAccess.getPanelData('general'); this.total_requests = data.total_requests; this.renderData(data, ui); } }; // RENDER PANELS GoAccess.Nav = { events: function () { $('.nav-bars').onclick = function (e) { e.stopPropagation(); this.renderMenu(e); }.bind(this); $('.nav-gears').onclick = function (e) { e.stopPropagation(); this.renderOpts(e); }.bind(this); $('.nav-minibars').onclick = function (e) { e.stopPropagation(); this.renderOpts(e); }.bind(this); $('body').onclick = function (e) { $('nav').classList.remove('active'); }.bind(this); $$('.export-json', function (item) { item.onclick = function (e) { this.downloadJSON(e); }.bind(this); }.bind(this)); $$('.theme-bright', function (item) { item.onclick = function (e) { this.setTheme('bright'); }.bind(this); }.bind(this)); $$('.theme-dark-blue', function (item) { item.onclick = function (e) { this.setTheme('darkBlue'); }.bind(this); }.bind(this)); $$('.theme-dark-gray', function (item) { item.onclick = function (e) { this.setTheme('darkGray'); }.bind(this); }.bind(this)); $$('.theme-dark-purple', function (item) { item.onclick = function (e) { this.setTheme('darkPurple'); }.bind(this); }.bind(this)); $$('.layout-horizontal', function (item) { item.onclick = function (e) { this.setLayout('horizontal'); }.bind(this); }.bind(this)); $$('.layout-vertical', function (item) { item.onclick = function (e) { this.setLayout('vertical'); }.bind(this); }.bind(this)); $$('.layout-wide', function (item) { item.onclick = function (e) { this.setLayout('wide'); }.bind(this); }.bind(this)); $$('[data-perpage]', function (item) { item.onclick = function (e) { this.setPerPage(e); }.bind(this); }.bind(this)); $$('[data-show-tables]', function (item) { item.onclick = function (e) { this.toggleTables(); }.bind(this); }.bind(this)); $$('[data-autohide-tables]', function (item) { item.onclick = function (e) { this.toggleAutoHideTables(); }.bind(this); }.bind(this)); $$('.toggle-panel', function (item) { item.onclick = function (e) { e.stopPropagation(); var panel = e.currentTarget.getAttribute('data-panel'); GoAccess.Util.togglePanel(panel); item.classList.toggle('active'); }.bind(this); }.bind(this)); }, downloadJSON: function (e) { var targ = e.currentTarget; var data = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(GoAccess.getPanelData())); targ.href = 'data:' + data; targ.download = 'goaccess-' + (+new Date()) + '.json'; }, setLayout: function (layout) { if (('horizontal' == layout || 'wide' == layout) && $('.container')) { $('.container').classList.add('container-fluid'); $('.container').classList.remove('container'); } else if ('vertical' == layout && $('.container-fluid')) { $('.container-fluid').classList.add('container'); $('.container').classList.remove('container-fluid'); } GoAccess.AppPrefs['layout'] = layout; GoAccess.setPrefs(); GoAccess.Panels.initialize(); GoAccess.Charts.initialize(); GoAccess.Tables.initialize(); }, toggleAutoHideTables: function (e) { var autoHideTables = GoAccess.Tables.autoHideTables(); $$('.table-wrapper', function (item) { if (autoHideTables) { item.classList.remove('hidden-xs'); } else { item.classList.add('hidden-xs'); } }.bind(this)); GoAccess.AppPrefs['autoHideTables'] = !autoHideTables; GoAccess.setPrefs(); }, toggleTables: function () { var ui = GoAccess.getPanelUI(); var showTables = GoAccess.Tables.showTables(); Object.keys(ui).forEach(function (panel, idx) { if (!GoAccess.Util.isPanelValid(panel) || GoAccess.Util.isPanelHidden(panel)) ui[panel]['table'] = !showTables; }.bind(this)); GoAccess.AppPrefs['showTables'] = !showTables; GoAccess.setPrefs(); GoAccess.Panels.initialize(); GoAccess.Charts.initialize(); GoAccess.Tables.initialize(); }, setTheme: function (theme) { if (!theme) return; $('html').className = ''; switch(theme) { case 'darkGray': $('html').classList.add('dark'); $('html').classList.add('gray'); break; case 'darkBlue': $('html').classList.add('dark'); $('html').classList.add('blue'); break; case 'darkPurple': $('html').classList.add('dark'); $('html').classList.add('purple'); break; } GoAccess.AppPrefs['theme'] = theme; GoAccess.setPrefs(); }, getIcon: function (key) { switch(key) { case 'visitors' : return 'users'; case 'requests' : return 'file'; case 'static_requests' : return 'file-text'; case 'not_found' : return 'file-o'; case 'hosts' : return 'user'; case 'os' : return 'desktop'; case 'browsers' : return 'chrome'; case 'visit_time' : return 'clock-o'; case 'vhosts' : return 'th-list'; case 'referrers' : return 'external-link'; case 'referring_sites' : return 'external-link'; case 'keyphrases' : return 'google'; case 'status_codes' : return 'warning'; case 'remote_user' : return 'users'; case 'geolocation' : return 'map-marker'; case 'asn' : return 'map-marker'; case 'mime_type' : return 'file-o'; case 'tls_type' : return 'warning'; default : return 'pie-chart'; } }, getItems: function () { var ui = GoAccess.getPanelUI(), menu = []; for (var panel in ui) { if (GoAccess.Util.isPanelValid(panel)) continue; // Push valid panels to our navigation array menu.push({ 'current': window.location.hash.substr(1) == panel, 'head': ui[panel].head, 'key': panel, 'icon': this.getIcon(panel), 'hidden': GoAccess.Util.isPanelHidden(panel) }); } return menu; }, setPerPage: function (e) { GoAccess.AppPrefs['perPage'] = +e.currentTarget.getAttribute('data-perpage'); GoAccess.App.renderData(); GoAccess.setPrefs(); GoAccess.Tables.initialize(); }, getTheme: function () { return GoAccess.AppPrefs.theme || 'darkGray'; }, getLayout: function () { return GoAccess.AppPrefs.layout || 'horizontal'; }, getPerPage: function () { return GoAccess.AppPrefs.perPage || 7; }, // Render left-hand side navigation options. renderOpts: function () { var o = {}; o[this.getLayout()] = true; o[this.getTheme()] = true; o['perPage' + this.getPerPage()] = true; o['autoHideTables'] = GoAccess.Tables.autoHideTables(); o['showTables'] = GoAccess.Tables.showTables(); o['labels'] = GoAccess.i18n; $('.nav-list').innerHTML = GoAccess.AppTpls.Nav.opts.render(o); requestAnimationFrame(function () { $('nav').classList.toggle('active'); }); this.events(); }, // Render left-hand side navigation given the available panels. renderMenu: function (e) { $('.nav-list').innerHTML = GoAccess.AppTpls.Nav.menu.render({ 'nav': this.getItems(), 'overall_current': window.location.hash.substr(1) == '', 'overall_hidden': GoAccess.Util.isPanelHidden('general'), 'labels': GoAccess.i18n, }); requestAnimationFrame(function () { $('nav').classList.toggle('active'); }); this.events(); }, WSStatus: function () { if (Object.keys(GoAccess.AppWSConn).length) $$('.nav-ws-status', function (item) { item.style.display = 'block'; }); }, WSClose: function () { $$('.nav-ws-status', function (item) { item.classList.remove('connected'); item.setAttribute('title', 'Disconnected'); }); }, WSOpen: function (str) { $$('.nav-ws-status', function (item) { item.classList.add('connected'); item.setAttribute('title', 'Connected to ' + str); }); }, // Render left-hand side navigation given the available panels. renderWrap: function (nav) { $('nav').innerHTML = GoAccess.AppTpls.Nav.wrap.render(GoAccess.i18n); }, // Iterate over all available panels and render each. initialize: function () { this.setTheme(GoAccess.AppPrefs.theme); this.renderWrap(); this.WSStatus(); this.events(); } }; // RENDER PANELS GoAccess.Panels = { events: function () { $$('[data-toggle=dropdown]', function (item) { item.onclick = function (e) { this.openOpts(e.currentTarget); }.bind(this); item.onblur = function (e) { this.closeOpts(e); }.bind(this); }.bind(this)); $$('[data-plot]', function (item) { item.onclick = function (e) { GoAccess.Charts.redrawChart(e.currentTarget); }.bind(this); }.bind(this)); $$('[data-chart]', function (item) { item.onclick = function (e) { GoAccess.Charts.toggleChart(e.currentTarget); }.bind(this); }.bind(this)); $$('[data-chart-type]', function (item) { item.onclick = function (e) { GoAccess.Charts.setChartType(e.currentTarget); }.bind(this); }.bind(this)); $$('[data-metric]', function (item) { item.onclick = function (e) { GoAccess.Tables.toggleColumn(e.currentTarget); }.bind(this); }.bind(this)); }, openOpts: function (targ) { var panel = targ.getAttribute('data-panel'); targ.parentElement.classList.toggle('open'); this.renderOpts(panel); }, closeOpts: function (e) { e.currentTarget.parentElement.classList.remove('open'); // Trigger the click event on the target if not opening another menu if (e.relatedTarget && e.relatedTarget.getAttribute('data-toggle') !== 'dropdown') e.relatedTarget.click(); }, setPlotSelection: function (ui, prefs) { var chartType = ((prefs || {}).plot || {}).chartType || ui.plot[0].chartType; var metric = ((prefs || {}).plot || {}).metric || ui.plot[0].className; ui[chartType] = true; for (var i = 0, len = ui.plot.length; i < len; ++i) if (ui.plot[i].className == metric) ui.plot[i]['selected'] = true; }, setColSelection: function (items, prefs) { var columns = (prefs || {}).columns || {}; for (var i = 0, len = items.length; i < len; ++i) if ((items[i].key in columns) && columns[items[i].key]['hide']) items[i]['hide'] = true; }, setChartSelection: function (ui, prefs) { ui['showChart'] = prefs && ('chart' in prefs) ? prefs.chart : true; }, setOpts: function (panel) { var ui = JSON.parse(JSON.stringify(GoAccess.getPanelUI(panel))), prefs = GoAccess.getPrefs(panel); // set preferences selection upon opening panel options this.setChartSelection(ui, prefs); this.setPlotSelection(ui, prefs); this.setColSelection(ui.items, prefs); return GoAccess.Util.merge(ui, {'labels': GoAccess.i18n}); }, renderOpts: function (panel) { $('.panel-opts-' + panel).innerHTML = GoAccess.AppTpls.Panels.opts.render(this.setOpts(panel)); this.events(); }, enablePrev: function (panel) { var $pagination = $('#panel-' + panel + ' .pagination a.panel-prev'); if ($pagination) $pagination.parentNode.classList.remove('disabled'); }, disablePrev: function (panel) { var $pagination = $('#panel-' + panel + ' .pagination a.panel-prev'); if ($pagination) $pagination.parentNode.classList.add('disabled'); }, enableNext: function (panel) { var $pagination = $('#panel-' + panel + ' .pagination a.panel-next'); if ($pagination) $pagination.parentNode.classList.remove('disabled'); }, disableNext: function (panel) { var $pagination = $('#panel-' + panel + ' .pagination a.panel-next'); if ($pagination) $pagination.parentNode.classList.add('disabled'); }, enableFirst: function (panel) { var $pagination = $('#panel-' + panel + ' .pagination a.panel-first'); if ($pagination) $pagination.parentNode.classList.remove('disabled'); }, disableFirst: function (panel) { var $pagination = $('#panel-' + panel + ' .pagination a.panel-first'); if ($pagination) $pagination.parentNode.classList.add('disabled'); }, enableLast: function (panel) { var $pagination = $('#panel-' + panel + ' .pagination a.panel-last'); if ($pagination) $pagination.parentNode.classList.remove('disabled'); }, disableLast: function (panel) { var $pagination = $('#panel-' + panel + ' .pagination a.panel-last'); if ($pagination) $pagination.parentNode.classList.add('disabled'); }, enablePagination: function (panel) { this.enablePrev(panel); this.enableNext(panel); this.enableFirst(panel); this.enableLast(panel); }, disablePagination: function (panel) { this.disablePrev(panel); this.disableNext(panel); this.disableFirst(panel); this.disableLast(panel); }, hasSubItems: function (ui, data) { for (var i = 0, len = data.length; i < len; ++i) { if (!data[i].items) return (ui['hasSubItems'] = false); if (data[i].items.length) { return (ui['hasSubItems'] = true); } } return false; }, setComputedData: function (panel, ui, data) { this.hasSubItems(ui, data.data); GoAccess.Charts.hasChart(panel, ui); GoAccess.Tables.hasTable(ui); }, // Render the given panel given a user interface definition. renderPanel: function (panel, ui, col) { // set some computed values before rendering panel structure var data = GoAccess.getPanelData(panel); this.setComputedData(panel, ui, data); // per panel wrapper var box = document.createElement('div'); box.id = 'panel-' + panel; box.innerHTML = GoAccess.AppTpls.Panels.wrap.render(GoAccess.Util.merge(ui, { 'labels': GoAccess.i18n })); col.appendChild(box); // Remove pagination if not enough data for the given panel if (data.data.length <= GoAccess.getPrefs().perPage) this.disablePagination(panel); GoAccess.Tables.renderThead(panel, ui); return col; }, createCol: function (row) { var layout = GoAccess.AppPrefs['layout']; var perRow = 'horizontal' == layout ? 6 : 'wide' == layout ? 3 : 12; // set the number of columns based on current layout var col = document.createElement('div'); col.setAttribute('class', 'col-md-' + perRow + ' wrap-panel'); row.appendChild(col); return col; }, createRow: function (row, idx) { var wrap = $('.wrap-panels'); var layout = GoAccess.AppPrefs['layout']; var every = 'horizontal' == layout ? 2 : 'wide' == layout ? 4 : 1; // create a new bootstrap row every one or two elements depending on // the layout if (idx % every == 0) { row = document.createElement('div'); row.setAttribute('class', 'row' + (every == 2 || every == 4 ? ' equal' : '')); wrap.appendChild(row); } return row; }, resetPanel: function (panel) { var ui = GoAccess.getPanelUI(); var ele = $('#panel-' + panel); if (GoAccess.Util.isPanelValid(panel) || GoAccess.Util.isPanelHidden(panel)) return false; var col = ele.parentNode; col.removeChild(ele); // Render panel given a user interface definition this.renderPanel(panel, ui[panel], col); this.events(); }, // Iterate over all available panels and render each panel // structure. renderPanels: function () { var ui = GoAccess.getPanelUI(), idx = 0, row = null, col = null; $('.wrap-panels').innerHTML = ''; for (var panel in ui) { if (GoAccess.Util.isPanelValid(panel) || GoAccess.Util.isPanelHidden(panel)) continue; row = this.createRow(row, idx++); col = this.createCol(row); // Render panel given a user interface definition this.renderPanel(panel, ui[panel], col); } }, initialize: function () { this.renderPanels(); this.events(); } }; // RENDER CHARTS GoAccess.Charts = { iter: function (callback) { Object.keys(GoAccess.AppCharts).forEach(function (panel) { // redraw chart only if it's within the viewport if (!GoAccess.Util.isWithinViewPort($('#panel-' + panel))) return; if (callback && typeof callback === 'function') callback.call(this, GoAccess.AppCharts[panel], panel); }); }, getMetricKeys: function (panel, key) { return GoAccess.getPanelUI(panel)['items'].map(function (a) { return a[key]; }); }, getPanelData: function (panel, data) { // Grab ui plot data for the selected panel var plot = GoAccess.Util.getProp(GoAccess.AppState, panel + '.plot'); // Grab the data for the selected panel data = data || this.processChartData(GoAccess.getPanelData(panel).data); return plot.chartReverse ? data.reverse() : data; }, drawPlot: function (panel, plotUI, data) { var chart = this.getChart(panel, plotUI, data); if (!chart) return; this.renderChart(panel, chart, data); GoAccess.AppCharts[panel] = null; GoAccess.AppCharts[panel] = chart; }, setChartType: function (targ) { var panel = targ.getAttribute('data-panel'); var type = targ.getAttribute('data-chart-type'); GoAccess.Util.setProp(GoAccess.AppPrefs, panel + '.plot.chartType', type); GoAccess.setPrefs(); var plotUI = GoAccess.Util.getProp(GoAccess.AppState, panel + '.plot'); // Extract data for the selected panel and process it this.drawPlot(panel, plotUI, this.getPanelData(panel)); }, toggleChart: function (targ) { var panel = targ.getAttribute('data-panel'); var prefs = GoAccess.getPrefs(panel), chart = prefs && ('chart' in prefs) ? prefs.chart : true; GoAccess.Util.setProp(GoAccess.AppPrefs, panel + '.chart', !chart); GoAccess.setPrefs(); GoAccess.Panels.resetPanel(panel); GoAccess.Charts.resetChart(panel); GoAccess.Tables.renderFullTable(panel); }, hasChart: function (panel, ui) { var prefs = GoAccess.getPrefs(panel), chart = prefs && ('chart' in prefs) ? prefs.chart : true; ui['chart'] = ui.plot.length && chart && chart; }, // Redraw a chart upon selecting a metric. redrawChart: function (targ) { var plot = targ.getAttribute('data-plot'); var panel = targ.getAttribute('data-panel'); var ui = GoAccess.getPanelUI(panel); var plotUI = ui.plot; GoAccess.Util.setProp(GoAccess.AppPrefs, panel + '.plot.metric', plot); GoAccess.setPrefs(); // Iterate over plot user interface definition for (var x in plotUI) { if (!plotUI.hasOwnProperty(x) || plotUI[x].className != plot) continue; GoAccess.Util.setProp(GoAccess.AppState, panel + '.plot', plotUI[x]); // Extract data for the selected panel and process it this.drawPlot(panel, plotUI[x], this.getPanelData(panel)); break; } }, // Iterate over the item properties and extract the count value. extractCount: function (item) { var o = {}; for (var prop in item) o[prop] = GoAccess.Util.getCount(item[prop]); return o; }, // Extract an array of objects that D3 can consume to process the chart. // e.g., o = Object {hits: 37402, visitors: 6949, bytes: // 505881789, avgts: 118609, cumts: 4436224010…} processChartData: function (data) { var out = []; for (var i = 0; i < data.length; ++i) out.push(this.extractCount(data[i])); return out; }, findUIItem: function (panel, key) { var items = GoAccess.getPanelUI(panel).items; for (var i = 0; i < items.length; ++i) { if (items[i].key == key) return items[i]; } return null; }, getXKey: function (datum, key) { var arr = []; if (typeof key === 'string') return datum[key]; for (var prop in key) arr.push(datum[key[prop]]); return arr.join(' '); }, getWMap: function (panel, plotUI, data) { var chart = WorldMap(d3.select("#chart-" + panel)); chart.width($("#chart-" + panel).getBoundingClientRect().width); chart.height(400); chart.metric(plotUI['d3']['y0']['key']); chart.opts(plotUI); return chart; }, getAreaSpline: function (panel, plotUI, data) { var dualYaxis = plotUI['d3']['y1']; var chart = AreaChart(dualYaxis) .labels({ y0: plotUI['d3']['y0'].label, y1: dualYaxis ? plotUI['d3']['y1'].label : '' }) .x(function (d) { if ((((plotUI || {}).d3 || {}).x || {}).key) return this.getXKey(d, plotUI['d3']['x']['key']); return d.data; }.bind(this)) .y0(function (d) { return +d[plotUI['d3']['y0']['key']]; }) .width($("#chart-" + panel).getBoundingClientRect().width) .height(175) .format({ x: (this.findUIItem(panel, 'data') || {}).dataType || null, y0: ((plotUI.d3 || {}).y0 || {}).format, y1: ((plotUI.d3 || {}).y1 || {}).format, }) .opts(plotUI); dualYaxis && chart.y1(function (d) { return +d[plotUI['d3']['y1']['key']]; }); return chart; }, getVBar: function (panel, plotUI, data) { var dualYaxis = plotUI['d3']['y1']; var chart = BarChart(dualYaxis) .labels({ y0: plotUI['d3']['y0'].label, y1: dualYaxis ? plotUI['d3']['y1'].label : '' }) .x(function (d) { if ((((plotUI || {}).d3 || {}).x || {}).key) return this.getXKey(d, plotUI['d3']['x']['key']); return d.data; }.bind(this)) .y0(function (d) { return +d[plotUI['d3']['y0']['key']]; }) .width($("#chart-" + panel).getBoundingClientRect().width) .height(175) .format({ x: (this.findUIItem(panel, 'data') || {}).dataType || null, y0: ((plotUI.d3 || {}).y0 || {}).format, y1: ((plotUI.d3 || {}).y1 || {}).format, }) .opts(plotUI); dualYaxis && chart.y1(function (d) { return +d[plotUI['d3']['y1']['key']]; }); return chart; }, getChartType: function (panel) { var ui = GoAccess.getPanelUI(panel); if (!ui.chart) return ''; return GoAccess.Util.getProp(GoAccess.getPrefs(), panel + '.plot.chartType') || ui.plot[0].chartType; }, getPlotUI: function (panel, ui) { var metric = GoAccess.Util.getProp(GoAccess.getPrefs(), panel + '.plot.metric'); if (!metric) return ui.plot[0]; return ui.plot.filter(function (v) { return v.className == metric; })[0]; }, getChart: function (panel, plotUI, data) { var chart = null; // Render given its type switch (this.getChartType(panel)) { case 'area-spline': chart = this.getAreaSpline(panel, plotUI, data); break; case 'bar': chart = this.getVBar(panel, plotUI, data); break; case 'wmap': chart = this.getWMap(panel, plotUI, data); break; } return chart; }, renderChart: function (panel, chart, data) { // remove popup d3.select('#chart-' + panel + '>.chart-tooltip-wrap') .remove(); // remove svg d3.select('#chart-' + panel).selectAll('svg') .remove(); // add chart to the document d3.select("#chart-" + panel) .datum(data) .call(chart) .append("div").attr("class", "chart-tooltip-wrap"); }, addChart: function (panel, ui) { var plotUI = null, chart = null; // Ensure it has a plot definition if (!ui.plot || !ui.plot.length) return; plotUI = this.getPlotUI(panel, ui); // set ui plot data GoAccess.Util.setProp(GoAccess.AppState, panel + '.plot', plotUI); // Grab the data for the selected panel var data = this.getPanelData(panel); if (!(chart = this.getChart(panel, plotUI, data))) return; this.renderChart(panel, chart, data); GoAccess.AppCharts[panel] = chart; }, // Render all charts for the applicable panels. renderCharts: function (ui) { for (var panel in ui) { if (GoAccess.Util.isPanelValid(panel) || GoAccess.Util.isPanelHidden(panel)) continue; this.addChart(panel, ui[panel]); } }, resetChart: function (panel) { var ui = {}; if (GoAccess.Util.isPanelValid(panel) || GoAccess.Util.isPanelHidden(panel)) return false; ui = GoAccess.getPanelUI(panel); this.addChart(panel, ui); }, // Reload (doesn't redraw) the given chart's data reloadChart: function (chart, panel) { var subItems = GoAccess.Tables.getSubItemsData(panel); var data = (subItems.length ? subItems : GoAccess.getPanelData(panel).data).slice(0); d3.select("#chart-" + panel) .datum(this.processChartData(this.getPanelData(panel, data))) .call(chart.width($("#chart-" + panel).offsetWidth)) .append("div").attr("class", "chart-tooltip-wrap"); }, // Reload (doesn't redraw) all chart's data reloadCharts: function () { this.iter(function (chart, panel) { this.reloadChart(chart, panel); }.bind(this)); GoAccess.AppState.updated = false; }, // Only redraw charts with current data redrawCharts: function () { this.iter(function (chart, panel) { d3.select("#chart-" + panel).call(chart.width($("#chart-" + panel).offsetWidth)); }); }, initialize: function () { this.renderCharts(GoAccess.getPanelUI()); // reload on scroll & redraw on resize d3.select(window).on('scroll.charts', debounce(function () { this.reloadCharts(); }, 250, false).bind(this)).on('resize.charts', function () { this.redrawCharts(); }.bind(this)); } }; // RENDER TABLES GoAccess.Tables = { chartData: {}, // holds all panel sub items data that feeds the chart events: function () { $$('.panel-next', function (item) { item.onclick = function (e) { var panel = e.currentTarget.getAttribute('data-panel'); this.renderTable(panel, this.nextPage(panel)); }.bind(this); }.bind(this)); $$('.panel-prev', function (item) { item.onclick = function (e) { var panel = e.currentTarget.getAttribute('data-panel'); this.renderTable(panel, this.prevPage(panel)); }.bind(this); }.bind(this)); $$('.panel-first', function (item) { item.onclick = function (e) { var panel = e.currentTarget.getAttribute('data-panel'); this.renderTable(panel, "FIRST_PAGE"); }.bind(this); }.bind(this)); $$('.panel-last', function (item) { item.onclick = function (e) { var panel = e.currentTarget.getAttribute('data-panel'); this.renderTable(panel, "LAST_PAGE"); }.bind(this); }.bind(this)); $$('.expandable>td', function (item) { item.onclick = function (e) { if (!window.getSelection().toString()) this.toggleRow(e.currentTarget); }.bind(this); }.bind(this)); $$('.row-expandable.clickable', function (item) { item.onclick = function (e) { this.toggleRow(e.currentTarget); }.bind(this); }.bind(this)); $$('.sortable', function (item) { item.onclick = function (e) { this.sortColumn(e.currentTarget); }.bind(this); }.bind(this)); }, toggleColumn: function (targ) { var panel = targ.getAttribute('data-panel'); var metric = targ.getAttribute('data-metric'); var columns = (GoAccess.getPrefs(panel) || {}).columns || {}; if (metric in columns) { delete columns[metric]; } else { GoAccess.Util.setProp(columns, metric + '.hide', true); } GoAccess.Util.setProp(GoAccess.AppPrefs, panel + '.columns', columns); GoAccess.setPrefs(); GoAccess.Tables.renderThead(panel, GoAccess.getPanelUI(panel)); GoAccess.Tables.renderFullTable(panel); }, sortColumn: function (ele) { var field = ele.getAttribute('data-key'); var order = ele.getAttribute('data-order'); var panel = ele.parentElement.parentElement.parentElement.getAttribute('data-panel'); order = order ? 'asc' == order ? 'desc' : 'asc' : 'asc'; GoAccess.App.sortData(panel, field, order); GoAccess.Util.setProp(GoAccess.AppState, panel + '.sort', { 'field': field, 'order': order, }); this.renderThead(panel, GoAccess.getPanelUI(panel)); this.renderTable(panel, this.getCurPage(panel)); GoAccess.Charts.reloadChart(GoAccess.AppCharts[panel], panel); }, getDataByKey: function (panel, key) { var data = GoAccess.getPanelData(panel).data; for (var i = 0, n = data.length; i < n; ++i) { if (GoAccess.Util.hashCode(data[i].data) == key) return data[i]; } return null; }, getSubItemsData: function (panel) { var out = [], items = this.chartData[panel]; for (var x in items) { if (!items.hasOwnProperty(x)) continue; out = out.concat(items[x]); } return out; }, addChartData: function (panel, key) { var data = this.getDataByKey(panel, key); var path = panel + '.' + key; if (!data || !data.items) return []; GoAccess.Util.setProp(this.chartData, path, data.items); return this.getSubItemsData(panel); }, removeChartData: function (panel, key) { if (GoAccess.Util.getProp(this.chartData, panel + '.' + key)) delete this.chartData[panel][key]; if (!this.chartData[panel] || Object.keys(this.chartData[panel]).length == 0) return GoAccess.getPanelData(panel).data; return this.getSubItemsData(panel); }, isExpanded: function (panel, key) { var path = panel + '.expanded.' + key; return GoAccess.Util.getProp(GoAccess.AppState, path); }, toggleExpanded: function (panel, key) { var path = panel + '.expanded.' + key, ret = true; if (this.isExpanded(panel, key)) { delete GoAccess.AppState[panel]['expanded'][key]; } else { GoAccess.Util.setProp(GoAccess.AppState, path, true), ret = false; } return ret; }, // Toggle children rows toggleRow: function (ele) { var hide = false, data = []; var row = ele.parentNode; var panel = row.getAttribute('data-panel'), key = row.getAttribute('data-key'); var plotUI = GoAccess.AppCharts[panel].opts(); hide = this.toggleExpanded(panel, key); this.renderTable(panel, this.getCurPage(panel)); if (!plotUI.redrawOnExpand) return; if (!hide) { data = GoAccess.Charts.processChartData(this.addChartData(panel, key)); } else { data = GoAccess.Charts.processChartData(this.removeChartData(panel, key)); } GoAccess.Charts.drawPlot(panel, plotUI, data); }, // Get current panel page getCurPage: function (panel) { return GoAccess.Util.getProp(GoAccess.AppState, panel + '.curPage') || 0; }, // Page offset. // e.g., Return Value: 11, curPage: 2 pageOffSet: function (panel) { return ((this.getCurPage(panel) - 1) * GoAccess.getPrefs().perPage); }, // Get total number of pages given the number of items on array getTotalPages: function (dataItems) { return Math.ceil(dataItems.length / GoAccess.getPrefs().perPage); }, // Get a shallow copy of a portion of the given data array and the // current page. getPage: function (panel, dataItems, page) { var totalPages = this.getTotalPages(dataItems); if (page < 1) page = 1; if (page > totalPages) page = totalPages; GoAccess.Util.setProp(GoAccess.AppState, panel + '.curPage', page); var start = this.pageOffSet(panel); var end = start + GoAccess.getPrefs().perPage; return dataItems.slice(start, end); }, // Get previous page prevPage: function (panel) { return this.getCurPage(panel) - 1; }, // Get next page nextPage: function (panel) { return this.getCurPage(panel) + 1; }, getMetaCell: function (ui, o, key) { var val = o && (key in o) && o[key].value ? o[key].value : null; var perc = o && (key in o) && o[key].percent ? o[key].percent : null; // use metaType if exist else fallback to dataType var vtype = ui.metaType || ui.dataType; var className = ui.className || ''; className += !['string'].includes(ui.dataType) ? 'text-right' : ''; return { 'className': className, 'value' : val ? GoAccess.Util.fmtValue(val, vtype) : null, 'percent' : perc, 'title' : ui.meta, 'label' : ui.metaLabel || null, }; }, hideColumn: function (panel, col) { var columns = (GoAccess.getPrefs(panel) || {}).columns || {}; return ((col in columns) && columns[col]['hide']); }, showTables: function () { return ('showTables' in GoAccess.getPrefs()) ? GoAccess.getPrefs().showTables : true; }, autoHideTables: function () { return ('autoHideTables' in GoAccess.getPrefs()) ? GoAccess.getPrefs().autoHideTables : true; }, hasTable: function (ui) { ui['table'] = this.showTables(); ui['autoHideTables'] = this.autoHideTables(); }, getMetaRows: function (panel, ui, key) { var cells = [], uiItems = ui.items; var data = GoAccess.getPanelData(panel).metadata; for (var i = 0; i < uiItems.length; ++i) { var item = uiItems[i]; if (this.hideColumn(panel, item.key)) continue; cells.push(this.getMetaCell(item, data[item.key], key)); } return [{ 'hasSubItems': ui.hasSubItems, 'cells': cells, 'key' : key.substring(0, 3), }]; }, renderMetaRow: function (panel, metarows, className) { // find the table to set var table = $('.table-' + panel + ' tr.' + className); if (!table) return; table.innerHTML = GoAccess.AppTpls.Tables.meta.render({ row: metarows }); }, // Iterate over user interface definition properties iterUIItems: function (panel, uiItems, dataItems, callback) { var out = []; for (var i = 0; i < uiItems.length; ++i) { var uiItem = uiItems[i]; if (this.hideColumn(panel, uiItem.key)) continue; // Data for the current user interface property. // e.g., dataItem = Object {count: 13949, percent: 5.63} var dataItem = dataItems[uiItem.key]; // Apply the callback and push return data to output array if (callback && typeof callback == 'function') { var ret = callback.call(this, panel, uiItem, dataItem); if (ret) out.push(ret); } } return out; }, // Return an object that can be consumed by the table template given a user // interface definition and a cell value object. // e.g., value = Object {count: 14351, percent: 5.79} getObjectCell: function (panel, ui, value) { var className = ui.className || ''; className += !['string'].includes(ui.dataType) ? 'text-right' : ''; return { 'className': className, 'percent': GoAccess.Util.getPercent(value), 'value': GoAccess.Util.fmtValue(GoAccess.Util.getCount(value), ui.dataType, null, null, ui.hlregex, ui.hlvalue, ui.hlidx) }; }, // Given a data item object, set all the row cells and return a // table row that the template can consume. renderRow: function (panel, callback, ui, dataItem, idx, subItem, parentId, expanded) { var shadeParent = ((!subItem && idx % 2 != 0) ? 'shaded' : ''); var shadeChild = ((parentId % 2 != 0) ? 'shaded' : ''); return { 'panel' : panel, 'idx' : !subItem && (String((idx + 1) + this.pageOffSet(panel))), 'key' : !subItem ? GoAccess.Util.hashCode(dataItem.data) : '', 'expanded' : !subItem && expanded, 'parentId' : subItem ? String(parentId) : '', 'className' : subItem ? 'child ' + shadeChild : 'parent ' + shadeParent, 'hasSubItems' : ui.hasSubItems, 'items' : dataItem.items ? dataItem.items.length : 0, 'cells' : callback.call(this), }; }, renderRows: function (rows, panel, ui, dataItems, subItem, parentId) { subItem = subItem || false; // no data rows if (dataItems.length == 0 && ui.items.length) { rows.push({ cells: [{ className: 'text-center', colspan: ui.items.length + 1, value: 'No data on this panel.' }] }); } // Iterate over all data items for the given panel and // generate a table row per date item. var cellcb = null; for (var i = 0; i < dataItems.length; ++i) { var dataItem = dataItems[i], data = null, expanded = false; switch(typeof dataItem) { case 'string': data = dataItem; cellcb = function () { return { 'colspan': ui.items.length, 'value': data }; }; break; default: data = dataItem.data; cellcb = this.iterUIItems.bind(this, panel, ui.items, dataItem, this.getObjectCell.bind(this)); } expanded = this.isExpanded(panel, GoAccess.Util.hashCode(data)); rows.push(this.renderRow(panel, cellcb, ui, dataItem, i, subItem, parentId, expanded)); if (dataItem.items && dataItem.items.length && expanded) { this.renderRows(rows, panel, ui, dataItem.items, true, i, expanded); } } }, // Entry point to render all data rows into the table renderDataRows: function (panel, ui, dataItems, page) { // find the table to set var table = $('.table-' + panel + ' tbody.tbody-data'); if (!table) return; dataItems = this.getPage(panel, dataItems, page); var rows = []; this.renderRows(rows, panel, ui, dataItems); if (rows.length == 0) return; table.innerHTML = GoAccess.AppTpls.Tables.data.render({ rows: rows }); }, togglePagination: function (panel, page, dataItems) { GoAccess.Panels.enablePagination(panel); // Disable pagination next button if last page is reached if (page >= this.getTotalPages(dataItems)) { GoAccess.Panels.disableNext(panel); GoAccess.Panels.disableLast(panel); } if (page <= 1) { GoAccess.Panels.disablePrev(panel); GoAccess.Panels.disableFirst(panel); } }, renderTable: function (panel, page) { var dataItems = GoAccess.getPanelData(panel).data; var ui = GoAccess.getPanelUI(panel); if (page === "LAST_PAGE") { page = this.getTotalPages(dataItems); } else if (page === "FIRST_PAGE") { page = 1; } this.togglePagination(panel, page, dataItems); // Render data rows this.renderDataRows(panel, ui, dataItems, page); this.events(); }, renderFullTable: function (panel) { var ui = GoAccess.getPanelUI(panel), page = 0; // panel's data var data = GoAccess.getPanelData(panel); // render meta data if (data.hasOwnProperty('metadata')) { this.renderMetaRow(panel, this.getMetaRows(panel, ui, 'min'), 'thead-min'); this.renderMetaRow(panel, this.getMetaRows(panel, ui, 'max'), 'thead-max'); this.renderMetaRow(panel, this.getMetaRows(panel, ui, 'avg'), 'thead-avg'); } // render actual data if (data.hasOwnProperty('data')) { page = this.getCurPage(panel); this.togglePagination(panel, page, data.data); this.renderDataRows(panel, ui, data.data, page); } // render meta data if (data.hasOwnProperty('metadata')) { this.renderMetaRow(panel, this.getMetaRows(panel, ui, 'total'), 'tfoot-totals'); } }, // Iterate over all panels and determine which ones should contain // a data table. renderTables: function (force) { var ui = GoAccess.getPanelUI(); for (var panel in ui) { if (GoAccess.Util.isPanelValid(panel) || GoAccess.Util.isPanelHidden(panel) || !this.showTables()) continue; if (force || GoAccess.Util.isWithinViewPort($('#panel-' + panel))) this.renderFullTable(panel); } }, // Given a UI panel definition, make a copy of it and assign the sort // fields to the template object to render sort2Tpl: function (panel, ui) { var uiClone = JSON.parse(JSON.stringify(ui)), out = []; var sort = GoAccess.Util.getProp(GoAccess.AppState, panel + '.sort'); for (var i = 0, len = uiClone.items.length; i < len; ++i) { var item = uiClone.items[i]; if (this.hideColumn(panel, item.key)) continue; item['sort'] = false; if (item.key == sort.field && sort.order) { item['sort'] = true; item[sort.order.toLowerCase()] = true; } out.push(item); } uiClone.items = out; return uiClone; }, renderThead: function (panel, ui) { var $thead = $('.table-' + panel + '>thead>tr.thead-cols'), $colgroup = $('.table-' + panel + '>colgroup'); if ($thead && $colgroup && this.showTables()) { ui = this.sort2Tpl(panel, ui); $thead.innerHTML = GoAccess.AppTpls.Tables.head.render(ui); $colgroup.innerHTML = GoAccess.AppTpls.Tables.colgroup.render(ui); } }, reloadTables: function () { this.renderTables(false); this.events(); }, initialize: function () { this.renderTables(true); this.events(); // redraw on scroll d3.select(window).on('scroll.tables', debounce(function () { this.reloadTables(); }, 250, false).bind(this)); }, }; // Main App GoAccess.App = { hasFocus: true, tpl: function (tpl) { return Hogan.compile(tpl); }, setTpls: function () { GoAccess.AppTpls = { 'Nav': { 'wrap': this.tpl($('#tpl-nav-wrap').innerHTML), 'menu': this.tpl($('#tpl-nav-menu').innerHTML), 'opts': this.tpl($('#tpl-nav-opts').innerHTML), }, 'Panels': { 'wrap': this.tpl($('#tpl-panel').innerHTML), 'opts': this.tpl($('#tpl-panel-opts').innerHTML), }, 'General': { 'wrap': this.tpl($('#tpl-general').innerHTML), 'items': this.tpl($('#tpl-general-items').innerHTML), }, 'Tables': { 'colgroup': this.tpl($('#tpl-table-colgroup').innerHTML), 'head': this.tpl($('#tpl-table-thead').innerHTML), 'meta': this.tpl($('#tpl-table-row-meta').innerHTML), 'totals': this.tpl($('#tpl-table-row-totals').innerHTML), 'data': this.tpl($('#tpl-table-row').innerHTML), }, }; }, sortField: function (o, field) { var f = o[field]; if (GoAccess.Util.isObject(f) && (f !== null)) f = o[field].count; return f; }, sortData: function (panel, field, order) { // panel's data var panelData = GoAccess.getPanelData(panel).data; // Function to sort an array of objects var sortArray = function(arr) { arr.sort(function (a, b) { a = this.sortField(a, field); b = this.sortField(b, field); if (typeof a === 'string' && typeof b === 'string') return 'asc' == order ? a.localeCompare(b) : b.localeCompare(a); return 'asc' == order ? a - b : b - a; }.bind(this)); }.bind(this); // Sort panelData sortArray(panelData); // Sort the items sub-array panelData.forEach(function(item) { if (item.items) { sortArray(item.items); } }); }, setInitSort: function () { var ui = GoAccess.getPanelUI(); for (var panel in ui) { if (GoAccess.Util.isPanelValid(panel)) continue; GoAccess.Util.setProp(GoAccess.AppState, panel + '.sort', ui[panel].sort); } }, // Verify if we need to sort panels upon data re-entry verifySort: function () { var ui = GoAccess.getPanelUI(); for (var panel in ui) { if (GoAccess.Util.isPanelValid(panel) || GoAccess.Util.isPanelHidden(panel)) continue; var sort = GoAccess.Util.getProp(GoAccess.AppState, panel + '.sort'); // do not sort panels if they still hold the same sort properties if (JSON.stringify(sort) === JSON.stringify(ui[panel].sort)) continue; this.sortData(panel, sort.field, sort.order); } }, initDom: function () { $('nav').classList.remove('hide'); $('.container').classList.remove('hide'); $('.spinner').classList.add('hide'); if (GoAccess.AppPrefs['layout'] == 'horizontal' || GoAccess.AppPrefs['layout'] == 'wide') { $('.container').classList.add('container-fluid'); $('.container-fluid').classList.remove('container'); } }, renderData: function () { // update data and charts if tab/document has focus if (!this.hasFocus) return; // some panels may not have been properly rendered since no data was // passed when bootstrapping the report, thus we do a one full // re-render of all panels if (GoAccess.OverallStats.total_requests == 0 && GoAccess.OverallStats.total_requests != GoAccess.AppData.general.total_requests) GoAccess.Panels.initialize(); GoAccess.OverallStats.total_requests = GoAccess.AppData.general.total_requests; this.verifySort(); GoAccess.OverallStats.initialize(); // do not rerender tables/charts if data hasn't changed if (!GoAccess.AppState.updated) return; GoAccess.Charts.reloadCharts(); GoAccess.Tables.reloadTables(); }, initialize: function () { this.setInitSort(); this.setTpls(); GoAccess.Nav.initialize(); this.initDom(); GoAccess.OverallStats.initialize(); GoAccess.Panels.initialize(); GoAccess.Charts.initialize(); GoAccess.Tables.initialize(); }, }; // Adds the visibilitychange EventListener document.addEventListener('visibilitychange', function () { // fires when user switches tabs, apps, etc. if (document.visibilityState === 'hidden') GoAccess.App.hasFocus = false; // fires when app transitions from hidden or user returns to the app/tab. if (document.visibilityState === 'visible') { var hasFocus = GoAccess.App.hasFocus; GoAccess.App.hasFocus = true; hasFocus || GoAccess.App.renderData(); } }); // Init app window.onload = function () { GoAccess.initialize({ 'i18n': window.json_i18n, 'uiData': window.user_interface, 'panelData': window.json_data, 'wsConnection': window.connection || null, 'prefs': window.html_prefs || {}, }); GoAccess.App.initialize(); }; }()); ����������goaccess-1.9.3/resources/css/�����������������������������������������������������������������������0000755�0001750�0001730�00000000000�14626467007�011670� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/resources/css/bootstrap.min.css������������������������������������������������������0000644�0001750�0001730�00000354560�14613301753�015125� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} /*# sourceMappingURL=bootstrap.min.css.map */������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/resources/css/fa.min.css�������������������������������������������������������������0000644�0001750�0001730�00000111776�14613301753�013476� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@font-face { font-family: 'fa'; src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAFxQAAsAAAAAXAQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPa2NtYXAAAAFoAAACVAAAAlQ99AGXZ2FzcAAAA7wAAAAIAAAACAAAABBnbHlmAAADxAAAVBQAAFQUfRTLI2hlYWQAAFfYAAAANgAAADYfiLedaGhlYQAAWBAAAAAkAAAAJAhUBMBobXR4AABYNAAAAbQAAAG0b9oDkmxvY2EAAFnoAAAA3AAAANxLxmGqbWF4cAAAWsQAAAAgAAAAIAB4AVduYW1lAABa5AAAAUoAAAFKIhWTsnBvc3QAAFwwAAAAIAAAACAAAwAAAAMDbwGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8tIDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAjgAAACKAIAABgAKAAEAIOoL8AfwDfAR8BfwGfAe8CLwLPA68EHwRPBG8E3wVPBa8GfwavBx8HjwgPCF8I7wlvCj8LDwsvDB8MnwzvDa8N7w5PDz8PbxAfEF8QjxCvEM8RHxIfEm8SjxMvFC8UTxTPFc8WXxoPHJ8c7x2/He8ffx/vIA8gXyaPKM8pLynPK38tL//f//AAAAAAAg6gvwAvAJ8BHwE/AZ8B3wIfAr8DrwQPBE8EbwS/BT8FnwZ/Bp8HHwd/CA8IXwjvCW8KLwsPCy8MDwyfDO8Nfw3PDk8PPw9vEA8QTxCPEK8QzxEPEg8SbxKPEy8UHxRPFM8VzxZPGg8cnxzvHb8d7x9vH+8gDyBPJo8ovykvKc8rby0v/9//8AAf/jFfkQAxACD/8P/g/9D/oP+A/wD+MP3g/cD9sP1w/SD84Pwg/BD7sPtg+vD6sPow+cD5EPhQ+ED3cPcA9sD2QPYw9eD1APTg9FD0MPQQ9ADz8PPA8uDyoPKQ8gDxIPEQ8KDvsO9A66DpIOjg6CDoAOaQ5jDmIOXw39DdsN1g3NDbQNmgADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAAABQAQAAkAADwAAExUUFjMhMjY9ATQmIyEiBgATDQPADRMTDfxADRMCIMANExMNwA0TEwAAAAIAAP+3A7cDbgAbAEIAAAE0Jy4BJyYjIgcOAQcGFRQXHgEXFjMyNz4BNzYBFAYjIiYvAQ4BIyInLgEnJjU0Nz4BNzYzMhceARcWFRQGBxceARUCkhQURi4vNTUuL0UVFBQVRS8uNTUvLkYUFAElKx4PGwrEMnU9U0lKbR8gIB9tSklTVElJbSAgJSLECgsB2zUvL0UUFBQURS8vNTUuL0UUFRUURS8u/loeKwsLwyMkIB9uSUlTVElJbh8gIB9uSUlUPHUzxAkbDwAAAAMAAAAABAADJQAcADcARwAAJREOAQcOAQcOASsBIiYnLgEnLgEnERQWMyEyNjURNCYjISIGFRQWFx4BFx4BOwEyNjc+ATc+ATU3ERQGIyEiJjURNDYzITIWA7cJFAs9ejwgTywCLE8gPHo9CxQJCwcDSgcLAhD8tgcLLiY6cjkXSB4CHkgXOXI6HDhJNiX8tiU2NiUDSiU2WwG3ChMIMGAyGzU1GzJgMAgTCv5JBwsLBwJZCxwLBzFTHi1bLRM6OhMtWy0WUyQV/ZIlNjYlAm4mNjYAAQAAAAAEAANuACoAACUiJicBJicuAScmNTQ3PgE3NjMyFhc+ATMyFx4BFxYVFAcOAQcGBwEOASMCAAcNBf6bARUVMBMUExJHMjNAS4IiIoJLQDMyRxITFBMxFBUC/pwFDQcABQUBWAIVFUUuLjM/MjFFEhNaIiJaExJFMTI/My4uRhUVAv6pBQUAAAABAAAAGgO3A6UALgAAARQGDwETHAEVFAYjIiYnJQUOASMiJjU0NjUTJy4BNTQ2NyUTPgEzMhYXEwUeARUDtwkGzzELDAYMBf7//wAGCwYMDAEx0AUJFQsBH4AEDwkKDwOBAR8KFgJFCA4Fy/7jAwYDCxEEA4aGAwQRCwMGAwEdywUOCA0MASoBBAgQEAj+/CoBDA0AAgAAABoDtwOlAAkAOAAAATcvAQ8BFwc3FwEUBg8BExwBFRQGIyImJyUFDgEjIiY1NDY1EycuATU0NjclEz4BMzIWFxMFHgEVAoqv8mxs8a8q2NgBBAkGzzELDAYMBf7//wAGCwYMDAEx0AUJFQsBH4AEDwkKDwOBAR8KFgF5qiPb2yOq8HFxAbwIDgXL/uMDBgMLEQQDhoYDBBELAwYDAR3LBQ4IDQwBKgEECBAQCP78KgEMDQAAAAIAAAAAAtsDbgAbADcAACUUBiMhIiY1NDc+ATc2Mx4BMzI2NzIXHgEXFhUDFAcOAQcGIyInLgEnJjU0Nz4BNzYzMhceARcWAttHMv4YMkgICColJDgjWzU0XCM4JCQqCAiSERE8KCgtLigoOxESEhE7KCguLSgoPBERlz5ZWT45OTpdHh0hKCghHR5dOjk5AfstKCg8ERERETwoKC0uKCg7ERISETsoKAAAAAAEAAAASQO3A24AEAAhADEAQQAAARUUBiMhIiY9ATQ2MyEyFhURFRQGIyEiJj0BNDYzITIWFQEVFAYjISImPQE0NjMhMhYRFRQGIyEiJj0BNDYzITIWAbcrHv7bHisrHgElHisrHv7bHisrHgElHisCACse/tseKyseASUeKyse/tseKyseASUeKwFu3B4rKx7cHisrHgG33B4rKx7cHisrHv5J3B4rKx7cHisrAZncHisrHtweKysACQAAAEkEAANuAA8AHwAvAD8ATwBfAG8AfwCPAAAlFRQGKwEiJj0BNDY7ATIWERUUBisBIiY9ATQ2OwEyFgEVFAYrASImPQE0NjsBMhYBFRQGKwEiJj0BNDY7ATIWARUUBisBIiY9ATQ2OwEyFgEVFAYrASImPQE0NjsBMhYBFRQGKwEiJj0BNDY7ATIWARUUBisBIiY9ATQ2OwEyFhEVFAYrASImPQE0NjsBMhYBJSEWtxcgIBe3FiEhFrcXICAXtxYhAW0gF7YXICAXthcg/pMhFrcXICAXtxYhAW0gF7YXICAXthcgAW4gF7cWISEWtxcg/pIgF7YXICAXthcgAW4gF7cWISEWtxcgIBe3FiEhFrcXIO5uFyAgF24WISEBDm0XICAXbRcgIP7FbhcgIBduFiEhAjNuFyAgF24XICD+xG0XICAXbRcgIP7FbhcgIBduFiEhAjNuFyAgF24XICD+xG0XICAXbRcgIAEObhcgIBduFyAgAAYAAABJBAADbgAPAB8ALwA/AE8AXwAAJRUUBisBIiY9ATQ2OwEyFhEVFAYrASImPQE0NjsBMhYBFRQGIyEiJj0BNDYzITIWARUUBisBIiY9ATQ2OwEyFgEVFAYjISImPQE0NjMhMhYRFRQGIyEiJj0BNDYzITIWASUhFrcXICAXtxYhIRa3FyAgF7cWIQLbIBf93BcgIBcCJBcg/SUhFrcXICAXtxYhAtsgF/3cFyAgFwIkFyAgF/3cFyAgFwIkFyDubhcgIBduFiEhAQ5tFyAgF20XICD+xW4XICAXbhYhIQIzbhcgIBduFyAg/sRtFyAgF20XICABDm4XICAXbhcgIAAAAQBFAFEDuwL4ACQAAAEUBgcBDgEjIiYnAS4BNTQ2PwE+ATMyFh8BAT4BMzIWHwEeARUDuwgI/hQHFQoLFQf+4wgICAhOCBQLChUIqAF2CBUKCxQITggIAnMKFQf+FAgICAgBHQcVCwoVB04ICAgIqAF3CAgICE4HFQsAAAEAPwA/AuYC5gA8AAAlFAYPAQ4BIyImLwEHDgEjIiYvAS4BNTQ2PwEnLgE1NDY/AT4BMzIWHwE3PgEzMhYfAR4BFRQGDwEXHgEVAuYJB04IFAsLFAioqAcVCwoVB04ICAgIqKgICAgITgcVCgsVB6ioCBQLCxQITgcJCQeoqAcJwwoVB04ICAgIqKgICAgITgcVCgsVB6ioCBQLCxQITgcJCQeoqAcJCQdOCBQLCxQIqKgHFQsAAAACAAAAAANuA7cAPABKAAABFAcOAQcGIyInLgEnJjU0Nz4BNzY3NhYXFgYHDgEVFBceARcWMzI3PgE3NjU0JicuATc+ARcWFx4BFxYVAREUBiMiJjURNDYzMhYDbiMieFBQWltQUHciIwwLLSEhKRk8EhIJGDc+FxdQNTU9PDY1TxcXPTgYCBISPBgqISAtDAz+kiseHisrHh4rAbdbUFB3IiMjIndQUFs0MTJaJycfEwkYGDwSKntFPTU1UBcXFxdQNTU9RXsqEjwYGAkTHycnWjIxNAG3/pIeKyseAW4eKysAAAACAAAAAANuA24ACwCSAAABNCYjIgYVFBYzMjYlFRQGDwEOAQceARceARUUBgcOASMiJi8BDgEHDgEHDgErASImLwEuAScHDgEjIiYnLgEnLgE1NDY3PgE3LgEvAS4BPQE0Nj8BPgE3LgEnLgE1NDY3PgEzMhYfAT4BNz4BNz4BOwEyFh8BHgEXNz4BMzIWFx4BFx4BFRQGBw4BBx4BHwEeARUCSVY8PVVVPTxWASUJB2oFCgcOHxACBAMDClUPBAcETwwaDgMGBwILCH8HDAEQDRoNUAMIAwQIAxY2EgICAgMOHw8IDARoCAkJBmsECwcPHhADAwMCC1UPAwgDTw0aDQMHBwILB38IDAEQDRoMUQMHBAQHAxc2EgICAwIOHw8HDAVoBwoBtzxWVjw9VVV7fwYNARAOGgwVJxMDCAMEBwMNWQMCPgYLBRo2GgcJCgdpBQoGPQIDAwMVMxgDBwQDBwMTJxQOHA8PAQwIfgcNARAOGg0UJxMDBwQEBgMOWQQCPQYLBBs2GgcJCgdqBAoHPQMDBAIVMxkDBgQEBgMUJhQOHA4QAgwHAAAAAAYAAAAAAyUDbgAPAB8ALwA6AEQAaQAAAREUBisBIiY1ETQ2OwEyFhcRFAYrASImNRE0NjsBMhYXERQGKwEiJjURNDY7ATIWExEhERQWMyEyNjUBIScuAScjDgEHBRUUBisBERQGIyEiJjURIyImPQE0NjsBNz4BOwEyFh8BMzIWFQElCwgkCAsLCCQIC5ILByUICgoIJQcLkgoIJQcLCwclCApJ/gAQAwHbAhD+gAEAGwEHArUDBQIB9wsINzUm/iUmNjcHCwsHsSgILRe3Fi0JKLAICwIS/rcICgoIAUkICwsI/rcICgoIAUkICwsI/rcICgoIAUkICwv+WwId/eMVFxcVAmZDAgQBAQQCVSQIC/3jMEVDLwIgCwgkCApgFR4eFWAKCAAAAgATAEkDpAMlABUAPAAAAREUBisBNSMVIyImNRE0NjEJATAWFTcHDgErASImJwkBDgEnIiYvASY2NwE2Mh8BNTQ2OwEyFh0BFx4BBwMlFg/bk9sPFgEBSAFJAX8jAwYDAgQGAv50/nUDBwQDBwIjBQIFAZsSMxKLCwhtCAt9BQIFAYD+7g8W3NwWDwESAQIBD/7xAgEnKgIEAgIBSv62AgMBBAIqBg8FAVYPD3RvCAsLCOloBQ8GAAMAAP+3A24DtwATABwAJgAAAR4BFREUBiMhIiY1ETQ2MyEyFhcHFTMuAS8BLgETESMiJj0BIREhA0cQFyAX/QAXICAXAgAXNxBM1wMHA7IDDtXuFyD+SQLcAt4QNxf9bhcgIBcDkhcgFxAn1wgNA7MDB/yZAkkgF+78kgADAAAAAANuA24AFQAxAE0AAAERFAYrASImPQE0NjsBNTQ2OwEyFhUXNCcuAScmIyIHDgEHBhUUFx4BFxYzMjc+ATc2NxQHDgEHBiMiJy4BJyY1NDc+ATc2MzIXHgEXFgIACwe3CAoKCIAKCCUHC+4ZGFU4OUBAOTlUGRgYGVQ5OUBAOThVGBmAIyJ3UFBbW1BQdyMiIiN3UFBbW1BQdyIjAoD/AAgKCgglBwvJCAoKCMlAOThVGBkZGFU4OUBAOTlUGRgYGVQ5OUBbUFB3IiMjIndQUFtbUFB3IiMjIndQUAAAAAAEAAAASQO3A7cACwAXADEAUQAAJTQmIyIGFRQWMzI2NzQmIyIGFRQWMzI2NxUUBiMhIiY9ATQ2MyEXHgEzMjY/ASEyFhUDFgYHAQ4BIyImJwEuATc+ATsBETQ2OwEyFhURMzIWFwLbFQ8PFhYPDxWTFg8PFRUPDxZJIBf8txcgIBcBCk0QKBUWKBBOAQkXILoEBAj/AAUOBwYOBf8ACAUFBBILkxUPkw8VkgwSBLcPFRUPDxYWDw8VFQ8PFhaPtxcgIBe3FyBODxERD04gFwFFChYI/wAGBQUGAQAIFgoKDAEADxYWD/8ADAoAAAMAAAAAA24DbgAYADQAUAAAARQGBwUOASMiJicuATURNDY3NjIXBR4BFTM0Jy4BJyYjIgcOAQcGFRQXHgEXFjMyNz4BNzY3FAcOAQcGIyInLgEnJjU0Nz4BNzYzMhceARcWAqUKCf7JBAkFBQkECQkJCQgUCAE3CQpJGRhVODlAQDk5VBkYGBlUOTlAQDk4VRgZgCMid1BQW1tQUHcjIiIjd1BQW1tQUHciIwG3ChEFtgMDAwIFEQoBbgoRBQQFtwQRCkA5OFUYGRkYVTg5QEA5OVQZGBgZVDk5QFtQUHciIyMid1BQW1tQUHciIyMid1BQAAABAAAAAANuA24ATQAAAREUBiMhIiYnJjY/AS4BIyIHDgEHBhUUFx4BFxYzMjY3PgE3MhYfARYUBwYHDgEHBiMiJy4BJyY1NDc+ATc2MzIXHgEXFhc3PgEXHgEVA24WD/8ACxIFBAQITyhnOD01NVAXFxcXUDU1PUR5KgIHBAQHA04GBCAmJlcvLzFbUFB3IiMjIndQUFsqKSlOIyMeSggWCgoNAyX/AA8WDQoKFgdPJSkXF081Njw9NTVQFxc8NgMDAQMCTwUOBiUeHSkKCyMid1BQW1tPUHgiIwkIHxYXHEkIBQUEEgsAAgAAAAADbgNuADQAZwAAATAUFQYHDgEHBiMiJy4BJyYnBw4BIyImNRE0NjMhMhYVFAYPAR4BMzI2Nz4BNz4BOwEyFhUTERQGIyEiJjU0Nj8BLgEjIgYHDgEHDgErASImPQE2Nz4BNzYzMhceARcWFzc+ATMyFhUDXxIoJ29GRU8qKSlMIyQeSgUNBw8WFg8BAA8VBgVOKGg3TIUoCg0HAgkGbggKDxYP/wAPFQUFTyhoN0yFKAsMCAIIB3EICxMnKHBGRk8qKSlNIyQeSgYNBw8WAVsDAUtAP1sZGQgIHxcWHUoFBRUPAQAPFhYPBw0GTiYpS0EQIRIGBwsIAcr/AA8WFg8HDQVPJihKQREhEQYHCwcETEA/WhoZCAkfFhccSQUGFQ8AAAAIAAAASQQAA24AEAAgADAAQQBSAGMAdACEAAATFRQGKwEiJj0BNDY7ATIWFTUVFAYrASImPQE0NjsBMhY1FRQGKwEiJj0BNDY7ATIWARUUBiMhIiY9ATQ2MyEyFhU1FRQGIyEiJj0BNDYzITIWFTUVFAYjISImPQE0NjMhMhYVExE0JiMhIgYVERQWMyEyNjUTERQGIyEiJjURNDYzITIW2wsHJAgLCwgkBwsLByQICwsIJAcLCwckCAsLCCQHCwKTCwj93AcLCwcCJAgLCwj93AcLCwcCJAgLCwj93AcLCwcCJAgLSQsH/LYHCwsHA0oHC0k2Jfy2JTY2JQNKJTYBEiQICwsIJAgLCwiTJQcLCwclBwsLiyUHCwsHJQcLC/7UJAgLCwgkCAsLCJMlBwsLByUHCwsHkiUHCwsHJQcLCwf+bgHbBwsLB/4lCAsLCAJt/ZMmNjYmAm0mNjYAAAAAAgAAAAwDYgNuAAsAJgAAATQmIyIGFRQWMzI2ARQGBwEOASMiJicBLgE9ATQ2OwEyFhcBHgEVAQArHh8qKh8eKwJiDAn+5wobDw8bCf5nFh4rHu4eSRYBmQkMArceKyseHyoq/tYPGwr+5woLCwoBmRZIH+4eKx4W/mgLGw4AAAADAAAADAQ9A24ACwAmAEQAAAE0JiMiBhUUFjMyNgEUBgcBDgEjIiYnAS4BPQE0NjsBMhYXAR4BFTMUBgcBDgEjIiYnAT4BNTQmJwEuASMzMhYXAR4BFQEAKx4fKiofHisCYgwJ/ucKGw8PGwn+ZxYeKx7uHkkWAZkJDNsLCv7nChsPFhsPAQ0KCwsK/mcVSR+AH0kVAZkKCwK3HisrHh8qKv7WDxsK/ucKCwsKAZkWSB/uHiseFv5oCxsODxsK/ucKCxMPAQwKGw8OGwsBmBYeHhb+aAsbDgAIAAAASQQAA24AEAAhADEAQgBSAGMAcwCDAAA3FRQGKwEiJj0BNDY7ATIWFTUVFAYrASImPQE0NjsBMhYVNRUUBisBIiY9ATQ2OwEyFgEVFAYjISImPQE0NjMhMhYVARUUBisBIiY9ATQ2OwEyFgEVFAYjISImPQE0NjMhMhYVNRUUBiMhIiY9ATQ2MyEyFjUVFAYjISImPQE0NjMhMhaSCwduBwsLB24HCwsHbgcLCwduBwsLB24HCwsHbgcLA24LB/0ACAsLCAMABwv8kgsHbgcLCwduBwsDbgsH/QAICwsIAwAHCwsH/QAICwsIAwAHCwsH/QAICwsIAwAHC8luBwsLB24HCwsH3G4HCwsHbgcLCwfbbgcLCwduBwsL/kJuBwsLB24HCwsHApJtCAsLCG0ICwv+Qm4HCwsHbgcLCwfbbgcLCwduBwsL1G0ICwsIbQgLCwAAAAQAAAAAA2IDYgAHABwAIQAyAAA/AScHFTMVMwE0JiMiBgcBDgEVFBYzMjY3AT4BNScXASM1ARQGDwEnNz4BMzIWHwEeARXPNIY0ST0BKwcFAwUC/soCAgcGAgUDATUCAh/u/iXuA2IMCV/uXwobDg8bCocJDEk0hjQ9SQISBgcCAv7KAgUCBgcCAgE2AgUCbu7+Je4BpA4bCl/uXgoMDAqGChsPAAAAAAIAAAAAAkkDbgALACgAAAE0JiMiBhUUFjMyNjcUBgcDDgEjIiYnAy4BNTQ3PgE3NjMyFx4BFxYVAbdWPD1WVj08VpIIC9AJJBQVJAnQCwgXF082NT08NjVPFxcCST1VVT08VlY8GjUX/kYTFhYTAboXNRo9NTVQFxcXF1A1NT0ABQAAAEkD6wNuAAcAFQBKAE8AWgAAATcnBxUzFTMTJgYPAQYUFxY2PwE+ARMVFAYjISImNRE0NjMhMhYXHgEXFgYPAQ4BJy4BIyEiBhURFBYzITI2PQE0Nj8BPgEXHgEVAxcBIzUBByc3NjIfARYUBwH7Q1dCNiD8BAsEyAQDBAsEyAQBKmFE/iVFYGBFAdsRIhAEBQEBAwMcBAoEBw0G/iUmNjYmAdsmNQMDJAQLBQUHN6T+gKQCfTSlNRAuEFYQEAESQ1ZCIDcBnAQBBMgECwQEAQTIBAv+sGxEYWFEAdtEYQcIAQcFBAkDHAQDAgICNib+JSY2NiZIAwcCJQQCAgIJBgGmpf6ApQE1NaU0EBBXEC4PAAAAAAIAAABJA6kDbgA6AFAAAAEVFAYjISImNRE0NjMhMhYXHgEXFgYPAQ4BIyImIy4BIyEiBhURFBYzITI2PQE0Nj8BPgEzMhYXHgEVEwEGIi8BJjQ/ATYyHwEBNjIfARYUBwMlYUT+JUVgYEUB2xEiEAQFAQEDAxwDBwMBAwEHDQb+JSY2NiYB2yY1AwMkAwcDAgMCBQeE/i4NJg71Dg4+DiYOlgFyDSYOPw0NAaO1RGFhRAHbRGEHCAEHBQQJAxwDAwECAjYm/iUmNjYmkQMHAiUDAwEBAgkGARj+Lw4O9Q4mDj4ODpYBcg4OPw4lDgAAAAEAAP//AxcDbgALAAAJAQYmNRE0NhcBFhQDF/0JDRMTDQL3DQGl/loHCw8DSQ8MCP5bCBUAAAAAAgAAAAADbgNuAA8AIAAAAREUBiMhIiY1ETQ2MyEyFgURFAYjISImNRE0NjMhMhYVA24WD/7cDxYWDwEkDxb+ABYP/twPFhYPASQPFgNJ/NwPFhYPAyQPFhYP/NwPFhYPAyQPFhYPAAABAAAAAANuA24ADwAAAREUBiMhIiY1ETQ2MyEyFgNuFg/83A8WFg8DJA8WA0n83A8WFg8DJA8WFgAAAAABAGMAGgKdA50AFQAACQIWFA8BBiInASY0NwE2Mh8BFhQHAp3+0QEvCwtfCh4L/lgLCwGoCx4KXwsLAwv+0P7RCx4KXwsLAagKHgsBqAsLXwoeCwABAD4AGgJ5A50AFQAACQEGIi8BJjQ3CQEmND8BNjIXARYUBwJ5/lgLHgtfCgoBMP7QCgpfCx4LAagKCgHC/lgLC18KHgsBLwEwCx4KXwsL/lgLHgoAAAAAAwAAAAADbgNuABAAQwBfAAAlNTQmKwEiBh0BFBY7ATI2NRM0Jy4BJyYjIgYHBhYfAR4BMzI2Nz4BNz4BMzIWFRQGBw4BHQEUFjsBMjY1MTQ2Nz4BNRcUBw4BBwYjIicuAScmNTQ3PgE3NjMyFx4BFxYCAAsHbggKCghuBwuSEhM8JSUlRmklBAMGSwIGAwQIAhUUCQcaEBsrGBofQQoIbgcLFxQhRtwjIndQUFtbUFB3IyIiI3dQUFtbUFB3IiOlbQgLCwhtCAsLCAGAJyEiMQ4NPD0GDgQ5AgIEAxoVBgUIHRMXGgwOQSoVBwsLBwojDBI9Qm5bUFB3IiMjIndQUFtbUFB3IiMjIndQUAAAAAADAAAAAANuA24AHwAvAEsAACU1NCYrARE0JisBIgYdARQWOwEVIyIGHQEUFjMhMjY1AzU0JisBIgYdARQWOwEyNgUUBw4BBwYjIicuAScmNTQ3PgE3NjMyFx4BFxYCSQoINwsHtwgKCgg3NwgKCggBAAgKSQsHbggKCghuBwsBbiMid1BQW1tQUHcjIiIjd1BQW1tQUHciI6VbCAoBJQgKCghcBwu3CghbCAsLCAIAWwgKCghbCAsL5ltQUHciIyMid1BQW1tQUHciIyMid1BQAAAAAAEAAABJAyUDbgAkAAABFRQGKwEVFAYrASImPQEjIiY9ATQ2OwE1NDY7ATIWHQEzMhYVAyUhFu4gF24WIO4XICAX7iAWbhcg7hYhAhJtFyDuFyAgF+4gF20XIO4XICAX7iAXAAABAE0AAANqA24ANQAAAR4BDwEOAS8BFRQGKwEiJj0BBwYmLwEmNj8BJy4BPwE+AR8BNTQ2OwEyFh0BNzYWHwEWBg8BA08aEA8lDzsamCseSR4rmBo7DyUPEBqYmBoQDyUPOxqYKx5JHiuYGjsPJQ8QGpgBXw87Gj8aEA9YsB4rKx6wWA8QGj8aOw9YWA87Gj8aEA9YsB4rKx6wWA8QGj8aOw9YAAMAAAAAA24DbgAcACwAQwAAATIXHgEXFhUUBw4BBwYjIicuAScmNTQ3PgE3NjMTNTQmKwEiBh0BFBY7ATI2JxM0JicuASsBIgYHDgEVExQWOwEyNjcBt1tQUHciIyMid1BQW1tQUHcjIiIjd1BQW0kKCG0ICwsIbQgKAQoDAwIHBH4EBwMDAgkMCGkICwEDbiMid1BQW1tQUHciIyMid1BQW1tQUHciI/03bQcMDAdtCAsLzQFjAwUCAgICAgIFA/6dBgkJBgAAAwAJAAAD9wO3AA8AJgA8AAAlNTQmKwEiBh0BFBY7ATI2JxM0JicuASsBIgYHDgEVExQWOwEyNjUDARYUBw4BIyEiJicmNDcBPgEzMhYXAkkKCG4ICgoIbggKAQoCAwMHBH4EBwMDAgkMCGoHDAgBtwkKCiIT/JITIgoKCQG3CSMUFCMJpW0HDAwHbQgLC94BBgMGAgIEBAICBwP++wYHBwYCFvzbESYRERMTEREmEQMlERUVEQAAAAEAPgBgA8ICmgAVAAAlBwYiJwkBBiIvASY0NwE2MhcBFhQHA8JfCx4L/tH+0QseC18KCgGoCx4LAagKCr5eCwsBL/7RCwteCx8KAagKCv5YCh8LAAEAPgBCA8ICewAVAAAJAQYiJwEmND8BNjIXCQE2Mh8BFhQHA8L+WAseC/5YCgpfCx4LAS8BLwseC18KCgHp/lkLCwGnCx4LXgsL/tEBLwsLXgseCwAAAAAFAAAAAASSA24AAwAIAA4AEwAYAAABESMRAREjETMBFSERMxEBESMRMzcRIxEzAW6TAW6SkgJJ+25JAtyTk9uSkgG3/tsBJQEk/bcCSf1uSQNu/NsCAP5JAbfc/W0CkwAGAAD/vwRJA64ACwAXACMApAD8AVQAAAE0JiMiBhUUFjMyNgU0JiMiBhUUFjMyNhE0JiMiBhUUFjMyNgcVFAYPAQ4BBx4BFx4BFRQGBw4BIyImLwEOAQcOAQcOASsBIiYvAS4BJwcOASMiJicuATU0Njc+ATcuAS8BLgE9ATQ2PwE+ATcuAScuATU0Njc+ATMyFh8BPgE3PgE3PgE7ATIWHwEeARc3PgEzMhYXHgEVFAYHDgEHHgEfAR4BFQEVFAYjDgEHHgEVFAYHDgEjIiYnIgYjIiYjDgEjIiYnLgE1NDY3LgEnIiY9ATQ2Nz4BNy4BNTA2Nz4BMzIWFz4BMzIWFz4BPwEyFhceATEUBgceARceARURFRQGBw4BBx4BFRQGBw4BIyImJyIGIyImIw4BIyImJy4BNTQ2Ny4BJy4BPQE0Njc+ATcuATU0Njc+ATMyFhcyNjMyFjM+AT8BMhYXHgEVFAYHHgEXHgEVAgBWPD1WVj08VgG3Kx4eKyseHisrHh4rKx4eK9wHBlgECQYMGg4CAgICCUcMBAYCQgsVDAIFBgIJBmoGCwENCxULQwIGAwQGAgxHAwENGQ0GCwNXBggIBVkDCQYMGg0CAgEDCEcNAwYDQQsWCwIGBQIKBmoGCgENCxYKQwMGAwMGAwtHAgIMGgwGCgRXBgcBbkwJAwkFBBkBAQVAAgYuBAQJBAUIBAUuBQM/BQIBGgQGCAQITU0IBAgGBBoBAgU/AwUuBQQIBQQJBAwaDgQCQAUBARkEBQkDCUxMCQMJBQQZAQEFQAIGLgQECQQFCAQFLgUDPwUCARoEBggECE1NCAQIBgQaAQIFPwMFLgUECAUECQQMGg4EAkAFAQEZBAUJAwlMAbc8VlY8PVVV6B4rKx4eKysCZx4sLB4eKyvSagULAQ4LFQsRIRACBgMDBgIMSQICMwUJBBUuFQYICAZYAwkGMwICAgILRA0DBQMQIBELGAwNAQoGagULAQ0MFQsRIBECBgMDBgIMSQICMwUJBBUuFQYICQZXBAkFMwICAgMKRQwDBQMRHxEMFwwNAQoG/s9QBgsJDgcJPggBAgEDJjwGAQEGPCYDAQIBBz8JBw4JCwZQBwoBCA8HCD8IAwECJjsHAQEBAREhDgIlAwEDCD8IBw8IAQoHAklQBgoBCA8HCT4IAQIBAyU7BgEBBjslAwECAQc/CQcPCAEKBlAHCgEIDwcIPwgBAgECJjsGAQEQIQ8BJQMBAgEIPwgHDwgBCgcAAAIAAABJBAADtwAoAEsAAAEVFAYjISImNRE0NjMhMhYdARQGIyEiBhURFBYzITI2PQE0NjsBMhYVExEUBiMiJi8BAQ4BIyImLwEuATU0NjcBJy4BNTQ2MyEyFhUDJWFE/iVFYGBFAZIICgoI/m4mNjYmAdsmNQsIJAgL2xYPBw0FZf6MAwcEAwcDQQIEBAIBdWUFBhYPASQPFgGlt0RhYUQB20RhCwgkCAo2Jv4lJjY2JrcHCwsHAe3+3A8WBgVl/osDAwMDQQMHAwQHAgF1ZQUNBw8WFg8AAAIAAABJAyUDbgAPAB8AAAEhIgYVERQWMyEyNjURNCYXERQGIyEiJjURNDYzITIWAoD+JSY2NiYB2yY1NX9hRP4lRWBgRQHbRGEDJTYm/iUmNjYmAdsmNlz+JURhYUQB20RhYQADACX/twPbA7cAEgAwAGcAAAU0JiMiJjU0JiMiBhUUFjMyNjUlISYnLgEnJjU0Jy4BJyYjIgcOAQcGFRQHDgEHBgchFAYjIRQGIyImNSEiJjU2Nz4BNzY1NDc+ATc2Ny4BNTQ2MzIWFRQGBxYXHgEXFhUUFx4BFxYXAgkFBCIwBgMEBjsqBAX+hALmJhwdJgkKDQ02Kik4OCkqNg0NCgkmHRwmA04rHv8AVjw8Vv8AHisfISA1ERARET4tLTkCAyAXFyADAjktLT4RERARNSAhHxIEBTAiBAUFBCk7BQSkLDMzdkRDTRsgIDcSExMSNyAgG01DRHYzMyweKzxWVjwrHhsnJ3FNTWgpKSpFGRkJBQsGFyAgFwYLBQkZGUUqKSloTU1xJycbAAEAAQAAA20DbABiAAABFx4BBw4BDwEXFgYHDgEvAQcOAQciBiMiJi8BBw4BJy4BLwEHBiYnLgE/AScuAScmNj8BJy4BNz4BPwEnJjY3PgEfATc+ATc2Fh8BNz4BFx4BHwE3NhYXHgEPARceARcWBgcDEk8IBgIDEAtsHwMGCAgVC2ocAhALAwUDCA8GTU0IFgoLEAIcagsVCAgGAx5rCxADAgUJTk4JBQIDEAtrHgMGCAgVC2ocAhALChYITU0IFQsLEAIcagsVCAgGAx9sCxADAgYIAbdNCBYKCxACHGoLFQgIBgMeawsQAwEHBk5OCQUCAxALax4DBggIFQtqHAIQCwoWCE1NCBULCxACHGoLFQgIBgMfbAsPAwMGCE9PCAYDAw8LbB8DBggIFQtqHAIQCwsVCAAAAAEAAwAAAyIDJQAeAAABFgYHAREUBgcOASMiJi8BLgE1EQEuATc+ATMhMhYXAyIEBAj+5gwKBAcEBw0FkwUF/uYIBAQEEgwC2wsSBQMOChYI/uf+WAwSBAECBQaSBQ4HARYBGQgWCgoNDQoAAAEAAAAAA24DbgBZAAABBxc3PgEXHgEVERQGIyEiJicmNj8BJwcXHgEHDgEjISImNRE0Njc2Fh8BNycHDgEjIiYnLgE1ETQ2MyEyFhcWBg8BFzcnLgE3PgEzITIWFREUBgcOASMiJicC3cvLUggWCgoNFg//AAsSBQQECFPLy1IIBQUEEgv/AA8WDQoKFgdTyspTBQ0HBAcDCg0WDwEACxIEBQUIUsvLUwgEBAUSCwEADxYNCgMHBAcNBgKCy8tSCAUFBBIL/wAPFg0KChYHU8rKUwcWCgoNFg8BAAsSBAUFCFLLy1MFBQEBBRILAQAPFg0KChYIUsvLUggWCgoNFg//AAsSBQEBBQUAAAAGAAD/twRJA7cAGgA2AEIAXgB4AIQAAAEOAQcjIiY1NDc+ATc2MzIWMzI2Nw4BFRQWFwEUBiMhIiY1NDc+ATc2MzIWMzI2MzIXHgEXFhUBFAYjIiY1NDYzMhYBFAcOAQcGIyInLgEnJjU0Nz4BNzYzMhceARcWBRQGKwEuASc+ATU0JiceATMyNjMyFx4BFxYDFAYjIiY1NDYzMhYBUy1OHUwrRAEBDQ4PGwlSORQmEgEBGBYCZFRF/g1FVAgHKyYnPw9oVlVpDj8nJisIB/23Vj08VlY8PVYBkhESOygoLS4oKDsSERESOygoLi0oKDsSEQFJRCtMHU4tFxgCARImFDpRCRwODg0BAUlWPD1WVj08VgG3ASYiKzARIiFDGRkwBgcKEgonSyD+lEZOTkYwOjliISFPTyEhYjk6MALaPVZWPTxWVv7oLSgoPBERERE8KCgtLigoOxESEhE7KCiuMCsiJgEgSycKEgoHBjAZGUMhIgFLPVZWPTxWVgAAAAADAAkACQOuA64AIwBIAIAAAAE0Ji8BLgEjIgYHHgEVFAYjIiYnDgEVFBYfAR4BMzI2PwE+AQE0Ji8BLgEjIgYPAQ4BFRQWHwEeATMyNjcuATU0NjMyFhc+ATUBFAYPAQ4BIyImLwEuATU0NjcnDgEjIiYvAS4BNTQ2PwE+ATMyFh8BHgEVFAYHFz4BMzIWHwEeAQNACAh3CBQLDBQJDhsgFxUcDwkJCAh1CBQLCxQIVAgI/m4ICHUIFQoLFAhUCAgICHcHFQsMFAkOGyAWFhwOCQoCABoXVBc8ISE8F3YXGRsYMxc+ISE9F3cXGRoXVBc8ISE8F3YXGBoYMhg9IiE9F3cXGQEACxQIdwcJCgkOHBYWIBsOCRQNCxQIdggICAdUBxQBngsUCHYICAgHVAgTCwsUCHcIBwgJDxwVFyAbDgkUDf5tITwXUxgYGRh2FzwhIj4XMxgbGRd3GDwhID0XUxcZGRh2Fz0gIj4YMhgaGBh2GDwAAAAAAwAAAEkDbgMlAA8AHwAvAAAlFRQGIyEiJj0BNDYzITIWERUUBiMhIiY9ATQ2MyEyFhEVFAYjISImPQE0NjMhMhYDbhYP/NwPFhYPAyQPFhYP/NwPFhYPAyQPFhYP/NwPFhYPAyQPFrdJDxYWD0kPFRUBFUkPFRUPSQ8WFgEWSQ8WFg9JDxYWAAoAAABJA7cDbgAQACAAMQBBAFEAYgByAIMAlACkAAAlNTQmKwEiBh0BFBY7ATI2NT0BNCYrASIGHQEUFjsBMjYFNTQmKwEiBh0BFBY7ATI2NQE1NCYrASIGHQEUFjsBMjYFNTQmKwEiBh0BFBY7ATI2BTU0JisBIgYdARQWOwEyNjUBNTQmKwEiBh0BFBY7ATI2BTU0JisBIgYdARQWOwEyNjU9ATQmKwEiBh0BFBY7ATI2NTcRFAYjISImNRE0NjMhMhYBJQsItwcLCwe3CAsLCLcHCwsHtwgLASQKCLcICgoItwgK/twLCLcHCwsHtwgLASQKCLcICgoItwgKASULCLYICwsItggL/tsKCLcICgoItwgKASULCLYICwsItggLCwi2CAsLCLYIC0k2Jv0AJTY2JQMAJjalbQgLCwhtCAsLCNtuBwsLB24ICgrTbQgLCwhtCAsLCAG2bggKCghuBwsL1G4HCwsHbggKCtNtCAsLCG0ICwsIAbZuCAoKCG4HCwvUbgcLCwduCAoKCNtuCAoKCG4HCwsHt/2TJjY2JgJtJjY2AAABAAABAAJJAkkAFQAAARQGBwEOASMiJicBLgE1NDYzITIWFQJJBgX/AAUNBwgNBf8ABQYWDwIADxUCJQgNBf8ABQYGBQEABQ0IDxUVDwAAAAEAAADbAkkCJQAUAAABFAYjISImNTQ2NwE+ATMyFhcBHgECSRUP/gAPFgYFAQAFDQgHDQUBAAUGAQAPFhYPBw4FAQAFBgYF/wAFDgABACUAkgFuAtsAFQAAAREUBiMiJicBLgE1NDY3AT4BMzIWFQFuFg8HDQb/AAUFBQUBAAYNBw8WArf+AA8WBgUBAAUOBwcNBgEABQUVDwAAAAEAAACSAUkC2wAVAAABFAYHAQ4BIyImNRE0NjMyFhcBHgEVAUkGBf8ABQ0HDxYWDwcNBQEABQYBtwcOBf8ABQYWDwIADxUFBf8ABg0HAAAAAgAAACUCSQNJABUAKwAAARQGBwEOASMiJicBLgE1NDYzITIWFTUUBiMhIiY1NDY3AT4BMzIWFwEeARUCSQYF/wAFDQcIDQX/AAUGFg8CAA8VFQ/+AA8WBgUBAAUNCAcNBQEABQYBSQcNBv8ABQUFBQEABg0HDxYWD9wPFhYPBw0FAQAFBgYF/wAFDQcAAAAAAQAAACUCSQFuABUAAAEUBgcBDgEjIiYnAS4BNTQ2MyEyFhUCSQYF/wAFDQcIDQX/AAUGFg8CAA8VAUkHDQb/AAUFBQUBAAYNBw8WFg8AAAABAAACAAJJA0kAFQAAARQGIyEiJjU0NjcBPgEzMhYXAR4BFQJJFQ/+AA8WBgUBAAUNCAcNBQEABQYCJQ8WFg8HDQUBAAUGBgX/AAUNBwAAAAcAAAAABAADJQALABcALQA5AEUAUQBtAAATNCYjIgYVFBYzMjYTNCYjIgYVFBYzMjYXNzYmJzEmBg8BDgEHBhYXFjY3NiYnJTQmIyIGFRQWMzI2ATQmIyIGFRQWMzI2BTQmIyIGFRQWMzI2FxQGBw4BIyEiJicuATU0Nz4BNzYzMhceARcWFdsqHx4rKx4fKm4rHh4rKx4eK/U5BA8PDhsDOiI2CQwuLCxPCwkZHAF5Kx4fKiofHiv+kiseHisrHh4rAQArHh4rKx4eK7cpKAUQCfzeCRAFKCkoKYtdXWpqXV2LKSgBJR4rKx4fKysBHx4rKx4fKyv02g8aBAMPD9oDKyMsTwsMLiwjQBQTHisrHh8rKwGMHyoqHx4rK08eKyseHysr4UqMPggJCQg9jUppXl2LKCkpKItdXmkAAAAAAgAl/7cD2wO3ABIASQAABTQmIyImNTQmIyIGFRQWMzI2NSUUBiMhFAYjIiY1ISImNTY3PgE3NjU0Nz4BNzY3LgE1NDYzMhYVFAYHFhceARcWFRQXHgEXFhcCCQUEIjAGAwQGOyoEBQHSKx7/AFY8PFb/AB4rHyEgNREQERE+LS05AgMgFxcgAwI5LS0+EREQETUgIR8SBAUwIgQFBQQpOwUEpB4rPFZWPCseGycncU1NaCkpKkUZGQkFCwYXICAXBgsFCRkZRSopKWhNTXEnJxsAAAAGAAD/twNuA7cAEwAcACYANwBHAFgAAAEeARURFAYjISImNRE0NjMhMhYXBxUzLgEvAS4BExEjIiY9ASERIQE0NjMhMhYdARQGIyEiJj0BBTIWHQEUBiMhIiY9ATQ2MwUyFh0BFAYjISImPQE0NjMhA0cQFyAX/QAXICAXAgAXNxBM1wMHA7IDDtXuFyD+SQLc/bYLCAGSCAoKCP5uCAsBpQgKCgj+bggLCwgBkggKCgj+bggLCwgBkgLeEDcX/W4XICAXA5IXIBcQJ9cIDQOzAwf8mQJJIBfu/JIB7gcLCwclCAoKCCWACwgkCAoKCCQIC5MKCCQICwsIJAgKAAAAAgAaAHUCQgKvACQASQAAJRQGDwEOASMiJicBLgE1NDY3AT4BMzIWHwEeARUUBg8BFx4BFTMUBg8BDgEjIiYnAS4BNTQ2NwE+ATMyFh8BHgEVFAYPARceARUBZgMCHQMHAwQHAv71AgMDAgELAgcEAwcDHQIDAwLh4QID3AMDHQIHBAMHA/72AwMDAwEKAwcDBAcCHQMDAwPh4QMDpQQHAxwDAwMDAQoDBwMEBwIBCwIDAwIdAggDAwgC4eADBwMEBwMcAwMDAwEKAwcDBAcCAQsCAwMCHQIIAwMIAuHgAwcDAAAAAgAHAHUCLwKvACQASQAAARQGBwEOASMiJi8BLgE1NDY/AScuATU0Nj8BPgEzMhYXAR4BFTMUBgcBDgEjIiYvAS4BNTQ2PwEnLgE1NDY/AT4BMzIWFwEeARUBVAMD/vYDBwMEBwIdAgQEAuHhAgQEAh0CBwQDBwMBCgMD2wMC/vUCBwQDBwMcAwMDA+DgAwMDAxwDBwMEBwIBCwIDAZIDBwP+9gMDAwMcAwcEAwcD4OECCAMDCAIdAgMDAv71AgcEAwcD/vYDAwMDHAMHBAMHA+DhAggDAwgCHQIDAwL+9QIHBAAAAQAaAHUBZgKvACQAAAEUBg8BFx4BFRQGDwEOASMiJicBLgE1NDY3AT4BMzIWHwEeARUBZgMC4eECAwMCHQMHAwQHAv71AgMDAgELAgcEAwcDHQIDAoADCALh4AMHAwQHAxwDAwMDAQoDBwMEBwIBCwIDAwIdAgcEAAAAAAEABwB1AVQCrwAkAAABFAYHAQ4BIyImLwEuATU0Nj8BJy4BNTQ2PwE+ATMyFhcBHgEVAVQDA/72AwcDBAcCHQIEBALh4QIEBAIdAgcEAwcDAQoDAwGSAwcD/vYDAwMDHAMHBAMHA+DhAggDAwgCHQIDAwL+9QIHBAAAAAACAAAAAARJA7cADwAuAAABETQmIyEiBhURFBYzITI2ExEUBiMhFBYVFAYjISImNTQ2NSEiJjURNDYzITIWFQQACwf8bQcLCwcDkwcLSTYl/skkFQ/+2w8VJP7JJTY2JQOTJTYBgAHbCAsLCP4lBwsLAeL9kyY2JDoPDxYWDw85JTYmAm0mNjYmAAAAAAMAAABJApIDbgAMABwALAAAJTQmIyIGFRQWMzI2NTcRNCYjISIGFREUFjMhMjYTERQGIyEiJjURNDYzITIWAW4WDw8VFQ8PFtsLB/4kBwsLBwHcBwtJNSb+JCU2NiUB3CY1kg8WFg8PFRUPXAIkCAsLCP3cCAsLAiz9kyY2NiYCbSY2NgAAAAACAAAAAANuA24AHAA5AAABIgcOAQcGFRQXHgEXFjMyNz4BNzY1NCcuAScmIwEUBw4BBwYjIicuAScmNTQ3PgE3NjMxMhceARcWAbdAOTlUGRgYGVQ5OUBAOThVGBkZGFU4OUABtyMid1BQW1tQUHcjIiIjd1BQW1tQUHciIwLuGRhVODlAQDk5VBkYGBlUOTlAQDk4VRgZ/slbUFB3IiMjIndQUFtbUFB3IiMjIndQUAAAAAAIACX/2wPbA7cACwAXACMALwA7AEcAVABhAAAlFAYjIiY1NDYzMhYFFAYjIiY1NDYzMhYBFAYjIiY1NDYzMhYBFAYjIiY1NDYzMhYBFAYjIiY1NDYzMhYBFAYjIiY1NDYzMhYBFAYjIiY1NDYzMhYVBRQGIyImNTQ2MzIWFQEtKx8eKyseHysBHCseHisrHh4r/m4rHh8qKh8eKwKvKx4fKysfHiv92TYmJTY2JSY2ApwqHx4rKx4fKv6TQS0tQUEtLUEBL0w0NkpKNjRMmh4rKx4fKiqUHysrHx4rKwF0HyoqHx4rK/7FHisrHh8qKgIaJTY2JSY2Nv6+HyoqHx4rKwF0LUFBLS5AQC52NUtLNTVLSzUAAAAAAQAAAAADbgNuABsAAAEUBw4BBwYjIicuAScmNTQ3PgE3NjMyFx4BFxYDbiMid1BQW1tQUHcjIiIjd1BQW1tQUHciIwG3W1BQdyIjIyJ3UFBbW1BQdyIjIyJ3UFAAAAAAAgANAEkDtwKqABUAJQAACQEGIi8BJjQ/AScmND8BNjIXARYUBwEVFAYjISImPQE0NjMhMhYBTv72Bg8FHQUF4eEFBR0FDwYBCgYGAmkLB/3bCAoKCAIlBwsBhf72BgYcBg8G4OEFEAUdBQX+9QUPBv77JQcLCwclCAoKAAMAHwALBCoDGgAVACYAPAAAJQcGIicBJjQ3ATYyHwEWFA8BFxYUBwEDDgEvAS4BNxM+AR8BHgEHCQEGIi8BJjQ/AScmND8BNjIXARYUBwFhHQYPBf71BQUBCwUPBh0FBeHhBQUBUdUCDQckBwcC1QINByQHBwIBeP71BQ8GHAYG4OAGBhwGDwUBCwUFlxwGBgEKBg8FAQsFBR0FEAXh4AYPBgJi/R4HBwIKAg0HAuIHCAIKAg4H/oz+9gYGHAYPBuDhBRAFHQUF/vUFDwYAAAAEAAAAAAJJA24ACwAXACMAWwAANzQmIyIGFRQWMzI2ETQmIyIGFRQWMzI2BTQmIyIGFRQWMzI2NxQGBxQHDgEHBgcOAR0BHgEVFAYjIiY1NDY3ES4BNTQ2MzIWFRQGBxE+ATc+ATcuATU0NjMyFhWlIRYXICAXFiEhFhcgIBcWIQFtIBcWICAWFyA3HhkZGUkrKiVENBgeQC0uQB4ZGR5ALi1AHhgVLhVPWAEZHkAtLkBuFiEhFhcgIAKpFyAgFxcgIDIXICAXFyAgFx8yDk0yMT4REAwVIyoODzIeLkBALh4yDwHUDjMeLUFBLR4zDv7kCw8HGT9aDjIfLUFBLQAAAgA6AEkCRwMlABAAQwAAJRUUBisBIiY9ATQ2OwEyFhUTFAYHDgEVMRQGKwEiJj0BNDY3PgE1NCYjIgYHDgEHDgEjIiYvAS4BNz4BMzIXHgEXFhUBkg0KiQkODgmJCg21VykZHg0KiQkMUiUhHjYiFCEJChoZBAkFBAcDXgcDBC+DVy4vLkoYF+mJCQ4OCYkKDQ0KAVdRTRcOMQwJEhYKGTRTEQ8hGxglCgcHGyAEBQMCRwYRCExMEhE9KioxAAAAAgAAAAAC2wNuAAkAJwAAAREhET4BNz4BNRMRFAcOAQcGBw4BIyImJyYnLgEnJjURNDYzITIWFQJu/wAWQSIuWW00NYE4NwUEBwQECAMFODeBNTUWDwKSDxUBkgFu/XYMKBskaz4Bt/5JWklIaBwdAwECAgEDHRxoSElaAbcPFhYPAAAAAwAAAW4DJQJJAA8AHwAwAAATFRQGKwEiJj0BNDY7ATIWBRUUBisBIiY9ATQ2OwEyFgUVFAYrASImPQE0NjsBMhYV2yAWbhcgIBduFiABJSAXbhYgIBZuFyABJSEWbhcgIBduFiECEm0XICAXbRcgIBdtFyAgF20XICAXbRcgIBdtFyAgFwAAAAMAAABJANsDbgAPAB8ALwAANxUUBisBIiY9ATQ2OwEyFhEVFAYrASImPQE0NjsBMhYRFRQGKwEiJj0BNDY7ATIW2yAWbhcgIBduFiAgFm4XICAXbhYgIBZuFyAgF24WIO5uFyAgF24WISEBDm0XICAXbRcgIAEObhcgIBduFyAgAAAAAAIAAAAAA24DbgAcADQAAAEyFx4BFxYVFAcOAQcGIyInLgEnJjU0Nz4BNzYzEz4BNTQmJyUmIgcOARURFBYXHgEzMjY3AbdbUFB3IiMjIndQUFtbUFB3IyIiI3dQUFvbCQoKCf7JCBQICQkJCQQJBQUJBANuIyJ3UFBbW1BQdyIjIyJ3UFBbW1BQdyIj/ikFEQoKEQS3BQQFEQr+kgoRBQIDAwMAAgAAAAADbgNuAB8ALwAAARE0JiMhIgYHBhYfAQEGFB8BFjI3ARceATMyNjc+ATUTERQGIyEiJjURNDYzITIWAtsVD/7uDBIEBAQIUv7PCws6Cx4LATFSBQ4HAwgDCgyTYUT93EVgYEUCJERhAaUBEg8VDAoKFghS/s8LHgs6CwsBMVIGBQIBBBIMAST93EVgYEUCJERhYQAFAAD/twNuA7cACAAaACsAPABNAAABHgEXIREeARcDIREUBiMhIiY1ETQ2MyERFBYTNTQmIyEiBh0BFBYzITI2NT0BNCYjISIGHQEUFjMhMjY1PQE0JiMhIgYdARQWMyEyNjUDRwQIBP7yBgoFJwE3IBf9ABcgIBcBySByCgj+bggLCwgBkggKCgj+bggLCwgBkggKCgj+bggLCwgBkggKAqcECwYBDgQIBP65/aUXICAXA5IXIP7JFyD+XCQICgoIJAgLCwiSJAgLCwgkCAoKCJIlBwsLByUICgoIAAAAAAMAAAAAA5IDbgALABwAXAAANzQmIyIGFRQWMzI2ExEUBisBIiY1ETQ2OwEyFhUhFAYHHgEVFgYHFhQHDgEHFgYHDgErASImJy4BIy4BNRE0Njc+ATc+ATc+ATc+ATc+ATMyFhUUBgcOAQczMhYVkhUPEBUVEA8VXBYPpA8WFg+kDxYCpBEOBQMBDA0FBQQQCwMPEBI5Jkk+cS4bMA8PFhUOEEITEB0NEQ0FBQ8SBQ4HYCAVCwUIBJ8sQbcPFRUPEBUVATT+kw8WFg8BbQ8WFg8WLhENGAYWJxEQIhEQHAogNBMWFyAQCRABFQ8Bbg4VAgFNGBQkDREwGRkyEgUGciEjNBYKDQ5BLQAAAAADAAD/twOSAyUADAAcAFwAABMUBiMiJjU0NjMyFhUTETQmKwEiBhURFBY7ATI2JR4BFRQGKwEeARceARUUBiMiJicuAScuAScuAScuAScuATURNDYzPgE3PgE7AR4BFx4BBx4BFxYUBx4BBxQGB5IVDxAVFRAPFVwWD6QPFhYPpA8WAoUOEUEsnwQIBQsVIGAHDgUSDwUFDRENHRATQhAOFRYPDzAbLnE+SSY5EhAPAwsQBAUFDQwBAwUCbg8WFg8PFRUP/tsBbg8VFQ/+kg8VFWQQLhcsQg0OCRY1IyFxBgUSMhkZMBENIxQZTQEBFQ8Bbg8VAQ8KDyEBFhYTNCALGxARIhARKBUGGA4AAQAAAAADXANuADsAAAEhHgEVFAcOAQcGIyInLgEnJjU0Nz4BNzYzMhceARcWFwcuASMiBw4BBwYVFBceARcWMzI3PgE3NjcjNQG3AZ4DBB4eb05NX1tQUHcjIiIjd1BQWywpKUogIR13GVZAODIxShYVFRZKMTI4QS4tOw8PBPkB9hEjFV5PT3EgICIjd1BQW1tQUHciIwgIHhUVG3MYLBYWSzIzOToyM0sWFRQVOiEhGJcABgAA/7cDbgO3ABMAHAAmADsAUABgAAABHgEVERQGIyEiJjURNDYzITIWFwcVMy4BLwEuARMRIyImPQEhESEBPgEfAR4BDwEXFgYPAQYmLwEmNDchFhQPAQ4BLwEuAT8BJyY2PwE2FhcDLgE3Ez4BHwEeAQcDDgEnA0cQFyAX/QAXICAXAgAXNxBM1wMHA7IDDtXuFyD+SQLc/e0FDwYdBgIEaGgEAgYdBg8FgQMDAkwDA4IEDwYdBgMFaGgFAwYdBg8E4QcJAU8CDAckCAkCTwEMCALeEDcX/W4XICAXA5IXIBcQJ9cIDQOzAwf8mQJJIBfu/JICAAYCBRUFDwaLiwYPBBYFAgasBQwFBQwFrAYCBRYEDwaLiwYPBRUFAgb+TQEMCAHbBwkCBQIMB/4lCAgBAAABABL/yQPuA58AOgAAARQHDgEHBiMiJy4BJyY1NDc+ATc2NxUGBw4BBwYVFBceARcWMzI3PgE3NjU0Jy4BJyYnNRYXHgEXFhUD7icnhlpaZmZaWoYnJyEgcU1NWT81Nk4WFx0dY0NCTExCQ2MdHRcWTjY1P1lNTXEgIQG3ZlpahicnJyeGWlpmXVNTgisrDYINICFfOzxCTEJDYx0dHR1jQ0JMQjw7XyEgDYINKyuCU1NdAAACAAAAAANuA24AHAA5AAABIgcOAQcGFRQXHgEXFjMyNz4BNzY1NCcuAScmIwEUBw4BBwYjIicuAScmNTQ3PgE3NjMxMhceARcWAbdMQkNjHR0dHWNDQkxLQ0NjHR0dHWNDQ0sBtyMid1BQW1tQUHcjIiIjd1BQW1tQUHciIwMlHR1jQ0NLTEJDYx0dHR1jQ0JMS0NDYx0d/pJbUFB3IiMjIndQUFtbUFB3IiMjIndQUAAAAAAJAAAAAANuAyUAAwAUABgAHAAgADEAQgBGAEoAADcVIzUlMhYdARQGKwEiJj0BNDY7ATcVITUTFSM1ARUhNQMyFh0BFAYrASImPQE0NjsBATIWHQEUBisBIiY9ATQ2OwEXFSM1ExUhNcnJAZIPFhYPkg8WFg+SXP4SgIADbv5bgA8WFg+SDxYWD5IBbg8VFQ+SDxYWD5K3gID+EpJJSUkVD5IPFhYPkg8V3ElJASRJSf23SUkCkxYPkg8WFg+SDxb+2xYPkg8VFQ+SDxZJSUkBJElJAAMADf+3BIYDtwARACQAVQAAARYXHgEXFhcUBiMhFAYjIiY1FzI2NTQmIyImNTQmIyIGFRQWMwEWFAcBBiYvASY2PwEuATU2Nz4BNzY1NDc+ATc2Ny4BNTQ2MzIWFRQGBx4BFzc2FhcDegsTEy0aGhksHv8AVT08VpIEBQUEIjAFBAQFOykCPQQG+9IFEAQwBQEFawYFHyEhNBEREBE+LS05AgMgFxcgAgNKax3vBg8FAdBAMjFNHB0VHis8VlU9ZAUEBAUwIgQFBQQpOwOSBg8F/GEFAQY3Bg8FXAgTChsnJ3FNTWgpKSpFGRkJBQsGFyAgFwYLBQtMMs8FAQYAAAAEAA3/twSGA7cAEgAlAD0AbwAABTQmIyImNTQmIyIGFRQWMzI2NQkBLgEjIgcOAQcGFRQHDgEHBgcFFAYjIRQGIyImNTchLgEnNxYXHgEXFhcTFxYUBwEGJi8BJjY/AS4BNTY3PgE3NjU0Nz4BNzY3LgE1NDYzMhYVFAYHHgEXNzYWFwJSBQQiMAUEBAU7KQQF/s0B9hZkUjgpKjYNDQUFEw8PFAMGLB7/AFU9PFZVAbEwQRE/CxMTLRoaGTEwBAb70gUQBDAFAQVrBgUfISE0EREQET4tLTkCAyAXFyACA0prHe8GDwUSBAUwIgQFBQQpOwUEAQ8Bsi1JExI3ICAbNzMyXCopJmseKzxWVT1JNoNON0AyMU0cHRUDHDcGDwX8YQUBBjcGDwVcCBMKGycncU1NaCkpKkUZGQkFCwYXICAXBgsFC0wyzwUBBgAAAAACAAAAAASSA24ABQALAAAlFSERMxEBEyERCQEEkvtuSQNukvxJAQABSUlJA2782wJJ/gABSQFK/rYAAAADAAAAAAPbA7cAFwAgACkAAAkBBgcOAQcGIyInLgEnJjU0Nz4BNzYzERchFAcOAQcGBxMhETIXHgEXFgG3ATgeIyRPKywtW1BQdyMiIiN3UFBbawG5CQkhGRgeXv5JW1BQdyIjAbr+yB4YGCIJCSMid1BQW1tQUHciI/5MAy4rK1AjIx4BgQG3IyJ3UFAAAAADAAAASQSSAyUAGwA5AFcAAAE0Jy4BJyYjIgcOAQcGFRQXHgEXFjMyNz4BNzYlNCcuAScmKwEWFx4BFxYVFAcOAQcGBzMyNz4BNzY3FAcOAQcGIyEiJy4BJyY1NDc+ATc2MyEyFx4BFxYCkhcXTzY1PD01NVAXFxcXUDU1PTw1Nk8XFwG3FxdPNjU83SEcGyYLCgoLJhscId08NTZPFxdJHB1kQkNL/klMQ0JjHR0dHWNCQ0wBt0tDQmQdHAG3PDY1TxcXFxdPNTY8PTU1UBcXFxdQNTU9PDY1TxcXGSAgSykqLS0qKksgIBkXF1A1NT1MQkNjHR0dHWNDQkxLQ0NjHR0dHWNDQwACAAAASQSSAyUAHgA6AAATNDc+ATc2MyEyFx4BFxYVFAcOAQcGIyEiJy4BJyY1ATI3PgE3NjU0Jy4BJyYjIgcOAQcGFRQXHgEXFgAdHWNCQ0wBt0tDQmQdHBwdZEJDS/5JTENCYx0dAyU8NTZPFxcXF082NTw9NTVQFxcXF1A1NQG3S0NDYx0dHR1jQ0NLTEJDYx0dHR1jQ0JM/tsXF1A1NT08NjVPFxcXF081Njw9NTVQFxcAAAAABAAA/7cEAAO3ABYAKgA9AEkAAAEyFhceARclJgcOAQcGByc2Nz4BNzYzBRMWFx4BFxY3AyYnLgEnJjU0NjcFFhcWBgcGBw4BJxM2NzYmJyYnJzIWFRQGIyImNTQ2Af5Cgz1DZiD+WC0rK0gcHA+dJS0tZjg3OP5VwRQfH0wqKy2DXE9QdCEhLCcDiyEBATs5OlNDkkjoGQsMAg8PHr1IZWVISGVlA7ciIydtQBYDCwstIiEr8y0kIzEMDej+hikfICgHCAn+/g4tLYZWVmBNjzxgV1taqEhIMCcgAwFkJisrVSkpIgNlR0hlZUhHZQAAAwAAAAADbgNuABAAIQA9AAABETQmKwEiBhURFBY7ATI2NSERNCYrASIGFREUFjsBMjY1NxQHDgEHBiMiJy4BJyY1NDc+ATc2MzIXHgEXFgGSCgiSCAsLCJIICgEACgiSCAsLCJIICtwjIndQUFtbUFB3IyIiI3dQUFtbUFB3IiMBEgFJCAsLCP63BwsLBwFJCAsLCP63BwsLB6VbUFB3IiMjIndQUFtbUFB3IiMjIndQUAAABAAAAAADbgNuABwAOABJAFkAAAEyFx4BFxYVFAcOAQcGIyInLgEnJjU0Nz4BNzYzETI3PgE3NjU0Jy4BJyYjIgcOAQcGFRQXHgEXFjciJjURNDY7ATIWFREUBisBIyImNRE0NjsBMhYVERQGIwG3W1BQdyIjIyJ3UFBbW1BQdyMiIiN3UFBbQDk4VRgZGRhVODlAQDk5VBkYGBlUOTl3CAsLCG0ICwsIbdwHCwsHbggKCggDbiMid1BQW1tQUHciIyMid1BQW1tQUHciI/0SGBlUOTlAQDk4VRgZGRhVODlAQDk5VBkYgAsHAUkICwsI/rcHCwsHAUkICwsI/rcHCwAAAAACABMAAAPtA24AAwBoAAABNyMHAQcOASsBBzMyFhceAQ8BDgErAQcOASsBIiYnLgE/ASMHDgErASImJy4BPwEjIiYnLgE/AT4BOwE3IyImJy4BPwE+ATsBNz4BOwEyFhceAQ8BMzc+ATsBMhYXHgEPATMyFhceAQcCNiWRJQJIIAIJB7olsgQHAwMCAiABCga7LgIKBoAECAMDAQEskS4CCgaBAwgDAgIBLLEFBwMCAgEgAgkHuiWyBAcDAwICIAEKBrsuAgoHgAQHAwMBASyRLgIKB4ADCAMCAgEssQUHAwICAQFukpIBIIAGCJIEAwQIBIAGCLsGCAQDAwkEsrsGCAQDAwkEsgQDAwkEgAYIkgQDAwkEgAYIuwYIBAMECASyuwYIBAMECASyBAMECAQABAAAAAADbgNuABAARABhAH4AAAEVFAYrASImPQE0NjsBMhYVExQGBw4BHQEUBisBIiY9ATQ2Nz4BNTQmIyIGBw4BBw4BIyImLwEuATc+ATMxMhceARcWFQMiBw4BBwYVFBceARcWMzI3PgE3NjU0Jy4BJyYjARQHDgEHBiMiJy4BJyY1NDc+ATc2MzEyFx4BFxYB9wsHXAgKCghcBwuSQx8WGgsHXAgKPB8ZHjMcDx4KCRQQAwcFAwUCPgYCBCNjQSMkIzkSEtJMQkNjHR0dHWNDQkxLQ0NjHR0dHWNDQ0sBtyMid1BQW1tQUHcjIiIjd1BQW1tQUHciIwEJWwgLCwhbCAoKCAEcPToSDRQNEwcLCwcnNSwODBUUGSAIBwYWEwQDAQIvBA8GNzYNDS8fICUBAB0dY0NDS0xCQ2MdHR0dY0NCTEtDQ2MdHf6SW1BQdyIjIyJ3UFBbW1BQdyIjIyJ3UFAAAAAAAgAA/7cEAAO3ABsAQgAAAREUBiMhIiY1ETQ2Nz4BNz4BMzIWFx4BFx4BFQE+ATc+AS8BLgEHDgEHDgEjIiYnLgEnJgYPAQYWFx4BFx4BMzI2NwQANiX8tiU2AwMtWuAbVCQkVBvgWi0DA/6+Q2AiBgIFFQUPBiJfQxtUJCRUG0NfIgYPBRUFAgYiYEMiZDg5ZSACQf3RJTY2JQIvBAcDJ0qjFEBAFKNKJwMHBP6yMEYaBA8GHgYCBRlGMBNAQBMxRRkFAgYeBg8EGkYwGElKFwAAAAADAAD/twQAA7cAMABHAGwAAAEXFgYHBgcOAQcGBw4BKwEiJicmJy4BJyYnLgE/AT4BFx4BFx4BOwEyNjc+ATc2FhcTES4BJy4BKwEiBgcOAQcRFBYzITI2NRMRFAYjISImNRE0Njc2Nz4BNzY3PgE7ATIWFxYXHgEXFhceARUDShcEAgUWICA9FxYDHlAsAixQHgMWFjsfIBUGAgUVBQ8GHlQ9FkkeAh5JFj9WHgYPBG0rSMYWSR4CHkkWxkgrCwcDSgcLSTYl/LYlNgwLLC4vVygnHx5QLAIsUB4dJyhZLy8rCwwBrR0GDgURGRkvERIBGTY2GQERES4YGRAFDgYeBgIFF0EvEDs7EDFCGAQCBv5lAhMnPJoQPDwQmjwn/e0HCwsHAhP97SU2NiUCEw8cCikmJkQeHhkZNjYZFx4fRSYnKAocDwAAAwAA/7cEkgO3AAMADQAnAAA3IREhKQERIRUzMhYdAQERFAYjIRUUBiMhIiY1ETQ2MyE1NDYzITIWkgG3/kkCSQEl/kk3JjUBtzUm/qQ1Jv3bJTY2JQFcNiUCJSY1SQElAbeTNSbJAe393CY2ySU2NiUCJSY1ySY2NgAAAAEAAAABAACd4j4xXw889QALBAAAAAAA3eu5mQAAAADd67mZAAD/twSSA7cAAAAIAAIAAAAAAAAAAQAAA8D/wAAABJIAAAAABJIAAQAAAAAAAAAAAAAAAAAAAG0EAAAAAAAAAAAAAAACAAAABAAAAAO3AAAEAAAABAAAAAO3AAADtwAAAtsAAAO3AAAEAAAABAAAAAQAAEUDJQA/A24AAANuAAADJQAAA7cAEwNuAAADbgAAA7cAAANuAAADbgAAA24AAAQAAAADYgAABD0AAAQAAAADYgAAAkkAAAQBAAADuwAAAykAAANuAAADbgAAAwAAYwK3AD4DbgAAA24AAAMlAAADtwBNA24AAAQAAAkEAAA+BAAAPgSSAAAESQAABAAAAAMlAAAEAAAlA24AAQMlAAMDbgAABEkAAAO3AAkDbgAAA7cAAAJJAAACSQAAAZIAJQFJAAACSQAAAkkAAAJJAAAEAAAABAAAJQNuAAACWwAaAjcABwGAABoBWwAHBEkAAAKSAAADbgAABAAAJQNuAAADvQANBEkAHwJJAAACewA6AtsAAAMlAAAA2wAAA24AAANuAAADbgAAA5IAAAOSAAADXAAAA24AAAQAABIDbgAAA24AAASSAA0EkgANBJIAAAPbAAAEkgAABJIAAAQ3AAADbgAAA24AAAQAABMDbgAABAAAAAQAAAAEkgAAAAAAAAAKABQAHgA6AKABCgFQAZoB9gJMAqgDZAPmBCQEgATyBcgGXAa4BvYHaAfeCFgIzAlgChAKUAq8C2gLvAv8DIgNAA0cDVANbg2YDcQOTA62DugPOg+eD/oQJBBQEIASWBLEEvYTihQmFFwU4hWiFl4Wohd2F54XxBfsGBQYXBiEGKwZTBm2GjYaqBsaG1gblhvcHCAceh0GHTYddB3cHlwevB7+H0IfhB/WICIgkiEYIZ4h+CKSIuwjRiOwJDAk2CT2JT4lwiYeJpYm8CdyKAoovikoKcwqCgABAAAAbQFVAAoAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEAAgAAAAEAAAAAAAIABwAzAAEAAAAAAAMAAgAnAAEAAAAAAAQAAgBIAAEAAAAAAAUACwAGAAEAAAAAAAYAAgAtAAEAAAAAAAoAGgBOAAMAAQQJAAEABAACAAMAAQQJAAIADgA6AAMAAQQJAAMABAApAAMAAQQJAAQABABKAAMAAQQJAAUAFgARAAMAAQQJAAYABAAvAAMAAQQJAAoANABoZmEAZgBhVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwZmEAZgBhZmEAZgBhUmVndWxhcgBSAGUAZwB1AGwAYQByZmEAZgBhRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff'); font-weight: normal; font-style: normal; font-display: block; } [class^="fa-"], [class*=" fa-"] { font-family: 'fa' !important; speak: never; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .fa-spin { -webkit-animation: fa-spin 2s infinite linear; animation: fa-spin 2s infinite linear } @-webkit-keyframes "fa-spin" { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } @keyframes "fa-spin" { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } .fa-asterisk:before { content: "\f069"; } .fa-plus:before { content: "\f067"; } .fa-question:before { content: "\f128"; } .fa-search:before { content: "\f002"; } .fa-envelope-o:before { content: "\f003"; } .fa-heart:before { content: "\f004"; } .fa-star:before { content: "\f005"; } .fa-star-o:before { content: "\f006"; } .fa-user:before { content: "\f007"; } .fa-th-large:before { content: "\f009"; } .fa-th:before { content: "\f00a"; } .fa-th-list:before { content: "\f00b"; } .fa-check:before { content: "\f00c"; } .fa-close:before { content: "\f00d"; } .fa-remove:before { content: "\f00d"; } .fa-times:before { content: "\f00d"; } .fa-power-off:before { content: "\f011"; } .fa-cog:before { content: "\f013"; } .fa-gear:before { content: "\f013"; } .fa-trash-o:before { content: "\f014"; } .fa-home:before { content: "\f015"; } .fa-file-o:before { content: "\f016"; } .fa-clock-o:before { content: "\f017"; } .fa-download:before { content: "\f019"; } .fa-play-circle-o:before { content: "\f01d"; } .fa-repeat:before { content: "\f01e"; } .fa-rotate-right:before { content: "\f01e"; } .fa-refresh:before { content: "\f021"; } .fa-list-alt:before { content: "\f022"; } .fa-tag:before { content: "\f02b"; } .fa-tags:before { content: "\f02c"; } .fa-list:before { content: "\f03a"; } .fa-pencil:before { content: "\f040"; } .fa-map-marker:before { content: "\f041"; } .fa-edit:before { content: "\f044"; } .fa-pencil-square-o:before { content: "\f044"; } .fa-check-square-o:before { content: "\f046"; } .fa-play:before { content: "\f04b"; } .fa-pause:before { content: "\f04c"; } .fa-stop:before { content: "\f04d"; } .fa-chevron-left:before { content: "\f053"; } .fa-chevron-right:before { content: "\f054"; } .fa-question-circle:before { content: "\f059"; } .fa-info-circle:before { content: "\f05a"; } .fa-exclamation-circle:before { content: "\f06a"; } .fa-exclamation-triangle:before { content: "\f071"; } .fa-warning:before { content: "\f071"; } .fa-chevron-up:before { content: "\f077"; } .fa-chevron-down:before { content: "\f078"; } .fa-bar-chart:before { content: "\f080"; } .fa-bar-chart-o:before { content: "\f080"; } .fa-cogs:before { content: "\f085"; } .fa-gears:before { content: "\f085"; } .fa-external-link:before { content: "\f08e"; } .fa-square-o:before { content: "\f096"; } .fa-bell-o:before { content: "\f0a2"; } .fa-certificate:before { content: "\f0a3"; } .fa-filter:before { content: "\f0b0"; } .fa-arrows-alt:before { content: "\f0b2"; } .fa-group:before { content: "\f0c0"; } .fa-users:before { content: "\f0c0"; } .fa-chain:before { content: "\f0c1"; } .fa-link:before { content: "\f0c1"; } .fa-bars:before { content: "\f0c9"; } .fa-navicon:before { content: "\f0c9"; } .fa-reorder:before { content: "\f0c9"; } .fa-table:before { content: "\f0ce"; } .fa-caret-down:before { content: "\f0d7"; } .fa-caret-up:before { content: "\f0d8"; } .fa-caret-left:before { content: "\f0d9"; } .fa-caret-right:before { content: "\f0da"; } .fa-sort:before { content: "\f0dc"; } .fa-unsorted:before { content: "\f0dc"; } .fa-sort-desc:before { content: "\f0dd"; } .fa-sort-down:before { content: "\f0dd"; } .fa-sort-asc:before { content: "\f0de"; } .fa-sort-up:before { content: "\f0de"; } .fa-dashboard:before { content: "\f0e4"; } .fa-tachometer:before { content: "\f0e4"; } .fa-bell:before { content: "\f0f3"; } .fa-file-text-o:before { content: "\f0f6"; } .fa-angle-double-left:before { content: "\f100"; } .fa-angle-double-right:before { content: "\f101"; } .fa-angle-left:before { content: "\f104"; } .fa-angle-right:before { content: "\f105"; } .fa-desktop:before { content: "\f108"; } .fa-tablet:before { content: "\f10a"; } .fa-circle-o:before { content: "\f10c"; } .fa-spinner:before { content: "\f110"; } .fa-circle:before { content: "\f111"; } .fa-terminal:before { content: "\f120"; } .fa-code:before { content: "\f121"; } .fa-code-fork:before { content: "\f126"; } .fa-shield:before { content: "\f132"; } .fa-ellipsis-h:before { content: "\f141"; } .fa-ellipsis-v:before { content: "\f142"; } .fa-play-circle:before { content: "\f144"; } .fa-external-link-square:before { content: "\f14c"; } .fa-file-text:before { content: "\f15c"; } .fa-thumbs-up:before { content: "\f164"; } .fa-thumbs-down:before { content: "\f165"; } .fa-google:before { content: "\f1a0"; } .fa-file-code-o:before { content: "\f1c9"; } .fa-circle-o-notch:before { content: "\f1ce"; } .fa-circle-thin:before { content: "\f1db"; } .fa-sliders:before { content: "\f1de"; } .fa-bell-slash:before { content: "\f1f6"; } .fa-bell-slash-o:before { content: "\f1f7"; } .fa-area-chart:before { content: "\f1fe"; } .fa-pie-chart:before { content: "\f200"; } .fa-toggle-off:before { content: "\f204"; } .fa-toggle-on:before { content: "\f205"; } .fa-chrome:before { content: "\f268"; } .fa-pause-circle:before { content: "\f28b"; } .fa-pause-circle-o:before { content: "\f28c"; } .fa-hashtag:before { content: "\f292"; } .fa-question-circle-o:before { content: "\f29c"; } .fa-envelope-open:before { content: "\f2b6"; } .fa-envelope-open-o:before { content: "\f2b7"; } .fa-window-restore:before { content: "\f2d2"; } .fa-minus:before { content: "\ea0b"; } ��goaccess-1.9.3/resources/css/app.css����������������������������������������������������������������0000644�0001750�0001730�00000052253�14624360252�013101� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GLOBAL */ html, body { background: #f0f0f0; overflow-x: hidden; } h1 { font-weight: bold; letter-spacing: -3px; } h3 { font-size: 21px; letter-spacing: -1px; } .h-dashboard { text-transform: lowercase; } .page-header { border-bottom: 1px solid rgba(0, 0, 0, 0.15); margin: 25px 0 20px; position: relative; } .page-header h1 { margin: 0; } .pagination { margin: 5px 0; } .clickable, .expandable>td { cursor: pointer; } .spinner { color: #999; left: 50%; position: absolute; top: 50%; } .powered { bottom: 190px; color: #9E9E9E; font-size: smaller; position: absolute; right: 20px; transform-origin: 100% 0; transform: rotate(-90deg); } .powered a { color: #636363; } .powered span { color: #007bc3; } .dropdown-header { color: #007bc3; padding: 3px 25px; text-transform: uppercase; } .gheader { letter-spacing: -1px; text-transform: uppercase; } h5.gheader { letter-spacing: 0; } .panel-header h4.gheader { margin-top: 20px; } .panel-header .gheader small { font-size: 69%; } /* NAVIGATION */ nav { -webkit-transition: left .2s; background: #1C1C1C; border-right: 3px solid #5bc0de; height: 100%; left: -236px; overflow: hidden; position: fixed; top: 0; transition: left .2s; width: 300px; z-index: 2; } nav .nav-list { bottom: 0; left: 0; overflow-y: scroll; position: absolute; right: -17px; top: 0; } nav header { margin: 40px 20px 30px; } nav header a { color: rgba(240,240,240,.7); font-size: 2.7em; font-weight: 300; text-transform: uppercase; } nav header a:hover { color: #eee; } nav.active { display: block !important; left: 0; opacity: .97; } nav:hover ~ #content { opacity: .3; } nav.active .nav-bars, nav.active .nav-gears, nav.active .nav-ws-status { opacity: 0; } nav .nav-bars, nav .nav-gears, nav .nav-ws-status { -webkit-transition: opacity .2s; color: #9E9E9E; cursor: pointer; float: right; font-size: 36px; height: 32px; left: 13px; line-height: 32px; position: fixed; text-align: center; top: 30px; transition: opacity .2s; width: 32px; } nav .nav-gears { top: 100px; opacity: 0.6; } nav .nav-ws-status, .nav-ws-status.mini { color: #6A6A6A; cursor: help; display: none; font-size: 12px; } nav .nav-ws-status { left: 25px; top: 125px; } .nav-ws-status.mini { top: 14px; left: 50px; position: absolute; } .nav-ws-status.connected { color: #5DB56A; } nav li { position: relative; } nav li .toggle-panel { cursor: pointer; opacity: 0; padding: 9px 20px; position: absolute; right: 0; top: 0; transition: all .2s; visibility: hidden; } nav li .toggle-panel i { color: rgba(200,200,200,.5); opacity: 0; } nav li .toggle-panel.active i { color: #eee; opacity: 1; } nav.active li .toggle-panel { visibility: visible; opacity: 1; } nav.active li:hover .toggle-panel i { opacity: 1; } nav li a { border-left: 3px solid transparent; color: rgba(200,200,200,.5); display: block; font-size: smaller; max-width: 235px; opacity: 0; overflow: hidden; padding: 9px 20px; text-overflow: ellipsis; text-transform: uppercase; transition: opacity .2s; white-space: nowrap; } nav.active li a { max-width: 90%; opacity: 1; } nav li:hover a, nav li.active a { background: rgba(0,0,0,.1); border-color: #5BC0DE; color: #eee; } nav ul { padding-left: 0; list-style: none; } /* Navigation -- Icon */ nav a, nav a:hover { text-decoration: none; } nav h3 { color: #FFF !important; font-size: medium; font-weight: bold; margin: 20px 25px 10px; text-transform: uppercase; } /* CONTAINER */ @media screen and (max-width: 767px) { .row-offcanvas { -webkit-transition: all .25s ease-out; -o-transition: all .25s ease-out; position: relative; transition: all .25s ease-out; } .row-offcanvas-right { right: 0; } .row-offcanvas-left { left: 0; } .row-offcanvas-right .sidebar-offcanvas { right: -50%; } .row-offcanvas-left .sidebar-offcanvas { left: -50%; } .row-offcanvas-right.active { right: 50%; } .row-offcanvas-left.active { left: 50%; } .sidebar-offcanvas { position: absolute; top: 0; width: 50%; }; } @media (min-width: 768px) { .container { width: 750px; }; } @media (max-width: 480px) { .wrap-general h5, .wrap-panel h5 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .wrap-general h5 { width: 100% } .wrap-panel h5 { width: 70% } } .container-fluid { margin-left: 75px; } @media (min-width: 1120px) { .container { width: 970px; }; } @media (min-width: 1320px) { .container { width: 1170px; }; } @media (max-width: 992px) { .container-fluid { margin-left: auto; }; } @media (max-width: 768px) { .container-fluid { padding-left: 5px; padding-right: 5px; } .page-header { padding: 0 10px; } } /* PANEL STYLES */ .wrap-panel .panel-header { position: relative; } div.wrap-panel > div { background: #FFF; margin-top: 10px; padding: 0 10px; border-top: 1px solid rgba(0, 0, 0, 0.15); } /* PANEL TABLES */ .wrap-panel table.table-borderless tbody tr td, .wrap-panel table.table-borderless tbody tr th, .wrap-panel table.table-borderless thead tr th { border: none; } .wrap-panel table thead tr th { text-align: right; border-bottom-width: 1px; } .wrap-panel table .string, .wrap-panel table .date { text-align: left; } .wrap-panel table .percent { color: #898989; } .wrap-panel table td, .wrap-panel table th { white-space: nowrap; overflow: hidden; } .wrap-panel table th.sortable { cursor: pointer; } .wrap-panel table.table-borderless thead>tr.thead-cols th { font-size: 78%; text-transform: uppercase; } .wrap-panel table .cell-hl { padding: 2px 3px; color: #FFF; border-radius: 5px; display: block; text-align: center; } .wrap-panel table .span-hl { padding: 2px 3px; border-radius: 3px; color: #000; } .wrap-panel table .span-hl.g5 { background: #e9ecef; } .wrap-panel table .cell-hl.b1 { background: #7F669D; } .wrap-panel table .cell-hl.b2 { background: #BA94D1; } .wrap-panel table .cell-hl.b3 { background: #DEBACE; } .wrap-panel table .cell-hl.d1 { background: #9d9d9d38; } .wrap-panel table .cell-hl.d2 { background: #9d9d9d61; } .wrap-panel table .cell-hl.d3 { background: #9d9d9d9c; } .wrap-panel table .cell-hl.d4 { background: #9d9d9d; } .wrap-panel table .span-hl.lgrn { background: #e6f4ea; color: #137333; } .wrap-panel table .span-hl.lyel { background: #fff3cd; color: #d38a10; } .wrap-panel table .span-hl.lred { background: #fce8e6; color: #c5221f; } .wrap-panel table .span-hl.lgry { background: #898989; color: #ffffff; } .wrap-panel table .span-hl.lblu { background: #cfe2ff; color: #052c65; } .wrap-panel table .span-hl.lprp { background: #cdc7ff; color: #343150; } /* thead meta */ .wrap-panel table thead>tr.thead-min th.meta-label, .wrap-panel table thead>tr.thead-avg th.meta-label, .wrap-panel table tfoot>tr.tfoot-totals th.meta-label, .wrap-panel table thead>tr.thead-max th.meta-label { font-weight: bold; text-transform: uppercase; } .wrap-panel table .thead-min, .wrap-panel table .thead-avg, .wrap-panel table .thead-max { background: #F8F8F8; } .wrap-panel table .thead-avg { border-bottom: 2px solid #000; } .wrap-panel table thead>tr.thead-min th, .wrap-panel table thead>tr.thead-avg th, .wrap-panel table thead>tr.thead-max th { font-size: smaller; font-weight: normal; padding: 3px 8px 3px 8px; text-transform: inherit; } .wrap-panel table .thead-min th, .wrap-panel table .thead-avg th, .wrap-panel table .thead-max th { padding: 3px; } .wrap-panel table tfoot>tr>th { border-top: 1px dotted #000; padding: 8px; } /* thead data */ .wrap-panel table tbody.tbody-data tr td { border-right: 1px solid #F1F1F1; font-size: smaller; } .wrap-panel table tbody.tbody-data td:last-child { border-right: none; } .wrap-panel table tbody.tbody-data td.row-idx { font-weight: 700; } .wrap-panel table>thead>tr.thead-cols { border-bottom: 2px solid #222; } .wrap-panel table tbody.tbody-data tr.shaded { background-color: #F7F7F7; } .wrap-panel table tbody.tbody-data tr. { background-color: #F7F7F7; } .wrap-panel table tbody.tbody-data tr.child td:nth-child(1), .wrap-panel table tbody.tbody-data tr.child td:nth-child(2) { border-right: none; } .wrap-panel table.table-hover>tbody>tr:hover { background-color: #EEE; } .wrap-panel .row:nth-child(2):not(.table-wrapper)>.col-md-12 { padding: 0; } /* GENERAL */ .wrap-general { position: relative; } .report-title { background: #FFF; border-radius: 4px; bottom: -10px; color: #9E9E9E; font-size: small; padding: 0 10px; position: absolute; right: 0; z-index: 1; } .panel-plot-wrap { position: absolute; right: 0; top: 18px; } .col-title { font-size: 85%; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 #FFF; white-space: nowrap; width: 100%; } .grid-module { background: #FFF; color: rgb(36, 36, 36); font-weight: normal; margin-top: 5px; padding: 7px; } .grid-module h3 { font-size: 25px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; } .grid-module.black { border-top: 4px solid #0F1214; } .grid-module.gray { border-top: 4px solid #9E9E9E; } .grid-module.red { border-top: 4px solid #FF303E; } .grid-module.blue{ border-top: 4px solid #00D4E1; } .grid-module.green { border-top: 4px solid #229f75; } @media (max-width: 767px) { .panel-plot-wrap { top: 10px; } .powered { bottom: 10px; left: 25px; transform: initial; } } /* CHARTS */ .chart-wrap { margin-bottom: 15px; position: relative; } svg { background-color: transparent; display: block; } .axis path { fill: transparent; stroke: black; shape-rendering: crispEdges; stroke-width: 1; } .grid.y .tick line, .grid.x .tick line { shape-rendering: crispEdges; stroke: #999; stroke-dasharray: 3 3; stroke-width: 1; } .axis.x .tick line, .axis.y0 .tick line, .axis.y1 .tick line, .grid.y .tick:first-child line { stroke: black; stroke-width: 1; shape-rendering: crispEdges; } .bars rect.bar { shape-rendering: crispEdges; } .rects rect { fill: transparent; } .area { opacity: 0.2; } .points { stroke: transparent; } line.indicator { fill: transparent; pointer-events: none; shape-rendering: crispEdges; stroke: #999; stroke-width: 1; display: none; } .area0, .bars.y0 .bar, .points.y0, rect.legend.y0 { fill: #447FB3; } .area1, .bars.y1 .bar, .points.y1, rect.legend.y1 { fill: #FF6854; } .line0, .line1 { fill: transparent; stroke-width: 1; } .line0 { stroke: #007BC3; } .line1 { stroke: #FF303E; } .axis text, .axis-label, text.legend { font: 10px sans-serif; } .axis-label.y0, .axis-label.y1 { text-anchor: end; } rect.legend { height: 10px; width: 10px; } .legend { cursor: pointer; } .wrap-text text { text-anchor: start!important; } /* CHART TOOLTIP */ .chart-tooltip-wrap { left: 0; pointer-events: none; position: absolute; top: 10px; z-index: 10; } .chart-tooltip { -moz-box-shadow: 7px 7px 12px -9px #777777; -webkit-box-shadow: 7px 7px 12px -9px #777777; background-color: #fff; border-collapse: collapse; border-spacing: 0; box-shadow: 7px 7px 12px -9px #777777; empty-cells: show; opacity: 0.9; } .chart-tooltip tr { border: 1px solid #CCC; } .chart-tooltip th { background-color: #aaa; color: #FFF; font-size: 14px; max-width: 380px; overflow: hidden; padding: 2px 5px; text-align: left; text-overflow: ellipsis; white-space: nowrap; } .chart-tooltip td { border-left: 1px dotted #999; font-size: 13px; padding: 3px 6px; } .chart-tooltip td > span { display: inline-block; height: 10px; margin-right: 6px; width: 10px; } .chart-tooltip td.value { text-align: right; } .chart-tooltip .blue { background-color: #007BC3; } .chart-tooltip .red { background-color: #FF303E; } /* DARK THEME */ .dark h1 { color: rgba(255, 255, 255, 0.6); } .dark h3, .dark h4, .dark h5 { color: rgba(255,255,255,0.4); } .dark .table-responsive { border: none; } .dark .wrap-panel > div > table { color: #D2D2D2; } .dark .wrap-panel table tbody.tbody-data tr td { border-right: none; } .dark .wrap-panel table.table-hover>tbody.tbody-data>tr:hover { background-color: rgba(255, 255, 255, 0.08) !important; } .dark .col-title { color: #9e9e9e; text-shadow:none; } .dark .grid-module h3 { color: #FFF; } .dark .dropdown-menu>li>a { color: #FFF; } .dark div.wrap-panel > div { color: #EEE; margin-top: 10px; padding: 0 10px; border-top: 1px solid rgba(255, 255, 255, 0.15); } .dark .wrap-panel table .cell-hl.d1 { background: #161616; } .dark .wrap-panel table .cell-hl.d2 { background: #3c3c3c; } .dark .wrap-panel table .cell-hl.d3 { background: #5a5a5a; } .dark .wrap-panel table .cell-hl.d4 { background: #7e7e7e; } /* DARK BLUE THEME */ html.dark.blue, .dark.blue body { background: #252B30; } .dark.blue .container { background: #252B30; } .dark.blue .page-header { border-bottom: 1px solid #3B444C; } .dark.blue .label-info { background-color: #252B30; } .dark.blue nav { border-right: 1px solid #181B1F; background: #1F2328; } .dark.blue div.wrap-panel > div { background: #1F2328; } .dark.blue .wrap-panel table tfoot>tr>th { border-top: 1px dotted #999; } .dark.blue .wrap-panel table .thead-min, .dark.blue .wrap-panel table .thead-avg, .dark.blue .wrap-panel table .thead-max { background: #1f2328; } .dark.blue .wrap-panel table .thead-avg { border-bottom: 2px solid #999; } .dark.blue .wrap-panel table>thead>tr.thead-cols { border-bottom: 2px solid #999; } .dark.blue .wrap-panel table tbody.tbody-data tr.shaded { background-color: #181B1F; } .dark.blue .gray { border-top: 4px solid #3B444C; } .dark.blue .grid-module { background: #1F2328; } .dark.blue .btn-default { color: #9E9E9E; background-color: #1F2328; border-color: #3B444C; } .dark.blue .btn-default:active, .dark.blue .btn-default:hover, .dark.blue .btn-default.active, .dark.blue .open>.dropdown-toggle.btn-default { color: #3B444C; background-color: #1F2328; border-color: #0F1214; } .dark.blue .pagination>.disabled>a, .dark.blue .pagination>.disabled>a:hover, .dark.blue .pagination>.disabled>a:focus { color: #777; } .dark.blue .pagination>li>a { background-color: #1F2328; border: 1px solid #3B444C; } .dark.blue .pagination>li>a:hover, .dark.blue .pagination>li>a:active, .dark.blue .pagination>li>a:focus { color: #0370B0; background-color: #1F2328; border-color: #3B444C; } .dark.blue .dropdown-menu>li>a:hover, .dark.blue .dropdown-menu>li>a:focus { color: #FFF; background-color: #3B444C; } .dark.blue .dropdown-menu { background-color: #252B30; } .dark.blue::-webkit-scrollbar-track, .dark.blue .table-responsive::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); background-color: #9E9E9E; } .dark.blue::-webkit-scrollbar, .dark.blue .table-responsive::-webkit-scrollbar { width: 10px; height: 10px; background-color: #9E9E9E; } .dark.blue::-webkit-scrollbar-thumb, .dark.blue .table-responsive::-webkit-scrollbar-thumb { background-color: #3B444C; } .dark.blue .chart-tooltip { background-color: #252B30; } .dark.blue .report-title { background: #1F2328; } /* DARK GREY THEME */ html.dark.gray, .dark.gray body { background: #212121; } .dark.gray .container { background: #212121; } .dark.gray .page-header { border-bottom: 1px solid #303030; } .dark.gray .label-info { background-color: #303030; } .dark.gray nav { border-right: 1px solid #363737; background: #1C1C1C; } .dark.gray div.wrap-panel > div { background: #1C1C1C; } .dark.gray .wrap-panel table tfoot>tr>th { border-top: 1px dotted #999; } .dark.gray .wrap-panel table .thead-min, .dark.gray .wrap-panel table .thead-avg, .dark.gray .wrap-panel table .thead-max { background: #1c1c1c; } .dark.gray .wrap-panel table .thead-avg { border-bottom: 2px solid #999; } .dark.gray .wrap-panel table>thead>tr.thead-cols { border-bottom: 2px solid #999; } .dark.gray .wrap-panel table tbody.tbody-data tr.shaded { background-color: rgba(48, 48, 48, 0.48); } .dark.gray .gray { border-top: 4px solid #303030; } .dark.gray .grid-module { background: #1C1C1C; } .dark.gray .btn-default { color: #9E9E9E; background-color: #212121; border-color: #303030; } .dark.gray .btn-default:active, .dark.gray .btn-default:hover, .dark.gray .btn-default.active, .dark.gray .open>.dropdown-toggle.btn-default { color: #363737; background-color: #1C1C1C; border-color: #0F1214; } .dark.gray .pagination>.disabled>a, .dark.gray .pagination>.disabled>a:hover, .dark.gray .pagination>.disabled>a:focus { color: #777; } .dark.gray .pagination>li>a { background-color: #212121; border: 1px solid #303030; } .dark.gray .pagination>li>a:hover, .dark.gray .pagination>li>a:active, .dark.gray .pagination>li>a:focus { color: #0370B0; background-color: #212121; border-color: #303030; } .dark.gray .dropdown-menu>li>a { color: #FFF; } .dark.gray .dropdown-menu>li>a:hover, .dark.gray .dropdown-menu>li>a:focus { color: #FFF; background-color: #303030; } .dark.gray .dropdown-menu { background-color: #212121; } .dark.gray::-webkit-scrollbar-track, .dark.gray .table-responsive::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); background-color: #9E9E9E; } .dark.gray::-webkit-scrollbar, .dark.gray .table-responsive::-webkit-scrollbar { width: 10px; height: 10px; background-color: #9E9E9E; } .dark.gray::-webkit-scrollbar-thumb, .dark.gray .table-responsive::-webkit-scrollbar-thumb { background-color: #303030; } .dark.gray .chart-tooltip { background-color: #303030; } .dark.gray .report-title { background: #303030; } /* DARK CHARTS */ .dark .area { opacity: 0.1; } .dark .line0, .dark .line1 { stroke-width: 2; } .dark .area0, .dark .bars.y0 .bar, .dark rect.legend.y0 { fill: #007BC3; } .dark .area1, .dark .bars.y1 .bar, .dark .points.y1, .dark rect.legend.y1 { fill: #FF303E; } .dark .points.y0 { fill: #00D4E1; } .dark .line0 { stroke: #007BC3; } .dark .line1 { stroke: #FF303E; } .dark .grid.y .tick line, .dark .grid.x .tick line { stroke: #44474B; stroke-dasharray: 1 1; } .dark .axis text, .dark .axis-label, .dark text.legend { fill: #9E9E9E; } .dark .axis path { stroke: #999999; } .dark .axis.x .tick line, .dark .axis.y0 .tick line, .dark .axis.y1 .tick line, .dark .grid.y .tick:first-child line { stroke: #3B444C; } .dark .chart-tooltip th { background-color: #1c1c1c; } .dark .chart-tooltip tr { border: 1px solid #363737; } /* DARK PURPLE THEME */ html.dark.purple, .dark.purple body { background: #1e1e2f; } .dark.purple .container { background: #1e1e2f; } .dark.purple .page-header { border-bottom: 1px solid #2b3553; } .dark.purple .label-info { background-color: #181823; } .dark.purple nav { border-right: 1px solid #e14eca; background: #181823; } .dark.purple div.wrap-panel > div { background: #27293d; border-top: 1px solid #2b3553; } .dark.purple .wrap-panel table tbody.tbody-data tr.shaded { background-color: #1e1e2f; } .dark.purple .wrap-panel table tfoot>tr>th { border-top: 1px dotted #999; } .dark.purple .wrap-panel table .thead-min, .dark.purple .wrap-panel table .thead-avg, .dark.purple .wrap-panel table .thead-max { background: #27293d; } .dark.purple .wrap-panel table .thead-avg { border-bottom: 2px solid #999; } .dark.purple .wrap-panel table>thead>tr.thead-cols { border-bottom: 2px solid #999; } .dark.purple .gray { border-top: 4px solid #2b3553; } .dark.purple .red { border-top: 4px solid #fd5d93; } .dark.purple .green { border-top: 4px solid #00f2c3; } .dark.purple .blue { border-top: 4px solid #1f8ef1; } .dark.purple h3, .dark.purple h4, .dark.purple h5 { color: #9a9a9a; } .dark.purple .grid-module { background: #27293d; } .dark.purple .grid-module h3 { color: #FFF; } .dark.purple .btn-default { color: #9E9E9E; background-color: #1e1e2f; border-color: #2b3553; } .dark.purple .btn-default:active, .dark.purple .btn-default:hover, .dark.purple .btn-default.active, .dark.purple .open>.dropdown-toggle.btn-default { color: #59595f; background-color: #1e1e2f; border-color: #2b3553; } .dark.purple .pagination>.disabled>a, .dark.purple .pagination>.disabled>a:hover, .dark.purple .pagination>.disabled>a:focus { color: #777; } .dark.purple .pagination>li>a { background-color: #1e1e2f; border: 1px solid #3B444C; } .dark.purple .pagination>li>a:hover, .dark.purple .pagination>li>a:active, .dark.purple .pagination>li>a:focus { color: #0370B0; background-color: #181823; } .dark.purple .dropdown-menu>li>a:hover, .dark.purple .dropdown-menu>li>a:focus { color: #FFF; background-color: #181823; } .dark.purple .dropdown-menu { background-color: #1e1e2f; } .dark.purple::-webkit-scrollbar-track, .dark.purple .table-responsive::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); background-color: #9E9E9E; } .dark.purple::-webkit-scrollbar, .dark.purple .table-responsive::-webkit-scrollbar { width: 10px; height: 10px; background-color: #9E9E9E; } .dark.purple::-webkit-scrollbar-thumb, .dark.purple .table-responsive::-webkit-scrollbar-thumb { background-color: #1e1e2f; } .dark.purple .chart-tooltip { background-color: #181823; } .dark.purple .report-title { background: #181823; } .dark.purple .area0, .dark.purple .bars.y0 .bar, .dark.purple rect.legend.y0 { fill: #007BC3; } .dark.purple .area1, .dark.purple .bars.y1 .bar, .dark.purple .points.y1, .dark.purple rect.legend.y1 { fill: #d048b6; } .dark.purple .points.y0 { fill: #00D4E1; } .dark.purple .line0 { stroke: #007BC3; } .dark.purple .line1 { stroke: #d048b6; } .country { fill: #ccc; stroke: #fff; stroke-width: 0.5px; } .country:hover { fill: #b3b3b3; } .dark .country { fill: #ccc; stroke: #222; stroke-width: 0.5px; } .dark .legend-svg text { fill: #FFF; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/Makefile.am��������������������������������������������������������������������������0000644�0001750�0001730�00000020413�14626461433�011037� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#AUTOMAKE_OPTIONS = foreign bin_PROGRAMS = goaccess AUTOMAKE_OPTIONS = subdir-objects dist_noinst_DATA = \ resources/tpls.html \ resources/css/app.css \ resources/css/bootstrap.min.css \ resources/css/fa.min.css \ resources/js/app.js \ resources/js/charts.js \ resources/countries-110m.json \ resources/js/d3.v7.min.js \ resources/js/topojson.v3.min.js \ resources/js/hogan.min.js noinst_PROGRAMS = bin2c bin2c_SOURCES = src/bin2c.c BUILT_SOURCES = \ src/tpls.h \ src/bootstrapcss.h \ src/facss.h \ src/appcss.h \ src/d3js.h \ src/topojsonjs.h \ src/hoganjs.h \ src/countries110m.h \ src/chartsjs.h \ src/appjs.h CLEANFILES = \ src/tpls.h \ src/bootstrapcss.h \ src/facss.h \ src/appcss.h \ src/d3js.h \ src/topojsonjs.h \ src/hoganjs.h \ src/countries110m.h \ src/chartsjs.h \ src/appjs.h \ resources/tpls.html.tmp \ resources/countries-110m.json.tmp \ resources/css/bootstrap.min.css.tmp \ resources/css/fa.min.css.tmp \ resources/css/app.css.tmp \ resources/js/d3.v7.min.js.tmp \ resources/js/topojson.v3.min.js.tmp \ resources/js/hogan.min.js.tmp \ resources/js/charts.js.tmp \ resources/js/app.js.tmp # Tpls src/tpls.h: bin2c$(EXEEXT) $(srcdir)/resources/tpls.html if HAS_SEDTR cat $(srcdir)/resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/tpls.html.tmp ./bin2c $(srcdir)/resources/tpls.html.tmp src/tpls.h tpls else ./bin2c $(srcdir)/resources/tpls.html src/tpls.h tpls endif # countries.json src/countries110m.h: bin2c$(EXEEXT) $(srcdir)/resources/countries-110m.json if HAS_SEDTR cat $(srcdir)/resources/countries-110m.json | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/countries-110m.json.tmp ./bin2c $(srcdir)/resources/countries-110m.json.tmp src/countries110m.h countries_json else ./bin2c $(srcdir)/resources/countries-110m.json src/countries110m.h countries_json endif # Bootstrap src/bootstrapcss.h: bin2c$(EXEEXT) $(srcdir)/resources/css/bootstrap.min.css if HAS_SEDTR cat $(srcdir)/resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/css/bootstrap.min.css.tmp ./bin2c $(srcdir)/resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css else ./bin2c $(srcdir)/resources/css/bootstrap.min.css src/bootstrapcss.h bootstrap_css endif # Font Awesome src/facss.h: bin2c$(EXEEXT) $(srcdir)/resources/css/fa.min.css if HAS_SEDTR cat $(srcdir)/resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/css/fa.min.css.tmp ./bin2c $(srcdir)/resources/css/fa.min.css.tmp src/facss.h fa_css else ./bin2c $(srcdir)/resources/css/fa.min.css src/facss.h fa_css endif # App.css src/appcss.h: bin2c$(EXEEXT) $(srcdir)/resources/css/app.css if HAS_SEDTR cat $(srcdir)/resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/css/app.css.tmp ./bin2c $(srcdir)/resources/css/app.css.tmp src/appcss.h app_css else ./bin2c $(srcdir)/resources/css/app.css src/appcss.h app_css endif # D3.js src/d3js.h: bin2c$(EXEEXT) $(srcdir)/resources/js/d3.v7.min.js if HAS_SEDTR cat $(srcdir)/resources/js/d3.v7.min.js | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/d3.v7.min.js.tmp ./bin2c $(srcdir)/resources/js/d3.v7.min.js.tmp src/d3js.h d3_js else ./bin2c $(srcdir)/resources/js/d3.v7.min.js src/d3js.h d3_js endif # topojson.js src/topojsonjs.h: bin2c$(EXEEXT) $(srcdir)/resources/js/topojson.v3.min.js if HAS_SEDTR cat $(srcdir)/resources/js/topojson.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/topojson.v3.min.js.tmp ./bin2c $(srcdir)/resources/js/topojson.v3.min.js.tmp src/topojsonjs.h topojson_js else ./bin2c $(srcdir)/resources/js/topojson.v3.min.js src/topojsonjs.h topojson_js endif # Hogan.js src/hoganjs.h: bin2c$(EXEEXT) $(srcdir)/resources/js/hogan.min.js if HAS_SEDTR cat $(srcdir)/resources/js/hogan.min.js | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/hogan.min.js.tmp ./bin2c $(srcdir)/resources/js/hogan.min.js.tmp src/hoganjs.h hogan_js else ./bin2c $(srcdir)/resources/js/hogan.min.js src/hoganjs.h hogan_js endif # Charts.js src/chartsjs.h: bin2c$(EXEEXT) $(srcdir)/resources/js/charts.js if HAS_SEDTR cat $(srcdir)/resources/js/charts.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/charts.js.tmp ./bin2c $(srcdir)/resources/js/charts.js.tmp src/chartsjs.h charts_js else ./bin2c $(srcdir)/resources/js/charts.js src/chartsjs.h charts_js endif if DEBUG ./bin2c $(srcdir)/resources/js/charts.js src/chartsjs.h charts_js endif # App.js src/appjs.h: bin2c$(EXEEXT) $(srcdir)/resources/js/app.js if HAS_SEDTR cat $(srcdir)/resources/js/app.js | sed -E "s@(,|;)[[:space:]]*//..*@\1@g" | sed -E "s@^[[:space:]]*//..*@@g" | sed "s/^[[:space:]]*//" | sed "/^$$/d" | tr -d "\r\n" > $(srcdir)/resources/js/app.js.tmp ./bin2c $(srcdir)/resources/js/app.js.tmp src/appjs.h app_js else ./bin2c $(srcdir)/resources/js/app.js src/appjs.h app_js endif if DEBUG ./bin2c $(srcdir)/resources/js/app.js src/appjs.h app_js endif confdir = $(sysconfdir)/goaccess dist_conf_DATA = config/goaccess.conf dist_conf_DATA += config/browsers.list dist_conf_DATA += config/podcast.list goaccess_SOURCES = \ src/base64.c \ src/base64.h \ src/browsers.c \ src/browsers.h \ src/color.c \ src/color.h \ src/commons.c \ src/commons.h \ src/csv.c \ src/csv.h \ src/error.c \ src/error.h \ src/gdashboard.c \ src/gdashboard.h \ src/gdns.c \ src/gdns.h \ src/gholder.c \ src/gholder.h \ src/gkhash.c \ src/gkhash.h \ src/gkmhash.c \ src/gkmhash.h \ src/gmenu.c \ src/gmenu.h \ src/goaccess.c \ src/goaccess.h \ src/gslist.c \ src/gslist.h \ src/gstorage.c \ src/gstorage.h \ src/gwsocket.c \ src/gwsocket.h \ src/json.c \ src/json.h \ src/khash.h \ src/labels.h \ src/opesys.c \ src/opesys.h \ src/options.c \ src/options.h \ src/output.c \ src/output.h \ src/parser.c \ src/parser.h \ src/persistence.c \ src/persistence.h \ src/pdjson.c \ src/pdjson.h \ src/settings.c \ src/settings.h \ src/sort.c \ src/sort.h \ src/tpl.c \ src/tpl.h \ src/ui.c \ src/ui.h \ src/util.c \ src/util.h \ src/websocket.c \ src/websocket.h \ src/xmalloc.c \ src/xmalloc.h if USE_SHA1 goaccess_SOURCES += \ src/sha1.c \ src/sha1.h endif if USE_MMAP goaccess_SOURCES += \ src/win/mman.h \ src/win/mmap.c endif if GEOIP_LEGACY goaccess_SOURCES += \ src/geoip1.c \ src/geoip1.h endif if GEOIP_MMDB goaccess_SOURCES += \ src/geoip2.c \ src/geoip1.h endif if DEBUG AM_CFLAGS = -DDEBUG -O0 -DSYSCONFDIR=\"$(sysconfdir)\" else AM_CFLAGS = -O2 -DSYSCONFDIR=\"$(sysconfdir)\" endif if WITH_RDYNAMIC AM_LDFLAGS = -rdynamic endif AM_CFLAGS += -Wall -Wextra -Wnested-externs -Wformat=2 -g AM_CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations AM_CFLAGS += -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare AM_CFLAGS += -Wbad-function-cast -Wcast-align AM_CFLAGS += -Wdeclaration-after-statement -Wshadow -Wold-style-definition if WITH_ASAN AM_CFLAGS += -fsanitize=address endif dist_man_MANS = goaccess.1 SUBDIRS = po ACLOCAL_AMFLAGS = -I m4 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ EXTRA_DIST = config.rpath �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/AUTHORS������������������������������������������������������������������������������0000644�0001750�0001730�00000014701�14624360252�010051� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������GoAccess was designed and developed by Gerardo Orellana Special thanks to the following individuals for their great contributions: * 0bi-w6n-K3nobi <71027865+0bi-w6n-K3nob@users.noreply.github.com> * Aaditya Bagga * abgit * Adam Monsen * Adam Števko * Adam Weinberger * Adrian * aishikoyo * Alan Placidina * Alexander Eifler * Alexandre GUIOT--VALENTIN * Alexandre Perrin * Amos Hayes * A. Nackov * Anders Johansson <47452862+tellustheguru@users.noreply.github.com> * Andreas Sommer * Andreas Weigel * Andrew Kvalheim * Andrew Minion * Antonio Terceiro * Arnaud Rebillout * Arnie97 * as0n * Aslak Raanes * Axel Wehner * bbbboom * Bbertatum * Benjamin Bach * Bjørnar Hansen * Bob Black * Bo Cai * Brandon Coleman * Carlos Duelo * Celso Providelo * ChangMo Yang * Chang Zhao * Chilledheart * Chris Downs * Christian Göttsche * Christian Hermann * Christian Moelders * Christopher Meng * Clément Hermann * cristianpb * Cthulhux * Daniel Aleksandersen * Daniel Aleksandersen * Daniel (dmilith) Dettlaff * Danila Vershinin * Danny Kirkham * Darek Kay * David Carlier * David Geistert * d_dandrew * ElXreno * Enrique Becerra * evitalis * Felix Häberle <34959078+felixhaeberle@users.noreply.github.com> * Florian Forster * forDream * fqbuild * Frederic Cambus * gemmaro * Genki Sugawara * Gerald Combs * Geraldo Alves * gitqlt * Hiroki Kamino <46459949+err931@users.noreply.github.com> * holys * Izzy * JackDesBwa * Jannes Blobel <72493222+jannesblobel@users.noreply.github.com> * Jeffery Wilkins * Jeremy Burks * Jeremy Lin * Joaquín de la Zerda * Joe Groocock * Joe Winett * Jonas Kittner * Joona * Jordan Trask * Julian Xhokaxhiu * Justin Mills * Kamino Hiroki <37243867+4f8p@users.noreply.github.com> * Kit Westneat * kokke * kyle sloan * LeoAttn * Magnus Groß * Maksim Losev * mario-donnarumma * markiewb * Mark J. Berger * Martins Polakovs * Massimiliano Torromeo * Mathieu Aubin * Mathieu Thoretton * Max Christian Pohle * metrix78 * Michael Vetter * Mika Raunio * Moritz Schott * m-r-r * mynameiscfed * Newbe36524 * Nicolas Le Manchet * Nicolas * Ophir LOJKINE * Otto Kekäläinen * Panos Stavrianos * pitilux * Pixelcode <52963327+realpixelcode@users.noreply.github.com> * Placidina * pravdomil * rachid-debu * radoslawc * rahra * Ramires Viana <59319979+ramiresviana@users.noreply.github.com> * rgriebl * Roy Marples * rtmkrlv * Ryow * schoonc * Sean Cross * Sean Wei * Sebastian Wiedenroth * Simon Gardling * SjonHortensius * Steely Wing * Stéphane Péchard * Stephen Wade * Stoyan Dimov * Stuart Henderson * Sveinbjorn Thordarson * Tatsuyuki Ishi * Thomas Gläßle * Thomas Jost * Thomas Lange * throwaway1037 * Tim Gates * Timothy Quilling * Tom Samstag * ugola * Ulrich Schwarz * Viktor Szépe * Viktor Szépe * Ville Skyttä * Vincent Bernat * Vladimir Pavljuchenkov * William Muir * Wladimir Palant * wodev * woobee * Yuri D'Elia * Yuriy M. Kaminskiy * zeke ���������������������������������������������������������������goaccess-1.9.3/config.rpath�������������������������������������������������������������������������0000755�0001750�0001730�00000044435�14613301667�011323� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2014 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. obj= case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 fi ;; *) echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac case $obj in aout* | coff* | elf* | pe*) ;; '') # empty is fine ;; *) echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 exit 1 ;; esac # Here we handle the constraint that a (synthetic) cpu and os are # valid only in combination with each other and nowhere else. case $cpu-$os in # The "javascript-unknown-ghcjs" triple is used by GHC; we # accept it here in order to tolerate that, but reject any # variations. javascript-ghcjs) ;; javascript-* | *-ghcjs) echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os-$obj in linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) ;; uclinux-uclibc*- ) ;; managarm-mlibc*- | managarm-kernel*- ) ;; windows*-msvc*-) ;; -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; -kernel*- ) echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; *-kernel*- ) echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; *-msvc*- ) echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu*- | kopensolaris*-gnu*-) ;; vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; nto-qnx*-) ;; os2-emx-) ;; *-eabi*- | *-gnueabi*-) ;; none--*) # None (no kernel, i.e. freestanding / bare metal), # can be paired with an machine code file format ;; -*-) # Blank kernel with real OS is always fine. ;; --*) # Blank kernel and OS with real machine code file format is always fine. ;; *-*-*) echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/INSTALL������������������������������������������������������������������������������0000644�0001750�0001730�00000036614�14613301754�010041� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command './configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a 'Makefile' in each directory of the package. It may also create one or more '.h' files containing system-dependent definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a file 'config.log' containing compiler output (useful mainly for debugging 'configure'). It can also use an optional file (typically called 'config.cache' and enabled with '--cache-file=config.cache' or simply '-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how 'configure' could check whether to do them, and mail diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at some point 'config.cache' contains results you don't want to keep, you may remove or edit it. The file 'configure.ac' (or 'configure.in') is used to create 'configure' by a program called 'autoconf'. You need 'configure.ac' if you want to change it or regenerate 'configure' using a newer version of 'autoconf'. The simplest way to compile this package is: 1. 'cd' to the directory containing the package's source code and type './configure' to configure the package for your system. Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type 'make' to compile the package. 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing 'make clean'. To also remove the files that 'configure' created (so you can compile the package for a different kind of computer), type 'make distclean'. There is also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. You can give 'configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run the 'configure' script. 'configure' automatically checks for the source code in the directory that 'configure' is in and in '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. Installation Names ================== By default, 'make install' installs the package's commands under '/usr/local/bin', include files under '/usr/local/include', etc. You can specify an installation prefix other than '/usr/local' by giving 'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like '--bindir=DIR' to specify different values for particular kinds of files. Run 'configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving 'configure' the option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. Some packages pay attention to '--enable-FEATURE' options to 'configure', where FEATURE indicates an optional part of the package. They may also pay attention to '--with-PACKAGE' options, where PACKAGE is something like 'gnu-as' or 'x' (for the X Window System). The 'README' should mention any '--enable-' and '--with-' options that the package recognizes. For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, you can use the 'configure' options '--x-includes=DIR' and '--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. ��������������������������������������������������������������������������������������������������������������������goaccess-1.9.3/README.md����������������������������������������������������������������������������0000644�0001750�0001730�00000045461�14626466254�010302� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������GoAccess [![C build](https://github.com/allinurl/goaccess/actions/workflows/build-test.yml/badge.svg)](https://github.com/allinurl/goaccess/actions/workflows/build-test.yml) [![GoAccess](https://goaccess.io/badge)](https://goaccess.io) ======== ## What is it? ## GoAccess is an open source **real-time web log analyzer** and interactive viewer that runs in a **terminal** on *nix systems or through your **browser**. It provides **fast** and valuable HTTP statistics for system administrators that require a visual server report on the fly. More info at: [https://goaccess.io](https://goaccess.io/?src=gh). [![GoAccess Terminal Dashboard](https://goaccess.io/images/goaccess-real-time-term-gh.png?2022011901)](https://goaccess.io/) [![GoAccess HTML Dashboard](https://goaccess.io/images/goaccess-real-time-html-gh.png?202201190)](https://rt.goaccess.io/?src=gh) ## Features ## GoAccess parses the specified web log file and outputs the data to the X terminal. Features include: * **Completely Real Time**
All panels and metrics are timed to be updated every 200 ms on the terminal output and every second on the HTML output. * **Minimal Configuration needed**
You can just run it against your access log file, pick the log format and let GoAccess parse the access log and show you the stats. * **Track Application Response Time**
Track the time taken to serve the request. Extremely useful if you want to track pages that are slowing down your site. * **Nearly All Web Log Formats**
GoAccess allows any custom log format string. Predefined options include, Apache, Nginx, Amazon S3, Elastic Load Balancing, CloudFront, etc. * **Incremental Log Processing**
Need data persistence? GoAccess has the ability to process logs incrementally through the on-disk persistence options. * **Only one dependency**
GoAccess is written in C. To run it, you only need ncurses as a dependency. That's it. It even features its own Web Socket server — http://gwsocket.io/. * **Visitors**
Determine the amount of hits, visitors, bandwidth, and metrics for slowest running requests by the hour, or date. * **Metrics per Virtual Host**
Have multiple Virtual Hosts (Server Blocks)? It features a panel that displays which virtual host is consuming most of the web server resources. * **ASN (Autonomous System Number mapping)**
Great for detecting malicious traffic patterns and block them accordingly. * **Color Scheme Customizable**
Tailor GoAccess to suit your own color taste/schemes. Either through the terminal, or by simply applying the stylesheet on the HTML output. * **Support for Large Datasets**
GoAccess features the ability to parse large logs due to its optimized in-memory hash tables. It has very good memory usage and pretty good performance. This storage has support for on-disk persistence as well. * **Docker Support**
Ability to build GoAccess' Docker image from upstream. You can still fully configure it, by using Volume mapping and editing `goaccess.conf`. See [Docker](https://github.com/allinurl/goaccess#docker) section below. ### Nearly all web log formats... ### GoAccess allows any custom log format string. Predefined options include, but not limited to: * Amazon CloudFront (Download Distribution). * Amazon Simple Storage Service (S3) * AWS Elastic Load Balancing * Combined Log Format (XLF/ELF) Apache | Nginx * Common Log Format (CLF) Apache * Google Cloud Storage. * Apache virtual hosts * Squid Native Format. * W3C format (IIS). * Caddy's JSON Structured format. * Traefik's CLF flavor ## Why GoAccess? ## GoAccess was designed to be a fast, terminal-based log analyzer. Its core idea is to quickly analyze and view web server statistics in real time without needing to use your browser (_great if you want to do a quick analysis of your access log via SSH, or if you simply love working in the terminal_). While the terminal output is the default output, it has the capability to generate a complete, self-contained, real-time [**`HTML`**](https://rt.goaccess.io/?src=gh) report, as well as a [**`JSON`**](https://goaccess.io/json?src=gh), and [**`CSV`**](https://goaccess.io/goaccess_csv_report.csv?src=gh) report. You can see it more of a monitor command tool than anything else. ## Installation ## ### Build from release GoAccess can be compiled and used on *nix systems. Download, extract and compile GoAccess with: $ wget https://tar.goaccess.io/goaccess-1.9.3.tar.gz $ tar -xzvf goaccess-1.9.3.tar.gz $ cd goaccess-1.9.3/ $ ./configure --enable-utf8 --enable-geoip=mmdb $ make # make install ### Build from GitHub (Development) ### $ git clone https://github.com/allinurl/goaccess.git $ cd goaccess $ autoreconf -fiv $ ./configure --enable-utf8 --enable-geoip=mmdb $ make # make install #### Build in isolated container You can also build the binary for Debian based systems in an isolated container environment to prevent cluttering your local system with the development libraries: $ curl -L "https://github.com/allinurl/goaccess/archive/refs/heads/master.tar.gz" | tar -xz && cd goaccess-master $ docker build -t goaccess/build.debian-12 -f Dockerfile.debian-12 . $ docker run -i --rm -v $PWD:/goaccess goaccess/build.debian-12 > goaccess ### Distributions ### It is easiest to install GoAccess on GNU+Linux using the preferred package manager of your GNU+Linux distribution. Please note that not all distributions will have the latest version of GoAccess available. #### Debian/Ubuntu #### # apt-get install goaccess **Note:** It is likely this will install an outdated version of GoAccess. To make sure that you're running the latest stable version of GoAccess see alternative option below. #### Official GoAccess Debian & Ubuntu repository #### $ wget -O - https://deb.goaccess.io/gnugpg.key | gpg --dearmor \ | sudo tee /usr/share/keyrings/goaccess.gpg >/dev/null $ echo "deb [signed-by=/usr/share/keyrings/goaccess.gpg arch=$(dpkg --print-architecture)] https://deb.goaccess.io/ $(lsb_release -cs) main" \ | sudo tee /etc/apt/sources.list.d/goaccess.list $ sudo apt-get update $ sudo apt-get install goaccess **Note**: * `.deb` packages in the official repo are available through HTTPS as well. You may need to install `apt-transport-https`. #### Fedora #### # yum install goaccess #### Arch #### # pacman -S goaccess #### Gentoo #### # emerge net-analyzer/goaccess #### OS X / Homebrew #### # brew install goaccess #### FreeBSD #### # cd /usr/ports/sysutils/goaccess/ && make install clean # pkg install sysutils/goaccess #### OpenBSD #### # cd /usr/ports/www/goaccess && make install clean # pkg_add goaccess #### openSUSE #### # zypper ar -f obs://server:http http # zypper in goaccess #### OpenIndiana #### # pkg install goaccess #### pkgsrc (NetBSD, Solaris, SmartOS, ...) #### # pkgin install goaccess #### Windows #### GoAccess can be used in Windows through Cygwin. See Cygwin's packages. Or through the GNU+Linux Subsystem on Windows 10. #### Distribution Packages #### GoAccess has minimal requirements, it's written in C and requires only ncurses. However, below is a table of some optional dependencies in some distros to build GoAccess from source. | Distro | NCurses | GeoIP (opt) | GeoIP2 (opt) | OpenSSL (opt) | | ---------------------- | ---------------- | ---------------- | --------------------- | -------------------| | **Ubuntu/Debian** | libncurses-dev | libgeoip-dev | libmaxminddb-dev | libssl-dev | | **RHEL/CentOS** | ncurses-devel | geoip-devel | libmaxminddb-devel | openssl-devel | | **Arch** | ncurses | geoip | libmaxminddb | openssl | | **Gentoo** | sys-libs/ncurses | dev-libs/geoip | dev-libs/libmaxminddb | dev-libs/openssl | | **Slackware** | ncurses | GeoIP | libmaxminddb | openssl | **Note**: You may need to install build tools like `gcc`, `autoconf`, `gettext`, `autopoint` etc. for compiling/building software from source. e.g., `base-devel`, `build-essential`, `"Development Tools"`. #### Docker #### A Docker image has been updated, capable of directing output from an access log. If you only want to output a report, you can pipe a log from the external environment to a Docker-based process: touch report.html cat access.log | docker run --rm -i -v ./report.html:/report.html -e LANG=$LANG allinurl/goaccess -a -o report.html --log-format COMBINED - OR real-time tail -F access.log | docker run -p 7890:7890 --rm -i -e LANG=$LANG allinurl/goaccess -a -o report.html --log-format COMBINED --real-time-html - You can read more about using the docker image in [DOCKER.md](https://github.com/allinurl/goaccess/blob/master/DOCKER.md). ## Storage ## #### Default Hash Tables #### In-memory storage provides better performance at the cost of limiting the dataset size to the amount of available physical memory. GoAccess uses in-memory hash tables. It has very good memory usage and pretty good performance. This storage has support for on-disk persistence as well. ## Command Line / Config Options ## See [**options**](https://goaccess.io/man#options) that can be supplied to the command or specified in the configuration file. If specified in the configuration file, long options need to be used without prepending `--`. ## Usage / Examples ## **Note**: Piping data into GoAccess won't prompt a log/date/time configuration dialog, you will need to previously define it in your configuration file or in the command line. ### Getting Started ### To output to a terminal and generate an interactive report: # goaccess access.log To generate an HTML report: # goaccess access.log -a > report.html To generate a JSON report file: # goaccess access.log -a -d -o report.json To generate a CSV report to stdout: # goaccess access.log --no-csv-summary -o csv GoAccess also allows great flexibility for real-time filtering and parsing. For instance, to quickly diagnose issues by monitoring logs since goaccess was started: # tail -f access.log | goaccess - And even better, to filter while maintaining opened a pipe to preserve real-time analysis, we can make use of `tail -f` and a matching pattern tool such as `grep`, `awk`, `sed`, etc.: # tail -f access.log | grep -i --line-buffered 'firefox' | goaccess --log-format=COMBINED - or to parse from the beginning of the file while maintaining the pipe opened and applying a filter # tail -f -n +0 access.log | grep -i --line-buffered 'firefox' | goaccess -o report.html --real-time-html - ### Multiple Log files ### There are several ways to parse multiple logs with GoAccess. The simplest is to pass multiple log files to the command line: # goaccess access.log access.log.1 It's even possible to parse files from a pipe while reading regular files: # cat access.log.2 | goaccess access.log access.log.1 - **Note**: the single dash is appended to the command line to let GoAccess know that it should read from the pipe. Now if we want to add more flexibility to GoAccess, we can use `zcat --force` to read compressed and uncompressed files. For instance, if we would like to process all log files `access.log*`, we can do: # zcat --force access.log* | goaccess - _Note_: On Mac OS X, use `gunzip -c` instead of `zcat`. ### Multi-thread Support ### Use `--jobs=` (or `-j`) to enable multi-thread parsing. For example: # goaccess access.log -o report.html -j 4 And use `--chunk-size=<256-32768>` to adjust chunk size, the default chunk size is 1024. For example: # goaccess access.log -o report.html -j 4 --chunk-size=8192 ### Real-time HTML outputs ### GoAccess has the ability the output real-time data in the HTML report. You can even email the HTML file since it is composed of a single file with no external file dependencies, how neat is that! The process of generating a real-time HTML report is very similar to the process of creating a static report. Only `--real-time-html` is needed to make it real-time. # goaccess access.log -o /usr/share/nginx/html/your_site/report.html --real-time-html To view the report you can navigate to `http://your_site/report.html`. By default, GoAccess will use the host name of the generated report. Optionally, you can specify the URL to which the client's browser will connect to. See [FAQ](https://goaccess.io/faq) for a more detailed example. # goaccess access.log -o report.html --real-time-html --ws-url=goaccess.io By default, GoAccess listens on port 7890, to use a different port other than 7890, you can specify it as (make sure the port is opened): # goaccess access.log -o report.html --real-time-html --port=9870 And to bind the WebSocket server to a different address other than 0.0.0.0, you can specify it as: # goaccess access.log -o report.html --real-time-html --addr=127.0.0.1 **Note**: To output real time data over a TLS/SSL connection, you need to use `--ssl-cert=` and `--ssl-key=`. ### Filtering ### #### Working with dates #### Another useful pipe would be filtering dates out of the web log The following will get all HTTP requests starting on `05/Dec/2010` until the end of the file. # sed -n '/05\/Dec\/2010/,$ p' access.log | goaccess -a - or using relative dates such as yesterdays or tomorrows day: # sed -n '/'$(date '+%d\/%b\/%Y' -d '1 week ago')'/,$ p' access.log | goaccess -a - If we want to parse only a certain time-frame from DATE a to DATE b, we can do: # sed -n '/5\/Nov\/2010/,/5\/Dec\/2010/ p' access.log | goaccess -a - If we want to preserve only certain amount of data and recycle storage, we can keep only a certain number of days. For instance to keep & show the last 5 days: # goaccess access.log --keep-last=5 #### Virtual hosts #### Assuming your log contains the virtual host field. For instance: vhost.io:80 8.8.4.4 - - [02/Mar/2016:08:14:04 -0600] "GET /shop HTTP/1.1" 200 615 "-" "Googlebot-Image/1.0" And you would like to append the virtual host to the request in order to see which virtual host the top urls belong to: awk '$8=$1$8' access.log | goaccess -a - To do the same, but also use real-time filtering and parsing: tail -f access.log | unbuffer -p awk '$8=$1$8' | goaccess -a - To exclude a list of virtual hosts you can do the following: # grep -v "`cat exclude_vhost_list_file`" vhost_access.log | goaccess - #### Files, status codes and bots #### To parse specific pages, e.g., page views, `html`, `htm`, `php`, etc. within a request: # awk '$7~/\.html|\.htm|\.php/' access.log | goaccess - Note, `$7` is the request field for the common and combined log format, (without Virtual Host), if your log includes Virtual Host, then you probably want to use `$8` instead. It's best to check which field you are shooting for, e.g.: # tail -10 access.log | awk '{print $8}' Or to parse a specific status code, e.g., 500 (Internal Server Error): # awk '$9~/500/' access.log | goaccess - Or multiple status codes, e.g., all 3xx and 5xx: # tail -f -n +0 access.log | awk '$9~/3[0-9]{2}|5[0-9]{2}/' | goaccess -o out.html - And to get an estimated overview of how many bots (crawlers) are hitting your server: # tail -F -n +0 access.log | grep -i --line-buffered 'bot' | goaccess - ### Tips ### Also, it is worth pointing out that if we want to run GoAccess at lower priority, we can run it as: # nice -n 19 goaccess -f access.log -a and if you don't want to install it on your server, you can still run it from your local machine! # ssh -n root@server 'tail -f /var/log/apache2/access.log' | goaccess - **Note:** SSH requires `-n` so GoAccess can read from stdin. Also, make sure to use SSH keys for authentication as it won't work if a passphrase is required. #### Troubleshooting #### We receive many questions and issues that have been answered previously. * Date/time matching problems? Check that your log format and the system locale in which you run GoAccess match. See [#1571](https://github.com/allinurl/goaccess/issues/1571#issuecomment-543186858) * Problems with pattern matching? Spaces are often a problem, see for instance [#136](https://github.com/allinurl/goaccess/issues/136), [#1579](https://github.com/allinurl/goaccess/issues/1579) * Other issues matching log entries: See [>200 closed issues regarding log/date/time formats](https://github.com/allinurl/goaccess/issues?q=is%3Aissue+is%3Aclosed+label%3A%22log%2Fdate%2Ftime+format%22) * Problems with log processing? See [>111 issues regarding log processing](https://github.com/allinurl/goaccess/issues?q=is%3Aissue+is%3Aclosed+label%3Alog-processing) #### Incremental log processing #### GoAccess has the ability to process logs incrementally through its internal storage and dump its data to disk. It works in the following way: 1. A dataset must be persisted first with `--persist`, then the same dataset can be loaded with. 2. `--restore`. If new data is passed (piped or through a log file), it will append it to the original dataset. ##### NOTES ##### GoAccess keeps track of inodes of all the files processed (assuming files will stay on the same partition), in addition, it extracts a snippet of data from the log along with the last line parsed of each file and the timestamp of the last line parsed. e.g., `inode:29627417|line:20012|ts:20171231235059` First, it compares if the snippet matches the log being parsed, if it does, it assumes the log hasn't changed drastically, e.g., hasn't been truncated. If the inode does not match the current file, it parses all lines. If the current file matches the inode, it then reads the remaining lines and updates the count of lines parsed and the timestamp. As an extra precaution, it won't parse log lines with a timestamp ≤ than the one stored. Piped data works based off the timestamp of the last line read. For instance, it will parse and discard all incoming entries until it finds a timestamp >= than the one stored. ##### Examples ##### // last month access log # goaccess access.log.1 --persist then, load it with // append this month access log, and preserve new data # goaccess access.log --restore --persist To read persisted data only (without parsing new data) # goaccess --restore ## Contributing ## Any help on GoAccess is welcome. The most helpful way is to try it out and give feedback. Feel free to use the GitHub issue tracker and pull requests to discuss and submit code changes. You can contribute to our translations by editing the .po files direct on GitHub or using the visual interface [inlang.com](https://inlang.com/editor/github.com/allinurl/goaccess) [![translation badge](https://inlang.com/badge?url=github.com/allinurl/goaccess)](https://inlang.com/editor/github.com/allinurl/goaccess?ref=badge) Enjoy! goaccess-1.9.3/ChangeLog0000644000175000017300000016462114626465650010574 Changes to GoAccess 1.9.3 - Friday, May 31, 2024 - Added additional common bots to the list. - Added Address Sanitizer via '--enable-asan' to the configure options for debugging purposes. - Fixed inability to parse JSON keys containing dots. - Fixed out-of-bounds access for invalid HTTP status codes. - Fixed out-of-bounds access when parsing a log in serial processing mode. - Fixed regression introduced in 8f570c, which caused duplicate counts upon restoring from disk via '--restore'. Changes to GoAccess 1.9.2 - Friday, April 12, 2024 - Added World Map to the Geo Location panel on the HTML report. - Added additional non-official/standard HTTP status codes such as Caddy's 0 HTTP status among others. - Added support for '%z' on strptime for non-glibc systems, such as musl libc in Alpine Linux (Docker container), enabling the use of '--tz' - Changed the '--hide/ignore-referrer' options to filter by hostname directly without the use of wildcards, e.g., '--ignore-referrer=wiki.google.com'. - Fixed inability to parse duplicate specifiers during log format parsing. - Fixed regression which previously hindered the ability to modify log, date, and time formats within the TUI dialog. i.e., '# goaccess access.log -c'. - Replaced 'remote_ip' with 'client_ip' for Caddy's JSON format, allowing the use of trusted proxies. - Updated Caddy JSON example log format to handle headers correctly. - Updated Swedish i18n. Changes to GoAccess 1.9.1 - Tuesday, February 05, 2024 - Added support for macOS to the OS detection. - Fixed C99 mode issue with initial declarations [CentOS7]. - Fixed minor typographical, orthographic, and grammatical errors in the German translation. - Fixed a regression issue wherein parsing would halt at the first empty log file. Changes to GoAccess 1.9 - Tuesday, January 30, 2024 - Added multi-threaded log processing with '--jobs=' for a boost in parsing speed, achieving an improvement ranging from 1.26 to 3.65x faster. - Added the 'SEARCH' method to the list of HTTP request methods. - Added compatibility to include the Traefik log format. - Added the ability to gracefully handle SIGQUIT as a signal for shutdown. - Altered WebSocket server initialization, ensuring it takes place after log-format checks. - Deprecated '--output-format'; now, only the '--output' option is permissible. - Implemented mutex locking to prevent a TZ environment race condition. - Fixed a potential heap overflow when checking a request for bots. - Fixed sorting of child items on HTML panels when sorting a column via the UI. - Fixed an issue where, in some cases, the referer host wouldn't be extracted properly - Fixed the miscategorization of Android 12.1 under operating systems. - Fixed TUI and temporarily ignored SIGINT during subdialog execution via Ctrl+C. - Updated the list of browsers/bots. Changes to GoAccess 1.8.1 - Tuesday, October 31, 2023 - Added latest Android and macOS versions to the list of OSs. - Fixed issue when trying to apply a regex on an invalid value (HTML report). - Fixed issue with D3.js xScale.domain() going out of boundaries in certain cases. - Prevent setting default static files when no static-file options are defined in config file. Changes to GoAccess 1.8 - Saturday, September 30, 2023 - Added dual-stack support to the WebSocket server. - Added Debian Bookworm to the official deb repo. - Added Ubuntu Lunar to the official deb repo. - Fixed compiler error on macOS 10.12. - Updated bootstrap to v3.4. - Updated FontAwesome with additional icons for upcoming major release. - Updated Japanese translation. - Updated OS display from Macintosh to macOS. - Updated to D3.js v7 (latest) including charts.js code. Changes to GoAccess 1.7.2 - Friday, March 31, 2023 - Added a color-coding scheme to HTTP status codes. - Added '--external-assets' command line option to output external JS+CSS files. Great when used with Content Security Policy (CSP). - Ensure there's a fallback for 'Windows' if it appears on the user-agent. - Ensure we construct the WebSocket URL in a way that supports multiple use cases when used along '--ws-url' and '--port'. - Fixed a segfault due to a null pointer exception on FreeBSD. - Fixed build with '--disable-nls'. - Fixed invalid read (heap-buffer-overflow) when parsing an XFF spec via JSON. - Fixed segfault when parsing a specific XFF specifier. Changes to GoAccess 1.7.1 - Tuesday, February 28, 2023 - Added 'inlang' for easy localization (i18n) updates. https://inlang.com/editor/github.com/allinurl/goaccess - Added nanosecond parsing option via the '%n' specifier. Great for parsing 'Traefik' JSON logs duration field. - Changed Docker workflow to build a docker image on different architectures {'arm64' & 'amd64'}. - Fixed issue with '--unknowns-as-crawlers' where it did not process them as such. Changes to GoAccess 1.7 - Saturday, December 31, 2022 - Added an option to classify unknown OS and browsers as crawlers using `--unknowns-as-crawlers`. - Added highlighting to certain metrics on the HTML report for readability. - Added a new panel that displays ASN data for GeoIP2 and legacy databases. Great for detecting malicious traffic and blocking accordingly. - Added an ASN metric per IP/host. - Changed and prioritize user's browsers list over heuristics. - Ensure `--geoip-database=` can be used multiple times to support different databases. - Fixed invalid read when loading the list of agents for an IP. - Fixed issue where a file containing a NUL `\0` character would crash the program. - Updated Swedish i18n. Changes to GoAccess 1.6.5 - Monday, October 31, 2022 - Updated Dockerfile build stage to use alpine:3. - Updated deb build to use the right libncursesw6 dependency. Changes to GoAccess 1.6.4 - Friday, September 30, 2022 - Added Korean translation (i18n). - Added the ability to use filenames as virtualhosts using '--fname-as-vhost='. - Enabled crawlers/bots under the OSs panel instead of being shown as 'Unknown'. - Updated the format on the command-line help output. Changes to GoAccess 1.6.3 - Thursday, August 31, 2022 - Enabled DNS thread when resolving a host and outputting real-time HTML. This helps avoid stalling the WS server on busy connections. - Fixed issue where it would not properly parse an XFF if the '%h' specifier was already set. - Fixed possible XSS issues when using '--html-custom-css' and '--html-custom-js' by allowing valid filenames. Changes to GoAccess 1.6.2 - Thursday, July 14, 2022 - Added `Android 12` to the list of OSs. - Added `macOS 12 Ventura` to the list of OSs. - Fixed implicit declaration build issue due to `timegm(3)` on `BSDs` and `macOS`. - Fixed issue where timezone conversion would be performed twice on a given date. Changes to GoAccess 1.6.1 - Thursday, June 30, 2022 - Added a `--ping-interval=` in an attempt to keep the WebSocket connection opened. - Added support for timezone conversion via `--datetime-format=` and `--tz=`. - Added the ability to reconnect to the WebSocket server after 1 sec with exponential backoff (x20). - Fixed issue where an invalid client connection would stall data out to clients via the WebSocket server. - Fixed an issue where real-time data would be parsed multiple times under `Cygwin`. Changes to GoAccess 1.6 - Tuesday, May 31, 2022 - Changed slightly how the XFF field is specified. See man page for details. - Ensure city is displayed with the DBIP City Lite database. - Ensure no 'cleaning up resources' message is displayed if `--no-progress` is passed. - Ensure the maximum number of items per panel defaults to 1440 (24hrs) when passing `--date-spec=min`. - Fixed issue when parsing a delimited XFF field followed by a host IP. - Fixed issue where some data was buffered on the WebSocket server before it was sent to each client. - Fixed issue where the WebSocket server would fail with POLLNVAL consuming 100% CPU. - Fixed segfault when attempting to open an unresolved IP on mac/BSDs. Changes to GoAccess 1.5.7 - Thursday, April 28, 2022 - Updated Caddy's JSON format. This should address CADDY's v2.5.0 change. - Updated Chinese translation (i18n). - Updated GeoIP module so it defaults to native language name (i18n) or fall-back to English. - Updated Russian translation (i18n). - Updated Ukrainian translation (i18n). Changes to GoAccess 1.5.6 - Wednesday, March 30, 2022 - Added `--anonymize-level=<1|2|3>` option to specify IP anonymization level. - Added minute specificity to the Visitors panel via `--date-spec=min`. - Added the ability to toggle on/off panels on the HTML report. - Changed stderr to stdout on non-error output when exiting goaccess. Changes to GoAccess 1.5.5 - Monday, January 31, 2022 - Added mechanism to automatically parse additional bots. - Changed area chart interpolation to 'monotone'. This should avoid the issue where the interpolated curve has a bend into the negative space. - Changed build to use debugging symbols even for release builds. - Changed order on which we verify bots to be the first thing we check. This adds a slight improvement on parsing time. - Ensure we initialize DNS resolver conditions and mutexes before they're used. - Fixed possible buffer over-read for cases where a '\0' could be reached early when parsing a log line. - Fixed possible data race on UI spinner thread. - Fixed regression where a lot of robots were not detected by GoAccess. Changes to GoAccess 1.5.4 - Saturday, December 25, 2021 - Added AWS ALB to the predefined logs format list --log-format=AWSALB. - Ensure we lock our pipe/websocket writer before broadcasting message. - Ensure we require a valid host token even when we're not validating the IP. - Ensure we simply update the TUI once after tailing multiple files. - Ensure we simply update the UI once after tailing multiple files. - Fixed buffer overflow when checking if an HTTP code was a 404 on an empty status code. - Optimized terminal and HTML UI output when tailing multiple files. - Updated DB PATH error message to be more descriptive. Changes to GoAccess 1.5.3 - Thursday, November 25, 2021 - Added additional crawlers to the default list. - Added Italian translation (i18n). - Added 'macOS 12' to the list of OS. - Fixed buffer overflow caused by an excessive number of invalid requests with multiple logs. - Fixed visualization issue on the HTML report for panels with disabled chart. Changes to GoAccess 1.5.2 - Tuesday, September 28, 2021 - Added .avi to the list of static requests/extensions. - Changed label from 'Init. Proc. Time' to 'Log Parsing Time'. - Fixed issue where lengthy static-file extension wouldn't account certain valid requests. - Fixed possible buffer underflow when checking static-file extension. - Fixed segfault when attempting to parse an invalid JSON log while using a JSON log format. - Fixed segfault when ignoring a status code and processing a line > '4096' chars. Changes to GoAccess 1.5.1 - Wednesday, June 30, 2021 - Changed official deb repo so it now builds '--with-getline' in order to support request lines longer than 4096. - Ensure there's no tail delay if the log file hasn't changed. - Fixed data race when writing to a self-pipe and attempting to stop the WS server. - Fixed inability to close expanded panel when pressing 'q' on TUI. - Fixed possible data race during parsing spinner label assignment. - Increased the maximum number of files to monitor from '512' to '3072'. Changes to GoAccess 1.5 - Wednesday, May 26, 2021 - Added a Docker container based isolated build environment (Debian). - Added Dark Mode detection to the HTML report. - Added the ability for the WebSocket server to bind to a Unix-domain socket. - Added the ability to parse IPs enclosed within brackets (e.g., IPv6). - Changed categorization of requests containing 'CFNetwork' to 'iOS' when applicable. - Changed command line option from '--hide-referer' to '--hide-referrer'. - Changed command line option from '--ignore-referer' to '--ignore-referrer'. - Fixed a potential division by zero. - Fixed inability to parse IPv6 when using a 'CADDY' log format. - Fixed issue where a 'BSD' OS could be displayed as Linux with certain user-agents. - Fixed memory leak when a JSON value contained an empty string (e.g., JSON/CADDY format). - Fixed possible buffer overflow on a WS packet coming from the browser. - Refactored a substantial part of the storage codebase for upcoming filtering/search capabilities (issue #117). - Refactored DB storage to minimize memory consumption up to '35%'. - Updated default 'AWS Elastic Load Balancing' log format. - Updated German translation. - Updated page size to 24 on the HTML report. - Updated UNIX OS categories. Changes to GoAccess 1.4.6 - Sunday, February 28, 2021 - Added additional feed reader clients. - Added additional browsers and bots to the main list. - Added command line option '--unknowns-log' to log unknown browsers and OSs. - Added 'Referer' to the pre-defined 'Caddy JSON' log format. - Added support for real-time piping as non-root user. - Added the ability to Handle case when IPv4 is encoded as IPv6 in GeoIP1/legacy. - Ensure we capture linux (lowercase) when extracting an OS. - Fixed a regression in parsing Google Cloud Storage or possibly other non-JSON formats. - Fixed inability to parse escaped formats. - Fixed issue when using '%s' with 'strptime(3)' under musl libc. This addresses mostly the Docker image. - Fixed possible buffer over-read for certain log-format patterns. - Fixed segfault when attempting to process a malformed JSON string. - Fixed segfault when setting an empty log-format from the TUI dialog. - Fixed sorting on hits and visitors when larger than INT_MAX. - Updated CloudFront pre-defined log-format to reflect the latest fields. - Updated 'Dockerfile' image to use 'alpine:3.13' instead of edge due to compatibility issue with the GNU coreutils. Changes to GoAccess 1.4.5 - Tuesday, January 26, 2021 - Fixed build issue due to initial declarations only allowed in C99 mode (e.g., CentOS7). Changes to GoAccess 1.4.4 - Monday, January 25, 2021 - Added 'Caddy' to the list of pre-defined log formats. - Added command line option '--no-strict-status' to disable status validation. - Added native support to parse JSON logs. - Added the ability to process timestamps in milliseconds using '%*'. - Ensure TUI/CSV/HTML reports are able to output 'uint64_t' data. - Ensure we allow UI render if the rate at which data is being read is greater than '8192' req/s. - Ensure we don't re-render Term/HTML output if no data was read/piped. - Fixed build configure to work on NetBSD. - Fixed issue where it would send data via socket each second when managed by systemd. - Fixed issue where parser was unable to parse syslog date with padding. - Fixed issue where some items under browsers.list were not tab separated. - Fixed issue where the format parser was unable to properly parse logs delimited by a pipe. - Fixed issue where T.X. Amount metrics were not shown when data was piped. - Fixed issue where XFF parser could swallow an additional field. - Fixed memory leak when using '%x' as date/time specifier. - Replaced select(2) with poll(2) as it is more efficient and a lot faster than select(2). - Updated Swedish i18n. Changes to GoAccess 1.4.3 - Friday, December 04, 2020 - Added the ability to set how often goaccess will parse data and output to the HTML report via '--html-refresh='. - Changed how TLS is parsed so the Cypher uses a separate specifier. It now uses '%K' for the TLS version and '%k' for the Cypher. - Fixed issue where real-time output would double count a rotated log. This was due to the change of inode upon rotating the log. - Updated man page to reflect proper way of 'tail -f' a remote access log. Changes to GoAccess 1.4.2 - Monday, November 16, 2020 - Added the ability to show 'Encryption Settings' such as 'TLSv1.2' and Cipher Suites on its own panel. - Added the ability to show 'MIME Types' such as 'application/javascript' on its own panel. - Changed Debian build to use mmdb instead of libgeoip (legacy). - Ensure the HTML report defaults to widescreen if viewport is larger than '2560px'. - Fixed inability to properly process multiple logs in real-time. - Fixed issue where named PIPEs were not properly seed upon generating filename. - Fixed issue where served time metrics were not shown when data was piped. - Removed unnecessary padding from SVG charts. Improves readability on mobile. Changes to GoAccess 1.4.1 - Monday, November 09, 2020 - Added additional browsers and bots to the main list. - Added 'Android 11' to the list of OSs. - Added 'macOS 11.0 Big Sur' to the list of OSs. - Added 'average' to each panel overall metrics. - Added '.dmg', '.xz', and '.zst' to the static list. - Added extra check to ensure restoring from disk verifies the content of the log against previous runs. - Added Russian translation (i18n). - Added Ukrainian translation (i18n). - Added support for HTTP status code '308'. - Added the ability for 'get_home ()' to return NULL on error, instead of terminating the process. Great if using through systemd. - Added the ability to read lowercase predefined log formats. For instance, '--log-format=COMBINED' or '--log-format=combined'. - Changed how FIFOs are created and avoid using predictable filenames under '/tmp'. - Changed '--ignore-referer' to use whole referrer instead of referring site. - Ensure Cache Status can be parsed without sensitivity to case. - Ensure restored data enforces '--keep-last' if used by truncating accordingly. - Fixed a few memory leaks when restoring from disk. - Fixed blank time distribution panel when using timestamps. - Fixed build issue due to lack of 'mmap' on 'Win'/'Cygwin'/'MinGW'. - Fixed crash in mouse enabled mode. - Fixed double free on data restore. - Fixed inability to keep processing a log when using '--keep-last'. - Fixed inability to properly parse truncated logs. - Fixed inability to properly count certain requests when restoring from disk. - Fixed issue where it would not parse subsequent requests coming from stdin (tail). - Fixed issue where log truncation could prevent accurate number counting. - Fixed issue where parsed date range was not rendered with '--date-spec'. - Fixed issue where parser would stop regardless of a valid '--num-test' value. - Fixed issue where restoring from disk would increment 'MAX.TS'. - Fixed possible incremental issue when log rotation occurs. - Fixed possible XSS when getting real-time data into the HTML report. - Fixed potential memory leak when failing to get root node. - Fixed real-time hits count issue for certain scenarios. - Fixed segfault in 'Docker' due to a bad allocation when generating FIFOs. - Fixed 'Unknown' Operating Systems with 'W3C' format. - Removed unnecessary include from parser.c so it builds in macOS. - Updated each panel overall UI to be more streamlined. - Updated French translation. - Updated German translation. - Updated Spanish translation. - Updated sigsegv handler. Changes to GoAccess 1.4 - Monday, May 18, 2020 - Added a caching storage mechanism to improve parsing raw data and data rendering. - Added a mechanism to avoid counting duplicate data when restoring persisted data from disk. - Added additional option to the HTML report to set a maximum number of items per page to 3. - Added a list of podcast-related user agents under '%sysconfdir%'. - Added 'Android 10' to the list of Android codenames. - Added a 'widescreen' layout to the HTML report (e.g., 4K TV/KPI Dashboard). - Added 'Beaker', 'Brave', and 'Firefox Focus' to the list of browsers - Added command line option --user-name=username to avoid running GoAccess as root when outputting a real-time report. - Added 'DuckDuckGo' and 'MSNBot' browsers to the browsers.list. - Added 'facebookexternalhit' to the default crawler list. - Added German translation (DE). - Added Kubernetes Nginx Ingress Log Format to the default config file. - Added 'macOS Catalina' to the list of OSX codenames. - Added minor CSS updates to HTML report. - Added missing header '' to fix FreeBSD build - Added new 'Edg' token to the list of browsers. - Added '--no-ip-validation' command line to disable client IP validation - Added '--persist' and '--restore' options to persist to disk and restore a dump from disk. - Added Portuguese translation (pt-BR) - Added Swedish translation (SV) - Added the ability to parse server cache status and a new panel to display those metrics. - Changed accumulated time to work by default on '--persist' and '--restore'. - Changed back how the hits and visitors percentage is calculated to be more intuitive. - Changed Geo Location panel display default to show only if database file is provided ('LIBMAXMINDDB'). - Changed initial processing time from secs to HH:MM:SS in HTML output. - Changed '--max-items' for the static HTML report to allow no limit on output entries. - Changed required 'gettext' version to 0.19 - Changed to ignore 'SIGPIPE' with 'SIG_IGN' - Changed version to 10.15 for 'macOS Catalina'. - Ensure proper escaping on default AWSELB log format. - Ensure valid requests counter is not affected on duplicate entries when restoring data. - Fixed issue preventing Ctrl-C (SIGINT) for the curses interface to stop the program. - Fixed issue where HTML report wouldn't update the tables when changing per page option. - Fixed issue where it wouldn't find either the user's or global config file. - Fixed issue where changing the number of items per page in the HTML report would not automatically refresh the tables. - Fixed issue where last updated label was not updated in real-time. - Fixed issue where overall date range wasn't showing the right start/end parse dates. - Fixed issue where tailing a file could potentially re-parse part of the log. - Fixed memory leak when fetching country/continent while using 'LIBMAXMINDDB'. - Fixed several '-Wcast-qual' warnings. - Fixed unwanted added characters to the HTML output. - Fixed websocket issue returning a 400 due to request header size. - Increased 'MAX_LINE_CONF' so a JSON string can be properly parsed from the config file. - Removed deprecated option '--geoip-city-data' from config file. - Removed unnecessary dependency from snapcraft.yaml. - Removed Vagrantfile per #1410 - Removed some old browsers from the default curated list. - Replaced TokyoCabinet storage for a non-dependency in-memory persistent storage. - Updated Dockerfile. Changes to GoAccess 1.3 - Friday, November 23, 2018 - Added ability to store accumulated processing time into DB_GEN_STATS tcb file via '--accumulated-time' command line option. - Added additional Apache status codes to the list. - Added a few feed readers to the list. - Added 'Android 8 Oreo' to the list of OSs. - Added 'Android Pie 9' to the list of OSs. - Added --anonymize-ip command line option to anonymize ip addresses. - Added --browsers-file command line option to load a list of crawlers from a text file. - Added byte unit (PiB) to C formatter and refactored code. - Added byte unit (PiB) to JS formatter. - Added Chinese translation (i18n). - Added French translation (i18n). - Added '%h' date specifier to the allowed date character specifiers. - Added "HeadlessChrome" to the list of browsers. - Added --hide-referer command line option to hide referrers from report. - Added HTTP status code 429 (TOO MANY REQUESTS). - Added IGNORE_LEVEL_PANEL and IGNORE_LEVEL_REQ definitions. - Added Japanese translation (i18n). - Added macOS 10.14 Mojave to the list of OSs. - Added "Mastodon" user-agent to the list of crawlers/unix-like. - Added new fontawesome icons and use angle arrows in HTML paging. - Added new purple theme to HTML report and default to it. - Added --no-parsing-spinner command line option to switch off parsing spinner. - Added .ogv and ogg static file extension (ogg video, Ogg Vorbis audio). - Added OS X version numbers when outputting with --real-os. - Added parsing mechanism in an attempt capture more bots and to include unspecified bots/crawlers. - Added --pidfile command line option to the default config file. - Added Spanish translation (i18n). - Added SSL support for Docker goaccess build. - Added support to the WebSocket server for openssl-1.1*. - Added the ability to show/hide a chart per panel in the HTML report. - Added transparency to the navigation bar of the HTML report. - Added "WhatsApp" user-agent to the list of crawlers. - Changed default db folder so it adds the process id (PID). --db-path is required now when using --load-from-disk. - Changed Dockerfile to build from the current source. - Changed 'hits' to be right-aligned on TUI. - Changed to use faster slide animations on HTML report. - Changed wording from 'Bandwidth' to the proper term 'Tx. Amount'. - Ensure database filenames used by btree are less predictable. - Ensure HTML templates, CSS and JS files are minified when outputting report. - Ensure key phrases from Google are added even when https is used. - Ensure live report updates data & charts if tab/document has focus. - Ensure multiple 'Yandex' crawlers are properly parsed. - Ensure Safari has priority over most crawlers except the ones that are known to have it. - Ensure the request protocol on its own is properly parsed. - Ensure the right number of tests are performed against the given log. - Ensure user configuration is parsed first when available. - Ensure wss:// is used when connecting via HTTPS. - Ensure XFF parser takes into account escaped braces. - Fixed a regression where fifo-in/out would fail with ENXIO. - Fixed a regression where it would return EXIT_FAILURE on an empty log. - Fixed a (ssh) pipeline problem with fgetline()/fgets() when there is a race for data on stdin. - Fixed broken X-Forwarded-For (XFF) %~ specifier in certain parsing cases. - Fixed conf.filenames duplication problem if logs are via pipe. - Fixed float percent value on JSON/HTML output for locales using decimal comma. - Fixed issue where it was not possible to establish a Web Socket connection when attempting to parse and extract HTTP method. - Fixed issue where log formats with pipe delimiter were not properly parsed. - Fixed memory leak after config file path has been set (housekeeping). - Fixed memory leak when adding host to holder introduced in c052d1ea. - Fixed possible memory leak when hiding specific referrers. - Fixed several JS jshint warnings. - Fixed sudo installs on TravisCI. - Fixed UNDEFINED time range in HTML report when VISITORS panel was ignored. - Fixed unnecessary closing span tags from template. - Fixed use-after-free when two color items were found on color_list. Changes to GoAccess 1.2 - Tuesday, March 07, 2017 - Added a Dockerfile. - Added Amazon S3 bucket name as a VirtualHost (server block). - Added a replacement for GNU getline() to dynamically expand line buffer while maintaining real-time output. - Added --daemonize command line option to run GoAccess as daemon. - Added several improvements to the HTML report on small-screen devices. - Added option to the HTML report to auto-hide tables on small-screen devices. - Added --process-and-exit command line option to parse log and exit. - Added several feed readers to the list of browsers. - Added "-" single dash per convention to read from the standard input. - Added support for MaxMind GeoIP2. - Added the ability to read and follow from a pipe such as "tail -f access.log | goaccess -" - Added the ability to specify multiple logs as input sources, e.g.: "goaccess access.log access.log.1" while maintaining real-time output. - Added time unit (seconds) to the processed time label in the HTML/terminal output. - Added visitors' percent column to the terminal dashboard. - Changed D3 charts to dim Y-axis on mouseover. - Changed D3 charts to reflect HTML column sort. - Changed D3 charts to render only if within the viewport. This improves the overall real-time HTML performance. - Changed HTML report tables to render only if within the viewport. - Changed percentage calculation to be based on the total within each panel. - Ensure start/end dates are updated real-time in the HTML output. - Ensure "window.location.hostname" is used as the default WS server host. In most cases, this should avoid the need for specifying "--ws-url=host". Simply using "--real-time-html" should suffice. - Fixed issue on HTML report to avoid outputting scientific notation for all byte sizes. - Fixed integer overflow when calculating bar graph length on terminal output. - Fixed issue where global config file would override command line arguments. - Fixed issue where it wouldn't allow loading from disk without specifying a file when executed from the cron. - Fixed issue where parser couldn't read some X-Forwarded-For (XFF) formats. Note that this breaks compatibility with the original implementation of parsing XFF, but at the same time it gives much more flexibility on different formats. - Fixed issue where specifying fifo-in/out wouldn't allow HTML real-time output. - Fixed issue where the wrong number of parsed lines upon erroring out was displayed. - Fixed issue where the WebSocket server prevented to establish a connection with a client due to invalid UTF-8 sequences. - Fixed percent issue when calculating visitors field. - Updated the list of crawlers. Changes to GoAccess 1.1.1 - Wednesday, November 23, 2016 - Added data metric's "unique" count on each panel to the JSON/HTML outputs. - Changed D3 bar charts to use .rangeBands and avoid extra outer padding. - Fixed mouseover offset position issue on D3 bar charts. - Fixed possible heap overflow when an invalid status code was parsed and processed. This also ensures that only valid HTTP status codes are parsed >=100 or <= 599. - Fixed sluggish D3 chart re-rendering by changing how x-axis labels are displayed in the HTML report. Changes to GoAccess 1.1 - Tuesday, November 08, 2016 - Added a new layout to the HTML report and additional settings and changes. - Added --crawlers-only command line option to display crawlers/bots only. - Added --fifo-in and --fifo-out command line options to set websocket FIFO reader/writer. - Added --no-html-last-updated command line option. - Added --num-tests command line option. - Added --html-prefs command line option to to set default preferences for the HTML report. - Added "Amazon S3" Log Format to the list of predefined options. - Added "Android 7.1 Nougat" to the list of OSs. - Added "Android Marshmallow 6.0.1" to the list of OSs. - Added "Android Nougat 7.0" to the list of OSs. - Added "Feed Wrangler" to the list of feeds. - Added "Go-http-client" to the list of browsers. - Added "MicroMessenger" (WeChat) to the list of browsers. - Added "SemrushBot" to the list of crawlers. - Added "Remote User" panel to capture HTTP authentication requests. Use %e within the log-format variable to enable this panel. - Added tebibyte unit to the byte to string function converter. - Added the ability to parse reverse proxy logs that have multiple IPs. This adds the ability to parse the "X-Forwarded-For" field in a reverse proxy setup. - Added the ability to show which token didn't match log/date/time pattern. This also ensures that in the absence of data, its output is not treated as error but instead it produces an empty report. - Added the ability to specify a WebSocket protocol (ws|wss) through --ws-url. - Added the request query string to the W3C format. - Added TLS/SSL support to the HTML real-time report. - Changed browser classification for Google Cloud Clients. - Changed how "Darwin" OS was reported to display AppName instead. - Changed default W3C log format to use the URL path instead of full request. - Changed HTML default number of items on each table to 7. - Changed request parser to allow empty query strings. - Changed default HTML output theme to darkBlue. - Ensure every version of iOS is broken down under the OS panel. - Ensure latest JSON data is fast-forwarded when connection is opened. GoAccess now sends the latest JSON data to the client as soon as the WebSocket connection is opened. - Ensure localStorage is supported and enabled in the HTML report - Ensure unknown countries/continents are listed. - Fixed D3 chart width overflow issue on Edge. - Fixed integer to string key conversion for unique visitors. This fixes the issue where resulting keys would collide with existing keys and thus not keeping the right visitors count on certain panels. - Fixed memory leak when unable to URL decode %q specifier. - Fixed memory leak when unable to URL decode %U specifier. - Fixed month name abbreviation on app.js. - Fixed percentage integer overflow with large numbers on 32bits platforms. - Fixed percent calculation due to integer division rounding to zero. - Fixed possible code injection when outputting an HTML report. - Fixed segfault when using options -H or -M without an argument. - Removed timestamp from the HTML report title tag. Changes to GoAccess 1.0.2 - Tuesday, July 05, 2016 - Added minor changes to the HTML report stylesheet. - Added the ability to specify the WebSocket port within --ws-url. - Added the proper byte swap functions used by Sun Solaris. - Added the proper default --http-method/protocol values on the config file. - Changed bar transition to scale delay dynamically to the length of the dataset. - Fixed build issue on platforms lacking of open_memstream() by refactoring the JSON module to use its own memory buffer. - Fixed issue where the server wouldn't send cached buffer to slow clients. - Fixed OS X build check of ncursesw. - Implemented a throttle mechanism for slow clients to avoid caching too much data on the server-side. - Removed flickering on D3 line and bar chart redraw. Changes to GoAccess 1.0.1 - Friday, June 17, 2016 - Added Android version number along with the codename when using --real-os, e.g., "Lollipop 5.1". - Added some missing headers and function checks to configure.ac. - Fixed a regression where it wouldn't allow abbreviated date and time formats such as %F or %T. - Fixed build issues on systems running GLIBC older than 2.9, such as RHEL <= 5. - Fixed issue where it wouldn't send the whole buffer to a socket causing the real-time-html WebSocket server to progressively consume a lot more memory. - Fixed memory leak when using getline and follow mode enabled. - Fixed some buffer initialization issues on read_line() and perform_tail_follow(). - Fixed uint types in sha1 files. Changes to GoAccess 1.0 - Thursday, June 09, 2016 - Added --enable-panel= command line option to display the given module. - Added --json-pretty-print command line option to output pretty json. - Added --log-format= command-line shortcuts for standard log formats. - Added --origin command line option to match the origin WebSocket header. - Added --output= as a shortcut to --output-format. - Added a complete real-time functionality to the HTML output. - Added an option to set the max number of items to show per panel. - Added D3 Visualziations to the HTML dashboard. - Added metadata metrics to the each of the panels (JSON output) - Added option to specify time distribution specificity. - Added the ability to download a JSON file from the HTML report. - Added the ability to output multiple formats on a single log parse. - Added the ability to set the date specificity in hours. - Added the ability to sort all HTML tables on all panels. - Added the ability to specify a custom CSS and JS file to the HTML report. - Added user-agents to the JSON output per each host. - Added "Vivaldi" to the list of browsers. - Bootstrapify the HTML dashboard. - Changed configure.ac to use LDFLAGS instead of CFLAGS where applicable. - Changed default terminal color scheme to 256 Monokai if terminal supports 256 colors. - Changed GoAccess license to The MIT License (MIT) - Changed the visitors panel to display its dates continuously instead of top. - Default to 256 Monokai color scheme if terminal supports 256 colors. - Default to display HTTP method/protocol (if applicable). - Display the children's Max. T.S. as the parent's top Max. T.S. - Ensure the parent's Avg. T.S. displays parent's Cum. T.S. over parent's Hits. - Fixed color issue when switching from the color scheme dialog. - Fixed cross platform build issue when ncurses is built with and without termlib=tinfo. - Fixed curses header window issue where it wouldn't clear out on small window sizes. - Fixed issue where tail mode wouldn't parse full lines using getline(). - Fixed minor background color issue when using ncurses 6. - Fixed possible division by zero when calculating percentage. - Fixed singly link list node removal. - Fixed still reachable memory leak on GeoIP cleanup (geoip legacy >= 1.4.7). - Fixed various Valgrind's still reachable memory leaks. - Removed -Wredundant-decls. Changes to GoAccess 0.9.8 - Monday, February 29, 2016 - Added a more complete list of static extensions to the config file. - Added "Android 6.0 Marshmallow" to the list of OSs. - Added --no-tab-scroll command line option to disable scroll through panels on TAB. - Added the first and last log dates to the overall statistics panel. - Ensure GoAccess links correctly against libtinfo. - Ensure static content is case-insensitive verified. - Fixed bandwidth overflow issue (numbers > 2GB on non-x86_64 arch). - Fixed broken HTML layout when html-method/protocol is missing in config file. - Refactored parsing and display of available modules/panels. Changes to GoAccess 0.9.7 - Monday, December 21, 2015 - Added "Squid native" log format to the config file. - Fixed integer overflow when getting total bandwidth using the on-disk storage. - Fixed issue where a timestamp was stored as date under the visitors panel. - Fixed issue where config dialog fields were not cleared out on select. - Fixed issue where "Virtual Hosts" menu item wasn't shown in the HTML sidebar. Changes to GoAccess 0.9.6 - Tuesday, October 27, 2015 - Added --dcf command line option to view the default config file path. - Added --ignore-status the ability to ignore parsing status codes. - Added "Darwin" to the list of OSs. - Fixed segfault when appending data to a log (follow) without virtualhosts. Changes to GoAccess 0.9.5 - Thursday, October 22, 2015 - Added major performance improvements to the default storage when parsing and storing data (~%44 less memory, ~37% faster). - Added the ability to parse virtual hosts and a new panel to display metrics per virtual host. - Added the ability to parse HTTP/2 requests. - Added the ability to use GNU getline() to parse full line requests. - Added the ability to output debug info if a log file is specified, even without --enable-debug. - Added OS X "El Capitan". - Added WebDav HTTP methods and HTTP status from RFC 2518 and RFC 3253. - Fixed detection of some Googlebots. - Fixed issue where time served metrics were not shown when loading persisted data. - Fixed linker error on OSX: ld: library not found for -lrt. - Fixed percentage on the HTML output when excluding IPs. - Removed GLib dependency and refactored storage functionality. By removing this dependency, GoAccess is able to store data in a more efficient manner, for instance, it avoids storing integer data as void* (generic typing), thus greatly improving memory consumption for integers. Changes to GoAccess 0.9.4 - Tuesday, September 08, 2015 - Added --all-static-files command line option to parse static files containing a query string. - Added --invalid-requests command line option to log invalid requests to a file. - Added additional overall metric - total valid requests. - Added "%~" specifier to move forward through a log string until a non-space char is found. - Added the ability to parse native Squid access.log format. - Fixed a few issues in the configuration script. - Fixed inability to parse color due to a missing POSIX extension. "ERR:Invalid bg/fg color pairs" Changes to GoAccess 0.9.3 - Wednesday, August 26, 2015 - Added --no-column-names command line option to disable column name metrics. - Added a default color palette (Monokai) to the config file. - Added AWS Elastic Load Balancing to the list of predefined log/date/time formats. - Added CloudFlare status codes. - Added column headers for every enabled metric on each panel. - Added cumulative time served metric. - Added "DragonFly" BSD to the list of OSs. - Added maximum time served metric (slowest running requests). - Added "Slackbot" to the list of crawlers/browsers. - Added the ability to parse the query string specifier "%q" from a log file. - Added the ability to process logs incrementally. - Added the ability to set custom colors on the terminal output. - Disabled REFERRERS by default. - Ensure bandwidth metric is displayed only if %b specifier is parsed. - Fixed issue where the --sort-panel option wouldn't sort certain panels. - Fixed several compiler warnings. - Set predefined static files when no config file is used. - Updated "Windows 10" user agent from 6.4 (wrong) to 10.0.(actual) Changes to GoAccess 0.9.2 - Monday, July 06, 2015 - Added ability to fully parse browsers that contain spaces within a token. - Added multiple user agents to the list of browsers. - Added the ability to handle time served in milliseconds as a decimal number `%L`. - Added the ability to parse a timestamp in microseconds. - Added the ability to parse Google Cloud Storage access logs. - Added the ability to set a custom title and header in the HTML report. - Added "%x" as timestamp log-format specifier. - Ensure agents" hash table is destroyed upon exiting the program. - Ensure "Game Systems" are processed correctly. - Ensure visitors panel header is updated depending if crawlers are parsed or not. - Fixed issue where the date value was set as time value in the config dialog. - Fixed memory leak in the hits metrics when using the in-memory storage (GLib). Changes to GoAccess 0.9.1 - Tuesday, May 26, 2015 - Added --hl-header command line option to highlight active panel. - Added "Applebot" to the list of web crawlers. - Added "Microsoft Edge" to the list of browsers. - Added additional Nginx-specific status codes. - Ensure dump_struct is used only if using __GLIBC__. - Ensure goaccess image has an alt attribute on the HTML output for valid HTML5. - Ensure the config file path is displayed when something goes wrong (FATAL). - Ensure there is a character indicator to see which panel is active. - Fixed Cygwin compile issue attempting to use -rdynamic. - Fixed issue where a single IP did not get excluded after an IP range. - Fixed issue where requests showed up in the wrong view even when --no-query-string was used. - Fixed issue where some browsers were not recognized or marked as "unknown". - Fixed memory leak when excluding an IP range. - Fixed overflows on sort comparison functions. - Fixed segfault when using on-disk storage and loading persisted data with -a. - Removed keyphrases menu item from HTML output. - Split iOS devices from Mac OS X. Changes to GoAccess 0.9 - Thursday, March 19, 2015 - Added --geoip-database command line option for GeoIP Country/City IPv6. - Added "Windows 10 (v6.4)" to the real windows user agents. - Added ability to double decode an HTTP referer and agent. - Added ability to sort views through the command line on initial load. - Added additional data values to the backtrace report. - Added additional graph to represent the visitors metric on the HTML output. - Added AM_PROG_CC_C_O to configure.ac - Added "Android Lollipop" to the list of operating systems. - Added "average time served" metric to all panels. - Added "bandwidth" metric to all panels. - Added command line option to disable summary metrics on the CSV output. - Added numeric formatting to the HTML output to improve readability. - Added request method specifier to the default W3C log format. - Added the ability to ignore parsing and displaying given panel(s). - Added the ability to ignore referer sites from being counted. A good case scenario is to ignore own domains. i.e., owndomain.tld. This also allows ignoring hosts using wildcards. For instance, *.mydomain.tld or www.mydomain.* or www?.mydomain.tld - Added time/hour distribution module. e.g., 00-23. - Added "visitors" metrics to all panels. - Changed AC_PREREQ macro version so it builds on old versions of autoconf. - Changed GEOIP database load to GEOIP_MEMORY_CACHE for faster lookups. - Changed maximum number of choices to display per panel to 366 from 300. - Ensure config file is read from home dir if unable to open it from %sysconfdir% path. - Fixed array overflows when exceeding MAX_* limits on command line options. - Fixed a SEGFAULT where sscanf could not handle special chars within the referer. - Fixed character encoding on geolocation output (ISO-8859 to UTF8). - Fixed issue on wild cards containing "?" at the end of the string. - Fixed issue where a "Nothing valid to process" error was triggered when the number of invalid hits was equal to the number of valid hits. - Fixed issue where outputting to a file left a zero-byte file in pwd. - Improved parsing of operating systems. - Refactored log parser so it allows with ease the addition of new modules. This also attempts to decouple the core functionality from the rendering functions. It also gives the flexibility to add children metrics to root metrics for any module. e.g., Request A was visited by IP1, IP2, IP3, etc. - Restyled HTML output. Changes to GoAccess 0.8.5 - Sunday, September 14, 2014 - Fixed SEGFAULT when parsing a malformed request that doesn't have HTTP status. Changes to GoAccess 0.8.4 - Monday, September 08, 2014 - Added --444-as-404 command line option to handle nginx non-standard status code 444 as 404. - Added --4xx-to-unique-count command line option to count client errors (4xx) to the unique visitors count. Now by default it omits client errors (4xx) from being added to the unique visitors count as they are probably not welcomed visitors. 4xx errors are always counted in panels other than visitors, OS & browsers. - Added and updated operating systems, and browsers. - Added excluded IP hits count to the general statistics panel on all reports. - Added HTTP nonstandard code "444" to the status code list. - Fixed compile error due to missing include for type off_t (gcc 4.1). - Fixed issue when excluding IPv4/v6 ranges. - Removed request status field restriction. This allows parsing logs that contain only a valid date, IPv4/6 and host. Changes to GoAccess 0.8.3 - Monday, July 28, 2014 - Fixed SEGFAULT when parsing a CLF log format and using --ignore-crawlers. - Fixed parsing conflict between some Opera browsers and Chrome. - Fixed parsing of several feed readers that are Firefox/Safari-based. - Fixed Steam detection. - Added Huawei to the browser's list and removed it from the OS's list. Changes to GoAccess 0.8.2 - Monday, July 20, 2014 - Added --version command line option. - Added --ignore-crawlers command line option to ignore crawlers. - Added ability to parse dates containing whitespaces in between, e.g., "Jul 15 20:13:59" (syslog format). - Added a variety of browsers, game systems, feed readers, and podcasts. - Added missing up/down arrows to the help section. - Added the ability to ignore multiple IPv4/v6 and IP ranges. - Added the PATCH method according to RFC 5789. - Fixed GeoLocation percent issue for the JSON, CSV and HTML outputs. - Fixed memory leak when excluding one or multiple IPs. Changes to GoAccess 0.8.1 - Monday, June 16, 2014 - Added ability to add/remove static files by extension through the config file. - Added ability to print backtrace on segmentation fault. - Escaped JSON strings correctly according to [RFC4627]. - Fixed encoding issue when extracting keyphrases for some HTTP referrers. - Fixed issue where HTML bar graphs were not shown due to numeric locale. - Fixed issue with URIs containing "\r?\n" thus breaking the corresponding output. - Make sure request string is URL decoded on all outputs. Changes to GoAccess 0.8 - Tuesday, May 20, 2014 - Added APT-HTTP to the list of browsers. - Added data persistence and ability to load data from disk. - Added IE11 to the list of browsers. - Added IEMobile to the list of browsers. - Added multiple command line options. - Added Nagios check_http to the list of browsers. - Added parsing progress metrics - total requests / requests per second. - Added the ability to parse a GeoLiteCity.dat to get the city given an IPv4. - Changed the way the configuration file is parsed. This will parse all configuration options under ~/.goaccessrc or the specified config file and will feed getopt_long with the extracted key/value pairs. This also allows the ability to have comments on the config file which won't be overwritten. - Ensure autoconf determines the location of ncurses headers. - Fixed issue where geo_location_data was NULL. - Fixed issue where GoAccess did not run without a tty allocated to it. - Fixed potential memory leak on --log-file realpath(). - Fixed Solaris build errors. - Implemented an on-memory hash database using Tokyo Cabinet. This implementation allows GoAccess not to rely on GLib's hash table if one is needed. - Implemented large file support using an on-disk B+ Tree database. This implementation allows GoAccess not to hold everything in memory but instead it uses an on-disk B+ Tree database. - Trimmed leading and trailing whitespaces from keyphrases module. Changes to GoAccess 0.7.1 - Monday, February 17, 2014 - Added --no-color command line option to turn off color output. - Added --real-os command line option to get real OS names, e.g., "Android, Windows, Mac". - Added ability to log debug messages to a file. - Added ability to parse tab-separated log format strings. - Added ability to support terminals without colors. - Added command line option to append HTTP method to request. - Added command line option to append HTTP protocol to request. - Added long options to command-line. - Added missing "Win 9x 4.90" (Windows Me) user-agent. - Added missing Windows RT user-agent. - Ensure mouse click does not reset expanded module if it is the same. - Fixed Amazon CloudFront tab-separated log format. - Fixed "FreeBSD style" ncursesw built into system. - Fixed HTML report issue where data cell would not wrap. - Fixed issue when isatty() could not find a valid file descriptor. - Fixed SymbianOS user-agent and retrieve its version. Changes to GoAccess 0.7 - Monday, December 15, 2013 - Added a command line option to ignore request query strings. - Added additional compiler flags & fixed several warnings. - Added additional static file extensions. - Added country per IP to HOSTS module (HTML & JSON). - Added DEBUG mode to Makefile & -O2 to default release. - Added GEOLOCATION report to all outputs - includes continents/countries. - Added IP resolver to HTML and JSON output. - Added module numbers to each module header. - Added the ability to output JSON and CSV. - Added Windows NT 6.3 (Win 8.1) to the list. - Fixed buffer overflow issue with realpath. - New HTML report - HTML5 + CSS styles. - Properly split request line into the three request modules. Changes to GoAccess 0.6.1 - Monday, October 07, 2013 - Added active module indication by name. - Added additional crawlers to the list. - Added custom configuration file option. - Added human-readable string when unable to open log. - Added missing include when compiling on OSX 10.6. - Added optional mouse support to the main dashboard. - Added the ability to select active module by number (keys). - Added the rest of HTTP methods according to RFC2616. - Changed referring site sscanf format to process multiple URLs. - Changed the default color scheme to monochrome. - Fixed issue where %T was not processing floating-point numbers. - Fixed percentage issue for browsers and os modules. - Fixed SIGSEGV when reading from stdin to stdout. - Improved performance when expanding a module. - Reduced memory consumption by decreasing number of dns threads. - Removed ^UP/^DOWN due to a key mapping conflict. Changes to GoAccess 0.6 - Monday, July 15, 2013 - Added a bunch of minor fixes and changes. - Added and updated list of browsers and operating systems. - Added a predefined log format/date for the Amazon CloudFront (Download Distribution). - Added parsing/processing indicators. - Added the ability to independently sort each module. - Added the ability to search across the whole dashboard with the option to use regular expressions. - Config window now accepts [ENTER] to continue or F10. - Fixed issue where Opera +15 was identified as Chrome. - Implemented the ability to parse the time taken to serve the request, in microseconds and seconds. - Improved memory usage and better performance in general. - Moved away from the original pop-up UI to a new expandable dashboard allowing data to be processed in real-time. - Sanitized HTML output with html entities for special chars. - Updated the hosts module so it shows the reverse DNS as a sub node. Changes to GoAccess 0.5 - Monday, June 04, 2012 - Added ability to output a full stats report to a file. - Added a key shortcut to scroll top/bottom. - Added a new include sys/socket.h - BSD - Added support for IPv6 - Added the ability to parse a custom format string. - Fixed google cache key-phrases. - Fixed issue on empty Google query strings. - Fixed issue on Opera agents where version was not recognized correctly. - Fixed other minor fixes and changes. Changes to GoAccess 0.4.2 - Monday, January 03, 2011 - Added UTF-8 support. Now it should handle properly wide-character/UTF-8. Run ./configure --enable-utf8 - Fixed a minor bug when adding monthly totals on visitors subwin. - Removed -lrt since GoAccess does not link to librt. (OS X doesn't include librt) Changes to GoAccess 0.4.1 - Monday, December 13, 2010 - Added more flexibility when resizing the terminal. Should work fine with the standard 80x24. - Added the ability to pass a flag to ./configure so GeoIP can be enabled if needed. - Implemented a pipeline from stdin, so the input doesn't have to be only a file. Changes to GoAccess 0.4 - Tuesday, November 30, 2010 - Added graphs to the unique_visitors subwin. - Implemented bandwidth per day, and host. - Implemented list of agents for specific hosts. - Rewrote hash tables iterative code to avoid the use of GHashTableIter, this way it works with all GLib > 2.0.0. - Various bug fixes and code cleanups (mainly in the subwin modules). Changes to GoAccess 0.3.3 - Monday, September 27, 2010 - Changed tarball's filename. - Fixed a request size parsing issue. Due to malformed syntax on the HTTP protocol, bandwidth was reset to 0. Ex. "HEAD /" 400 20392 - Fixed a segfault when goaccess was executed without any options but with an additional unknown argument. Changes to GoAccess 0.3.2 - Thursday, September 09, 2010 - Fixed an agent parsing issue. As a result, operating systems were not properly counted. Changes to GoAccess 0.3.1 - Friday, September 03, 2010 - Added a color scheme implementation Changes to GoAccess 0.3 - Sunday, August 29, 2010 - Added a counter for total requests since initial parse was implemented - Added a more detailed and comprehensive browser and os report - Added bandwidth details for requested files - Added percentage details on modules 2, 3, 4, 5, 10, 11 - Code cleanups - Fixed a potential segmentation fault when resizing main window - Fixed a segmentation fault on pop-up window search if haystack was null - Fixed invalid entries when parsing status codes - Implemented a real support for LFS - Handles files larger than 2 GiB on 32-bit systems - Implemented support for "vhost_combined" log format - Changed position of data/graphs depending on # of hits Changes to GoAccess 0.2 - Sunday, July 25, 2010 - Added a keyphrases report coming from Google search engine. This includes, raw, cache, and translation queries. - Fixed a memory leak when invalid entries were parsed - Fixed a potential buffer overflow. - Implemented real-time statistics (RTS). Data will be appended as the log file grows. Equivalent to "tail -f" on Unix systems - Implemented screen resize functionality - Simplified creation of the "unique visitors" hash-key. - Simplified the "process_unique_data" function - Various small speed increases & code cleanup Changes to GoAccess 0.1.2 - Monday, July 12, 2010 - Fixed a segmentation fault when parsing logs with unusual request type. Ex. "GET HTTP/1.1 HTTP/1.1" Changes to GoAccess 0.1.1 - Saturday, July 10, 2010 - Added an enhanced error handling - Added an extra macro on configure.ac to check against GHashTableIter. ./configure might not check for glib 2.16 that introduced "GHashTableIter". - Added Glibc LFS - Cleaned up code a little bit - Fixed a segmentation fault when displaying the help text on x86_64. - Fixed assignments in conditions. In case the assignment is actually intended put extra parenthesis around it. This will shut GCC (and others) up. - Fixed casts associated with "g_hash_table_iter_next". - Fixed comparison between signed and unsigned integer types. - Fixed function declarations. - Fixed includes. - Fixed two format strings. (If the error was ever triggered, it'd most likely lead to a segfault) Changes to GoAccess 0.1 - Tuesday, July 06, 2010 - Initial release 0.1 goaccess-1.9.3/depcomp0000755000175000017300000005602014620766657010375 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: goaccess-1.9.3/config.guess0000744000175000017300000014267614620766657011353 #! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2023-08-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Just in case it came from the environment. GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still # use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #if defined(__ANDROID__) LIBC=android #else #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case $UNAME_VERSION in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. GUESS=$machine-${os}${release}${abi-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. case `(/bin/universe) 2>/dev/null` in att) GUESS=pyramid-pyramid-sysv3 ;; *) GUESS=pyramid-pyramid-bsd ;; esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) GUESS=sparc-icl-nx7 ;; esac ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$SUN_ARCH-pc-solaris2$SUN_REL ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris3$SUN_REL ;; sun4*:SunOS:*:*) case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case `/bin/arch` in sun3) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } GUESS=mips-mips-riscos$UNAME_RELEASE ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL ;; *:GNU/*:*:*) # other systems with GNU libc and userland GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-pc-managarm-mlibc" ;; *:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __ARM_EABI__ #ifdef __ARM_PCS_VFP ABI=eabihf #else ABI=eabi #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; esac fi GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:cos:*:*) GUESS=$UNAME_MACHINE-unknown-cos ;; kvx:mbr:*:*) GUESS=$UNAME_MACHINE-unknown-mbr ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; *) GUESS=hppa-unknown-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __i386__ ABI=x86 #else #ifdef __ILP32__ ABI=x32 #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in x86) CPU=i686 ;; x32) LIBCABI=${LIBC}x32 ;; esac fi GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. GUESS=i386-sequent-sysv4 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. GUESS=i586-pc-msdosdjgpp ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) GUESS=m68k-unknown-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; ppc:Haiku:*:*) # Haiku running on Apple PowerPC GUESS=powerpc-apple-haiku ;; *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in A*) GUESS=alpha-dec-vms ;; I*) GUESS=ia64-dec-vms ;; V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; esac # Do we have a guess based on uname results? if test "x$GUESS" != x; then echo "$GUESS" exit fi # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: goaccess-1.9.3/po/0000755000175000017300000000000014626467010007476 5goaccess-1.9.3/po/pt_BR.gmo0000644000175000017300000004335514626466521011150  `a?z;79@<z@4B-:p$( 97?"w<27 4Bw754 6A6x#?'(5P-= 9%A_93BDb<;# &D*k/-B7IeA{>A >;_%'(%8 JV1q  A $ . 8 B%Lr+w+$   . <GV fs0   ; T b m v | &   #  ! ! '!1!8!!>=>@> V>w>>>0>>>> > ???42?g?%w? ? ? ????@:@T@m@@@@@A@A AA3)A?]AJAIAI2BG|BVBNCYjCGC D D D*D/DBD]DxD DDDDD DBD"EBESEnEE,E#E?E/1F$aFFFFFFFFH;!+6|$oV/I*yJBKdx]mzP {u)}D~gvrOtF"Lf503:ni =b^&'(% q@a spchwYU lSTQ9\GZ174.`RCA-8ke2Mj# E>,N<?_[WX'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol429 - Too Many Requests: The user has sent too many requests444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAvg. T.S.BarBrightBrowsersChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsItems per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog SizeLog SourceMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTable ColumnsTablesThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: Goaccess Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2019-04-25 20:34-0300 Last-Translator: Alan Placidina Maria Language-Team: Language: pt_BR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 1.5.4 '%1$s' painel está desativado100 - Continuar: o servidor recebeu a parte inicial da requisição101 - Protocolos de comutação: cliente pediu para alternar protocolos1xx Informativo200 - OK: A requisição feita pelo cliente foi bem-sucedida201 - Criado: A requisição foi concluída e criada202 - Aceito: A requisição foi aceita para processar203 - Informações não autorizadas: resposta de terceiros204 - Nenhum conteúdo: A requisição não retornou nenhum conteúdo205 - Redefinir conteúdo: O servidor pediu ao cliente para redefinir o documento206 - Conteúdo Parcial: O GET parcial foi bem-sucedido207 - Mútiplos-Status: WebDAV; RFC 4918208 - Já Relatado: WebDAV; RFC 58422xx Exito300 - Múltiplas Opções: Múltiplas alternativas para o recurso301 - Movido Permanentemente: Recurso foi movido permanentemente302 - Movido Temporariamente (redirecionar)303 - Consulte Outro Documento: A resposta está em uma URI diferente304 - Não Modificado: O recurso não foi modificado305 - Usar Proxy: Só pode ser acessado através do proxy307 - Redirecionamento Temporário: Recurso temporariamente movido3xx Redirecionamento400 - Solicitação Incorreta: A sintaxe da solicitação é inválida401 - Não Autorizado: Solicitação precisa de autenticação de usuário402 - Pagamento Exigido403 - Proibido: Servidor está se recusando a responder404 - Não Encontrado: Recurso solicitado não pôde ser encontrado405 - Método Não Permitido: Método de solicitação não suportado406 - Não Aceitável407 - Autenticação de Proxy Necessária408 - Tempo Limite da Solicitação: O servidor expirou aguardando a solicitação409 - Conflito: Conflito no pedido410 - Foi: Recurso solicitado não está mais disponível411 - Comprimento Necessário: Comprimento de conteúdo inválido412 - Falha na Pré-Condição: O servidor não atende às condições prévias413 - Payload Muito Grande414 - Requisição-URI muito longa415 - Tipo de Mídia Sem Suporte: Tipo de mídia não é suportado416 - Intervalo da Requisição Não Satisfatório: Não é possível fornecer essa parte417 - Falha na Expectativa421 - Requisição Misdirected422 - Entidade Não Processável devido a erros semânticos: WebDAV423 - O recurso que está sendo acessado está bloqueado424 - Falha na Dependência: WebDAV426 - Atualização Necessária: O cliente deve alternar para um protocolo diferente429 - Requisições Demasiadas: O utilizador enviou requisições demasiadamente444 - (Nginx) Conexão fechada sem enviar cabeçalhos451 - Indisponível Por Razões Legais494 - (Nginx) Cabeçalho da Requisição Muito Grande495 - (Nginx) Erro de certificado de cliente SSL496 - (Nginx) O cliente não forneceu certificado497 - (Nginx) Requisição HTTP enviada para a porta HTTPS499 - (Nginx) Conexão fechada pelo cliente durante o processamento da requisição4xx Erros do cliente500 - Error Interno do Servidor501 - Não Implementado502 - Gateway Inválido: Recebeu uma resposta inválida do upstream503 - Serviço Indisponível: O servidor está indisponível no momento504 - Gateway timeout: O servidor upstream falhou ao enviar pedido505 - Versão HTTP Não Suportada520 - CloudFlare - Servidor Web está retornando um erro desconhecido521 - CloudFlare - Servidor Web está offline522 - CloudFlare - A conexão expirou523 - CloudFlare - A origem está inacessível524 - CloudFlare - Ocorreu tempo limite5xx Erros do servidorÁrea SplineOcultar em Dispositivos PequenosOcultar tabelas em dispositivos pequenosMéd. T.S.BarraClaroNavegadoresGráficoOpções de GráficoCidadeContinente/Pais ordenado por requisições únicas [, avgts, cumts, maxts]PaisCum. T.S.Azul EscuroCinza EscuroPainel de ControlePainel de Controle - Análise geral das requisiçõesDadosDados ordenados por requisições [, avgts, cumts, maxts]Dados ordenados por hora [, avgts, cumts, maxts]Formato da Data - [d] para adicionar/editar formatoData/HoraMostrar TabelasExemplos podem ser encontrados executandoAccesos IP Excl.Exp. PanelExportar como JSONReq. InválidasOpções de ArquivoEncontrar padrão em todas as vistasPrimeiroPara mais detalhes visiteFormato de Erros - Verifique seu formato de log/data/horaGeo LocalizaçãoAjuda Rápida de GoAccessCodigos de Status HTTPAjudaRequisiçõesRequisições com o mesmo IP, data e agente são uma visita única.Requisições/VisitasHorizontalHostnameHostsItens por páginaFrases-chaveMecanismo de pesquisa do GoogleÚltimoÚltima atualizaçãoLayoutFormato de Log - [c] para adicionar/editar formatoConfiguração do Formato de LogTamanho do LogOrigem do LogMáx. T.S.MétodoMtdPróximoNenhum formato de data encontrado no seu arquivo de configuraçãoNenhum arquivo de configuração padrão foi encontrado.Nenhum formato de log encontrado no seu arquivo de configuraçãoFormato de hora não foi encontrado no seu arquivo de configuraçãoNão EncontradoURLs Não Encontradas (404)SOSistemas OperacionaisAnálise geral das requisiçõesOpções do PainelPainéisAnalizadas %1$d linhasPor favor, informe abrindo um problema no GitHubMétrica de PlotagemAnteriorProtoProtocoloSairReferenciadoresSites ReferenciadosRegex Permitidos - ^g para cancelar - TAB mudar casoUsuário RemotoUsuário Remoto (Autenticação HTTP)Req. ArquivosRequisiçõesRequisiçõesConfiguração de EsquemaSelecione um formato de data.Selecione um formato de log.Selecione um formato de hora.Estatísticas do servidorOrdenar modulo ativo porArquivos EstáticosRequisições EstáticasCodigos de StatusColunas da TabelaTabelasAs seguintes opções também podem ser fornecidas para o comandoTemaHoraRequisições Por HoraFormato da Hora - [t] para adicionar/editar formatoNavegadores ordenados por requisições [, avgts, cumts, maxts]Codigos de Status HTTP ordenados por requisições [, avgts, cumts, maxts]Frases-chave de busca ordenadas por requisições [, avgts, cumts, maxts]Sistemas Operacionais ordenados por requisições [, avgts, cumts, maxts]Sites referenciados ordenados por requisições [, avgts, cumts, maxts]URLs não encontradas ordenadas por requisições [, avgts, cumts, maxts, mthd, proto]Requisições ordenadas por requisições [, avgts, cumts, maxts, mthd, proto]Requisições estáticas ordenadas por requisições [, avgts, cumts, maxts, mthd, proto]Hosts de visitantes ordenados por requisições [, avgts, cumts, maxts]TotalRequisiçõesTx. TotalTipoVisitantes ÚnicosVisitantes únicos por diaVisitantes únicos por diaAgentes de Usuário para %1$sReq. VálidasVerticalHosts VirtuaisVis.Endereços IPv4VisitantesServidor WebSocket pronto para aceitar novas conexões de clientesVocê pode especificar uma largura[ ] ASC [x] DESC[ ] distinguir maiúsculas[?] Ajuda [Enter] Exp. Panel[Painel Ativo: %1$s][ENTER] selecionar - [TAB] ordenar - [q]Sair[ENTER] para usar esquema - [q]Sair[SPACE] para alternar - [ENTER] para prosseguir - [q] para sair[UP/DOWN] para rolar - [q] para fechar a janela[UP/DOWN] para rolar - [q] para sair[q]Sair GoAccess[x] ASC [ ] DESC[x] distinguir maiúsculaspt-BRh%produzindo os seguintes errosv%goaccess-1.9.3/po/Makevars0000644000175000017300000000656214614317512011121 # Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. AM_CPPFLAGS = -I. -I$(srcdir) # These options get passed to xgettext. XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Free Software Foundation, Inc. # This tells whether or not to prepend "GNU " prefix to the package # name that gets inserted into the header of the $(DOMAIN).pot file. # Possible values are "yes", "no", or empty. If it is empty, try to # detect it automatically by scanning the files in $(top_srcdir) for # "GNU packagename" string. PACKAGE_GNU = # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = hello@goaccess.io # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' # context. Possible values are "yes" and "no". Set this to yes if the # package uses functions taking also a message context, like pgettext(), or # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. USE_MSGCTXT = no # These options get passed to msgmerge. # Useful options are in particular: # --previous to keep previous msgids of translated messages, # --quiet to reduce the verbosity. MSGMERGE_OPTIONS = # These options get passed to msginit. # If you want to disable line wrapping when writing PO files, add # --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and # MSGINIT_OPTIONS. MSGINIT_OPTIONS = # This tells whether or not to regenerate a PO file when $(DOMAIN).pot # has changed. Possible values are "yes" and "no". Set this to no if # the POT file is checked in the repository and the version control # program ignores timestamps. PO_DEPENDS_ON_POT = yes # This tells whether or not to forcibly update $(DOMAIN).pot and # regenerate PO files on "make dist". Possible values are "yes" and # "no". Set this to no if the POT file and PO files are maintained # externally. DIST_DEPENDS_ON_UPDATE_PO = yes goaccess-1.9.3/po/goaccess.pot0000644000175000017300000004531414626466520011745 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the goaccess package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: goaccess 1.9.3\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/labels.h:45 msgid "en" msgstr "" #: src/labels.h:48 msgid "Exp. Panel" msgstr "" #: src/labels.h:49 msgid "Help" msgstr "" #: src/labels.h:50 msgid "Quit" msgstr "" #: src/labels.h:51 msgid "Total" msgstr "" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "" #: src/labels.h:61 msgid "Dashboard" msgstr "" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "" #: src/labels.h:66 msgid "Date/Time" msgstr "" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "" #: src/labels.h:68 msgid "Failed Requests" msgstr "" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "" #: src/labels.h:70 msgid "Log Size" msgstr "" #: src/labels.h:71 msgid "Log Source" msgstr "" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "" #: src/labels.h:73 msgid "Total Requests" msgstr "" #: src/labels.h:74 msgid "Static Files" msgstr "" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "" #: src/labels.h:76 msgid "Requested Files" msgstr "" #: src/labels.h:77 msgid "Unique Visitors" msgstr "" #: src/labels.h:78 msgid "Valid Requests" msgstr "" #: src/labels.h:81 msgid "Hits" msgstr "" #: src/labels.h:82 msgid "h%" msgstr "" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "" #: src/labels.h:84 msgid "Vis." msgstr "" #: src/labels.h:85 msgid "v%" msgstr "" #: src/labels.h:87 msgid "Avg. T.S." msgstr "" #: src/labels.h:88 msgid "Cum. T.S." msgstr "" #: src/labels.h:89 msgid "Max. T.S." msgstr "" #: src/labels.h:90 msgid "Method" msgstr "" #: src/labels.h:91 msgid "Mtd" msgstr "" #: src/labels.h:92 msgid "Protocol" msgstr "" #: src/labels.h:93 msgid "Proto" msgstr "" #: src/labels.h:94 msgid "City" msgstr "" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "" #: src/labels.h:97 msgid "Hostname" msgstr "" #: src/labels.h:98 msgid "Data" msgstr "" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "" #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" #: src/labels.h:117 msgid "Requests" msgstr "" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" #: src/labels.h:127 msgid "Time Distribution" msgstr "" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:131 msgid "Time" msgstr "" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "" #: src/labels.h:145 msgid "Remote User" msgstr "" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "" #: src/labels.h:152 msgid "Cache Status" msgstr "" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:166 msgid "Hosts" msgstr "" #: src/labels.h:169 msgid "Operating Systems" msgstr "" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:173 msgid "OS" msgstr "" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:183 msgid "Referrer URLs" msgstr "" #: src/labels.h:185 msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:201 msgid "Keyphrases" msgstr "" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" #: src/labels.h:222 msgid "Status Codes" msgstr "" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "" #: src/labels.h:227 msgid "File types shipped out" msgstr "" #: src/labels.h:232 msgid "Encryption settings" msgstr "" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "" #: src/labels.h:236 msgid "TLS Settings" msgstr "" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "" #: src/labels.h:276 msgid "Sort active module by" msgstr "" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "" #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "" #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "" #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "" #: src/labels.h:300 msgid "No default config file found." msgstr "" #: src/labels.h:302 msgid "You may specify one with" msgstr "" #: src/labels.h:304 msgid "producing the following errors" msgstr "" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "" #: src/labels.h:310 msgid "Select a time format." msgstr "" #: src/labels.h:312 msgid "Select a date format." msgstr "" #: src/labels.h:314 msgid "Select a log format." msgstr "" #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "" #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "" #: src/labels.h:328 msgid "Last Updated" msgstr "" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "" #: src/labels.h:338 msgid "Server Statistics" msgstr "" #: src/labels.h:340 msgid "Theme" msgstr "" #: src/labels.h:342 msgid "Dark Gray" msgstr "" #: src/labels.h:344 msgid "Bright" msgstr "" #: src/labels.h:346 msgid "Dark Blue" msgstr "" #: src/labels.h:348 msgid "Dark Purple" msgstr "" #: src/labels.h:350 msgid "Panels" msgstr "" #: src/labels.h:352 msgid "Items per Page" msgstr "" #: src/labels.h:354 msgid "Tables" msgstr "" #: src/labels.h:356 msgid "Display Tables" msgstr "" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "" #: src/labels.h:362 msgid "Toggle Panel" msgstr "" #: src/labels.h:364 msgid "Layout" msgstr "" #: src/labels.h:366 msgid "Horizontal" msgstr "" #: src/labels.h:368 msgid "Vertical" msgstr "" #: src/labels.h:370 msgid "WideScreen" msgstr "" #: src/labels.h:372 msgid "File Options" msgstr "" #: src/labels.h:374 msgid "Export as JSON" msgstr "" #: src/labels.h:376 msgid "Panel Options" msgstr "" #: src/labels.h:378 msgid "Previous" msgstr "" #: src/labels.h:380 msgid "Next" msgstr "" #: src/labels.h:382 msgid "First" msgstr "" #: src/labels.h:384 msgid "Last" msgstr "" #: src/labels.h:386 msgid "Chart Options" msgstr "" #: src/labels.h:388 msgid "Chart" msgstr "" #: src/labels.h:390 msgid "Type" msgstr "" #: src/labels.h:392 msgid "Area Spline" msgstr "" #: src/labels.h:394 msgid "Bar" msgstr "" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "" #: src/labels.h:400 msgid "Table Columns" msgstr "" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "" #: src/labels.h:408 msgid "2xx Success" msgstr "" #: src/labels.h:410 msgid "3xx Redirection" msgstr "" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "" #: src/labels.h:457 msgid "308 - Permanent Redirect" msgstr "" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "" #: src/labels.h:495 msgid "418 - I'm a teapot" msgstr "" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 msgid "449 - Retry With: The server cannot honour the request" msgstr "" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 msgid "561 - Unauthorized: An error around authentication" msgstr "" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" goaccess-1.9.3/po/ja.po0000644000175000017300000007174214626466521010371 # Copyright © 2020 Kamino <67395018+err931@users.noreply.github.com> # Copyright © 2023 gemmaro msgid "" msgstr "" "Project-Id-Version: goaccess 1.3\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2023-07-15 17:20+0900\n" "Last-Translator: gemmaro \n" "Language-Team: Japanese\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: src/labels.h:45 msgid "en" msgstr "ja" #: src/labels.h:48 msgid "Exp. Panel" msgstr "詳細表示" #: src/labels.h:49 msgid "Help" msgstr "ヘルプ" #: src/labels.h:50 msgid "Quit" msgstr "終了" #: src/labels.h:51 msgid "Total" msgstr "合計" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] 昇順 [ ] 降順" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] 昇順 [x] 降順" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[表示中のパネル: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q] GoAccessを閉じる" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] ヘルプ [Enter] 詳細表示" #: src/labels.h:61 msgid "Dashboard" msgstr "ダッシュボード" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "ダッシュボード - 解析済みリクエスト全体" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "解析済みリクエスト全体" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "データ転送量" #: src/labels.h:66 msgid "Date/Time" msgstr "日付/時刻" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "除外対象数" #: src/labels.h:68 msgid "Failed Requests" msgstr "無効リクエスト数" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "ログの解析時間" #: src/labels.h:70 msgid "Log Size" msgstr "ログファイルサイズ" #: src/labels.h:71 msgid "Log Source" msgstr "ログ取得元" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "リファラ数" #: src/labels.h:73 msgid "Total Requests" msgstr "合計リクエスト数" #: src/labels.h:74 msgid "Static Files" msgstr "静的ファイル数" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "404エラー数" #: src/labels.h:76 msgid "Requested Files" msgstr "要求されたファイル数" #: src/labels.h:77 msgid "Unique Visitors" msgstr "ユニークユーザー数" #: src/labels.h:78 msgid "Valid Requests" msgstr "有効リクエスト数" #: src/labels.h:81 msgid "Hits" msgstr "ヒット数" #: src/labels.h:82 msgid "h%" msgstr "ヒット率(%)" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "ユーザー数" #: src/labels.h:84 msgid "Vis." msgstr "ユーザー数" #: src/labels.h:85 msgid "v%" msgstr "訪問率(%)" #: src/labels.h:87 msgid "Avg. T.S." msgstr "平均処理時間" #: src/labels.h:88 msgid "Cum. T.S." msgstr "合計処理時間" #: src/labels.h:89 msgid "Max. T.S." msgstr "最大処理時間" #: src/labels.h:90 msgid "Method" msgstr "要求" #: src/labels.h:91 msgid "Mtd" msgstr "要求" #: src/labels.h:92 msgid "Protocol" msgstr "プロトコル" #: src/labels.h:93 msgid "Proto" msgstr "プロトコル" #: src/labels.h:94 msgid "City" msgstr "地域" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "ASN" #: src/labels.h:96 msgid "Country" msgstr "国名" #: src/labels.h:97 msgid "Hostname" msgstr "ホスト名" #: src/labels.h:98 msgid "Data" msgstr "データ" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "ヒット数/ユーザー数" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "一日あたりのユニークユーザー数" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "一日あたりのユニークユーザー数(クローラも含める)" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "" "IPアドレス、日付、ユーザーエージェントが全て同一だった場合、ユニークユーザー" "として扱われます。" #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "リクエストされたファイル(URL)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "上位のリクエスト [ヒット数、平均処理時間、合計処理時間、最大処理時間、メソッ" "ド、プロトコル]" #: src/labels.h:117 msgid "Requests" msgstr "リクエスト数" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "静的ファイルリクエスト数" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "上位の静的ファイルリクエスト [ヒット数、平均処理時間、合計処理時間、最大処理" "時間、メソッド、プロトコル]" #: src/labels.h:127 msgid "Time Distribution" msgstr "時間分布" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "上位のデータ [時刻、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:131 msgid "Time" msgstr "時刻" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "バーチャルホスト" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "上位のデータ [ヒット数、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "認証されたユーザー(HTTP認証)" #: src/labels.h:145 msgid "Remote User" msgstr "認証されたユーザー" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "サーブされるオブジェクトのキャッシュ状態" #: src/labels.h:152 msgid "Cache Status" msgstr "キャッシュの状態" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "404エラーが返されたURL" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "上位のnot foundなURL [ヒット数、平均処理時間、合計処理時間、最大処理時間、メ" "ソッド、プロトコル]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "ユーザーのホスト名とIPアドレス" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" "上位のユーザーホスト [ヒット数、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:166 msgid "Hosts" msgstr "ホスト名" #: src/labels.h:169 msgid "Operating Systems" msgstr "オペレーティングシステム" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "上位のOS [ヒット数、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:173 msgid "OS" msgstr "OS" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "ブラウザ" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "上位のブラウザ [ヒット数、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:183 msgid "Referrer URLs" msgstr "リファラのURL" #: src/labels.h:185 msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" "上位の要求元のリファラ [ヒット数、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "参照元サイト" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "" "上位の参照元サイト [ヒット数、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "キーフレーズ(Google検索から)" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" "上位のキーフレーズ [ヒット数、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:201 msgid "Keyphrases" msgstr "キーフレーズ" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "位置情報" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "地理区分 > 国別 [ヒット数、平均処理時間、合計処理時間、最大処理時間]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "Autonomous System Numbers/Organizations (ASNs)" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "HTTPステータスコード" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" "上位のHTTPステータスコード [ヒット数、平均処理時間、合計処理時間、最大処理時" "間]" #: src/labels.h:222 msgid "Status Codes" msgstr "ステータスコード" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "MIMEタイプ" #: src/labels.h:227 msgid "File types shipped out" msgstr "送出されたファイル種別" #: src/labels.h:232 msgid "Encryption settings" msgstr "暗号化設定" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "TLSのバージョンと選択されたアルゴリズム" #: src/labels.h:236 msgid "TLS Settings" msgstr "TLSの設定" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] 大文字と小文字を区別する" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] 大文字と小文字を区別する" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "正規表現が有効 - [^g] キャンセル - [TAB] 切り替え" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "すべてのビューでパターン検索を行う" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "ログ形式設定" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[SPACE] 切り替え - [ENTER] 決定 - [q] 終了" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "ログ形式 - [c] 追加/編集" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "日付形式 - [d] 追加/編集" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "時刻形式 - [t] 追加/編集" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[↑/↓] スクロール - [q] ウィンドウを閉じる" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "%1$s のユーザーエージェント" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "スキーム設定" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[ENTER] スキーム選択 - [q] 終了" #: src/labels.h:276 msgid "Sort active module by" msgstr "選択したカラムで並び替え" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[ENTER] 選択 - [TAB] ソート - [q] 終了" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "GoAccessクイックヘルプ" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[↑/↓] スクロール - [q] 終了" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "ディスク上の永続化ストレージ付きのインメモリ。" #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "" "解析に失敗しました - ログ/日付/時刻のフォーマット設定を確認してください" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "設定ファイル内で日付形式がセットされていません。" #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "設定ファイル内でログ形式がセットされていません。" #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "設定ファイル内で時刻形式がセットされていません。" #: src/labels.h:300 msgid "No default config file found." msgstr "デフォルトの設定ファイルが見つかりません。" #: src/labels.h:302 msgid "You may specify one with" msgstr "いずれか指定してください" #: src/labels.h:304 msgid "producing the following errors" msgstr "エラーが発生しました" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "解析済み: %1$d 行" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "GitHub上のIssueから問題を報告してください" #: src/labels.h:310 msgid "Select a time format." msgstr "時刻形式を選択します。" #: src/labels.h:312 msgid "Select a date format." msgstr "日付形式を選択します。" #: src/labels.h:314 msgid "Select a log format." msgstr "ログ形式を選択します。" #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "'%1$s' パネルは無効化されています" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "入力データが与えられておらず、復元データもありません。" #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "ログインスタンスのためのメモリを割り当てられません。" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "与えられたログを見付けられません。" #: src/labels.h:326 msgid "For more details visit" msgstr "詳細はこちら" #: src/labels.h:328 msgid "Last Updated" msgstr "最終更新日時" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "クライアントからのWebSocket接続を待っています" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "次のオプションはコマンドで指定することもできます" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "実行例" #: src/labels.h:338 msgid "Server Statistics" msgstr "サーバー統計" #: src/labels.h:340 msgid "Theme" msgstr "テーマ" #: src/labels.h:342 msgid "Dark Gray" msgstr "ダークグレー" #: src/labels.h:344 msgid "Bright" msgstr "ライト" #: src/labels.h:346 msgid "Dark Blue" msgstr "ダークブルー" #: src/labels.h:348 msgid "Dark Purple" msgstr "ダークパープル" #: src/labels.h:350 msgid "Panels" msgstr "パネル" #: src/labels.h:352 msgid "Items per Page" msgstr "ページあたりの表示数" #: src/labels.h:354 msgid "Tables" msgstr "テーブル" #: src/labels.h:356 msgid "Display Tables" msgstr "テーブル表示" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "自動非表示設定(小型端末用)" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "画面が小さい場合に自動でテーブルを非表示にする" #: src/labels.h:362 msgid "Toggle Panel" msgstr "パネルを切り替える" #: src/labels.h:364 msgid "Layout" msgstr "レイアウト" #: src/labels.h:366 msgid "Horizontal" msgstr "水平" #: src/labels.h:368 msgid "Vertical" msgstr "垂直" #: src/labels.h:370 msgid "WideScreen" msgstr "ワイドスクリーン" #: src/labels.h:372 msgid "File Options" msgstr "ファイルオプション" #: src/labels.h:374 msgid "Export as JSON" msgstr "JSON形式でエクスポート" #: src/labels.h:376 msgid "Panel Options" msgstr "パネルオプション" #: src/labels.h:378 msgid "Previous" msgstr "前へ" #: src/labels.h:380 msgid "Next" msgstr "次へ" #: src/labels.h:382 msgid "First" msgstr "最初へ" #: src/labels.h:384 msgid "Last" msgstr "最後へ" #: src/labels.h:386 msgid "Chart Options" msgstr "グラフ設定" #: src/labels.h:388 msgid "Chart" msgstr "グラフ" #: src/labels.h:390 msgid "Type" msgstr "タイプ" #: src/labels.h:392 msgid "Area Spline" msgstr "平滑面グラフ" #: src/labels.h:394 msgid "Bar" msgstr "棒グラフ" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "表示するデータ" #: src/labels.h:400 msgid "Table Columns" msgstr "テーブルカラム" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx 情報" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx 成功" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx リダイレクション" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx クライアントエラー" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx サーバーエラー" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "100 - 継続: リクエストヘッダーを受理しました" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "" "101 - プロトコル変更: HTTPヘッダーでリクエストされたプロトコルに切り替えます" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - 成功: リクエストに成功しました" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - 作成: リクエストが成功して新たなリソースの作成が完了しました" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - 受理: リクエストを受け取ったが処理されていません" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "" "203 - 認証されていない情報: リクエストを正常に処理しましたが、返される情報は" "別の送信元から来る可能性があります" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "" "204 - コンテンツ無し: リクエストを正常に処理しましたが、返すべき情報がありま" "せん" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "" "205 - リセット要求: クライアントに対してドキュメントビューのリセットを行うよ" "う要求しました" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - 部分応答: コンテンツの一部のみレスポンスを返しました" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - 複数ステータス: (WebDAV拡張) RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - 報告済み: (WebDAV拡張) RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - 選択が必要: リダイレクト先が複数指定されています" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - 恒久的な移動: リクエストされたリソースは完全に移動されました" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - 一時的な移動: リクエストされたリソースは一時的に移動されました" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "" "303 - 別コンテンツ: リクエストされたリソースは別のURLで提供されています" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - 更新無し: リクエストされたリソースは更新されていません" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "" "305 - プロキシ使用: リクエストされたリソースはプロキシを使用して取得できます" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - 一時的な移動: リクエストされたリソースは一時的に移動されました" #: src/labels.h:457 msgid "308 - Permanent Redirect" msgstr "308 - 恒久的なリダイレクト" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - 不正なリクエスト: リクエストを処理できません" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - 認証が必要: このリクエストを処理するには認証が必要です" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - 課金が必要なコンテンツ" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - アクセス禁止: このリクエストへのアクセスは禁止されています" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - リソース不明: リクエストされたリソースは存在しません" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "" "405 - 許可されていない: リクエストされたメソッドでのアクセスは禁止されていま" "す" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - リクエストを受理できません" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - プロキシ認証が必要です" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "408 - タイムアウト: リクエストがタイムアウトしました" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - 衝突: リクエストが衝突しました" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - 消滅: リクエストされたリソースは完全に削除されました" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - Content-Lengthヘッダーが必要です" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "412 - サーバーに与えられた前提条件を満たしていません" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - ペイロードが長すぎます" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - リクエストされたURIが長すぎます" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - サポートされていないメディアタイプ" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "" "416 - リクエストされたContent-Lengthヘッダーの範囲がリソースより超過していま" "す" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - 拡張ステータスコードが使えません" #: src/labels.h:495 msgid "418 - I'm a teapot" msgstr "418 - 私はティーポットです" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - 不明なリクエスト" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - (WebDAV拡張) 処理できないエンティティ" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - このリソースはロックされています" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - (WebDAV拡張) 依存関係でエラーが発生しました" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "" "426 - アップグレードが必要: プロトコルが古すぎてリクエストを処理できません" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "428 - リクエストを条件付きにする必要があります" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 - 過重リクエスト: 制限されたリクエスト数を超えたので処理できません" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 - HTTPヘッダーが長すぎます" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "408 - タイムアウト: リクエストがタイムアウトしました" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - 法的理由により利用不可" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (nginx) 接続を遮断しました" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (nginx) HTTPヘッダーが長すぎます" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (nginx) SSLクライアント証明書エラー" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (nginx) クライアントが証明書を提供しませんでした" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (nginx) HTTPリクエストをHTTPSポートに送信しました" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "" "499 - (nginx) リクエストを処理中にクライアントによって接続を閉じられました" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - 内部サーバーエラー" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - 実装されていません" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "" "502 - 不正なゲートウェイ: 上位サーバーから不正なレスポンスを受信しました" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - サービス利用不可: サーバーがダウンしました" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "504 - ゲートウェイタイムアウト: 上位サーバーがリクエストを返しません" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - HTTPバージョンがサポートされていません" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - Webサーバーが未知のエラーを返しています" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - Webサーバーがダウンしています" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - 接続がタイムアウトしました" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - Originに到達できません" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - タイムアウトが発生しました" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - 認証が必要: このリクエストを処理するには認証が必要です" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" goaccess-1.9.3/po/uk.gmo0000644000175000017300000005454614626466521010565 3 ?;N7`9<@4PB:$(( Q9]7"<2/7b475M4d66#?@'5-= Jb9}A9,3fD<%X;~#&*/0-`BA>WA ;%5'[(% 1  =GKR [h n|A     %% +* +V $   !!! -!:!Q!k!q!0! !!!!!;! 2" @"K"T"Z" i"&t"" ""#"""# # # !#+#2#6#+;#g#7#*#+# $$4$7$I$ c$q$x$.$ $$$$$ $$.$ +%!7%Y%i%%%%%%%% && $& 1& >& _&m&%t&9&&&&$& '3#'<W'5'<':(FB(@(G(8)K)Q) `)k)p))+)))) ))**7'* _*j*****$**4+)Q+!{+++++++++(-Z-d/..E.i.Aa/c/R0aZ0Z0$1(<1e1Zx1a1?52Wu2:2B3PK3"3C3J4N4Re4H4Q5S5#h5H515O66W6Y667O7ak777983:8n8[88c9%j9;9#9&9*:/B:-r:B:!:;!;r7;>;n; X<;y<%<'<(=%,=!R=!t=K=}=`>p> >>>>)> >> ??????:@B@iK@m@D#AhA#xA-A>A B$B;BRBrB.B4B B,Ba(C/C+C"C DD#DDDD E(E?EEYEE!EEDE0.F _FFF FF FFFjFW\G`GjHkHH$I'I#,I)PI%zI I$IYI,JHJ [JeJ vJJ'J\J)#KMMKK$K K#K%L%7L%]L#L4LLLM8M7UMMMFMjNlNuN |NDN#N|OOPP$QQhRSS ITVTrTT-T7T\T!QUsUUU U8U VT$VyV?VV)V3W#LW<pWBWLWH=X9XXX)XY"Y;&YbYcv9sGF1%ow-`[IKZd7xXf"\Wt#PkA ;6S0eN{|@,JB8l$Y(R~UT4zq Oi&}r^ 'gp3 uE5): yMb=n]/H!h< aL?CQD+j>_V*2m.'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAvg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDark PurpleDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesEncryption settingsExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFile types shipped outFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsItems per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog Parsing TimeLog SizeLog SourceMIME TypesMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No input data was provided nor there's data to restore.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTLS SettingsTLS version and picked algorithmTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatToggle PanelTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: goaccess 1.5.6 Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2022-04-21 10:17+0300 Last-Translator: Artyom Karlov Language-Team: Language: uk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 2.3.1 Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2); Панель '%1$s' відключена100 - Continue: Сервер отримав початкову частину запиту101 - Switching Protocols: Клієнт запросив переключення протоколу1xx Інформаційні200 - OK: Запит клієнта виконаний успішно201 - Created: Запит клієнта виконаний і створений новий ресурс202 - Accepted: Запит прийнятий на обробку203 - Non-authoritative Information: Відповідь не з первинного джерела204 - No Content: Запит не повернув ніякого контенту205 - Reset Content: Сервер попросив клієнта скинути документ206 - Partial Content: Частковий GET-запит виконаний успішно207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Успішні300 - Multiple Choices: Ресурс має кілька варіантів надання301 - Moved Permanently: Ресурс переміщений на постійній основі302 - Moved Temporarily (тимчасовий редирект)303 - See Other Document: Відповідь знаходиться за іншим URI304 - Not Modified: Ресурс не змінювався305 - Use Proxy: Доступ тільки через проксі307 - Temporary Redirect: Ресурс тимчасово переміщений3xx Перенаправлення400 - Bad Request: Невірний синтаксис запиту401 - Unauthorized: Запит вимагає аутентифікації402 - Payment Required403 - Forbidden: Сервер відмовився надати відповідь404 - Not Found: Запитаний ресурс не знайдений405 - Method Not Allowed: Метод запиту не підтримується406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Сервер не дочекався запиту409 - Conflict: Конфліктний запит410 - Gone: Запитаний ресурс більше недоступний411 - Length Required: Невірний Content-Length412 - Precondition Failed: Сервер не виконав попередні умови413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Тип медіа не підтримується416 - Requested Range Not Satisfiable: Частина не може бути доставлена417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Клієнт повинен переключити протокол428 - Precondition Required429 - Too Many Requests: Клієнт відправив занадто багато запитів431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Помилки клієнта500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Сервер, який діє як шлюз, отримав недійсну відповідь503 - Service Unavailable: Сервер недоступний504 - Gateway Timeout: Сервер, який діє як шлюз, не дочекався відповіді505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Помилки сервераЗгладжені областіАвтоприховування на маленьких пристрояхАвтоматично приховувати таблиці на пристроях з маленькими екранамиСер. ч. о.СтовпціСвітлаБраузериСтатус кешаДиаграмаНалаштування діаграмиМістоКонтиненти > країни, відсортовані за унікальними хітами [, сер., заг., макс. часом обсл.]КраїнаЗаг. ч. о.Темно-синяТемно-сіраТемно-фіолетоваДашбордДашборд - Проаналізовані запитиДаніДані, відсортовані за хітами [, сер., заг., макс. часом обсл.]Дані, відсортовані за годинами [, сер., заг., макс. часом обсл.]Формат дати - [d] додати/змінити форматДата/часПоказувати таблиціНалаштування шифруванняПриклади можна знайти, запустившиХітів з викл. IPРозг. панельЕкспорт в JSONНевдалих запитівФайлові опціїТипи відправлених файлівПошук шаблону в усіх панеляхПершаПодробиці за посиланнямПомилки формату - Перевірте ваш формат лога/дати/часуГеографічне розташуванняШвидка допомога по GoAccessКоди відповідей HTTPДопомогаХітиХіти, що мають однакові IP, дату та юзер-агента, вважаються унікальним відвідуванням.Хіти/відвідувачіГоризонтальнеІм'я хостаХостиЕлементів на сторінціКлючові словаКлючові слова з пошукової системи GoogleОстанняОстаннє оновленняРозташуванняФормат логу - [c] додати/змінити форматНалаштування формату логаЧас парсингу логаРозмір логаДжерело логаMIME-типиМакс. ч. о.МетодМтдНаступнаФормат дати у вашому конфігураційному файлі не знайдений.Стандартний конфігураційний файл не знайдений.Не надано ні вхідних даних, ні даних для відновлення.Формат лога у вашому конфігураційному файлі не знайдений.Формат часу у вашому конфігураційному файлі не знайдений.Не знайденоНезнайдені URL'и (404-і)ОСОпераційні системиПроаналізовані запитиНалаштування панеліПанеліОброблено %1$d рядківБудь ласка, повідомте про це, відкривши issue на GitHubОдиниці виміруПопередняПрот.ПротоколВихідПосил. сторінокСайти, що посилаютьсяДозволені рег. вирази - ^g відміна - TAB врах. регіструВіддалений користувачВіддалений користувач (HTTP-аутентифікація)Запитаних файлівЗапитані файли (URL'и)ЗапитиНалаштування схемиОберіть формат дати.Оберіть формат лога.Оберіть формат часу.Статистика сервераСортування активного модуляСтатичних файлівСтатичні запитиКоди відповідейНалаштування TLSВерсія TLS та вибраний алгоритмКолонки таблиціТаблиціСтатус кеша об'єкта, що обслуговуєтьсяНаступні опції також можуть використовуватися з командоюТемаЧасРозподіл за часомФормат часу - [t] додати/змінити форматПеремикання панеліТоп браузерів, відсортованих за хітами [, сер., заг., макс. часом обсл.]Топ кодів відповідей HTTP, відсортованих за хітами [, сер., заг., макс. часом обсл.]Том ключових слів, відсортованих за хітами [, сер., заг., макс. часом обсл.]Топ операційних систем, відсортованих за хітами [, сер., заг., макс. часом обсл.]Топ сайтів, що посилаються, відсортованих за хітами [, сер., заг., макс. часом обсл.]Топ незнайдених URL'ів, відсортованих за хітами [, сер., заг., макс. часом обсл., методом, протоколом]Топ запитів, відсортованих за хітами [, сер., заг., макс. часом обсл., методом, протоколом]Том статичних запитів, відсортованих за хітами [, сер., заг., макс. часом обсл., методом, протоколом]Топ хостів відвідувачів, відсортованих за хітами [, сер., заг., макс. часом обсл.]ВсьогоВсього запитівВих. трафікТипУнікальних відвідувачівУнікальні відвідувачі по дняхУнікальні відвідувачі по днях - Включаючи павуківЮзер-агенти для %1$sВалідних запитівВертикальнеВіртуальні хостиВідв.Імена хостів та IP відвідувачівВідвідувачіWebSocket-сервер готовий до прийому нових з'єднаньШирокоекраннеВи можете задати його за допомогою[ ] ЗБІЛ [x] ЗМЕН[ ] враховувати регістр[?] Допомога [Enter] Розг. панель[Активна панель: %1$s][ENTER] обрати - [TAB] порядок - [q] вийти[ENTER] використовувати схему - [q] вийти[SPACE] переключення - [ENTER] обробити - [q] вийти[ВГОРУ/ВНИЗ] прокрутка - [q] закрити вікно[ВГОРУ/ВНИЗ] прокрутка - [q] вийти[q] Вийти з GoAccess[x] ЗБІЛ [ ] ЗМЕН[x] враховувати регістрukх%призводить до наступних помилокв%goaccess-1.9.3/po/de.gmo0000644000175000017300000004644714626466521010537 3 ?;N7`9<@4PB:$(( Q9]7"<2/7b475M4d66#?@'5-= Jb9}A9,3fD<%X;~#&*/0-`BA>WA ;%5'[(% 1.Apt{  A     % D +I +u $   ! "!-!2I3Ed33,3c3)S4F}464N4J5e5M5W5 '6H6Ng6=6-6S"7$v7F7*7= 81K8%}8,8B839VG9999K9I6:T:,:J;0M;9~;0;6; <1< 5<+B<8n<.<< << <= ==L =m=r=== =*==5=2.>;a> >>>'>>??3? L?Z?p???8? ??@ @&@L/@|@ @@@:@@@* A4A;APA9WAAA A A AAAA?B,@BBmB=B=B,C;CXC[CkCCCCAC C DD D D(D1DWDDD*DDDEE$EBE^EzEEEE E E&E FF&%F;LFFFF9FFBFL:GLGJGNH\nHPHZIIwIII IIII6JMJcJuJ~JJJJ?J JKK9K"XK{K;K-K>K>:L1yLLLLMMM$Mcw9sHG1%ox-`[LZd7yXf"\Wt#QkAu ;6h0eO|}@,KB8l$Y(SUT4{q Pi&~r^ 'gp3 vE5)F: zNb=n]/IJ!< aM?CRD+j>_V*2m.'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsASNArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAutonomous System Numbers/Organizations (ASNs)BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryDark BlueDark GrayDark PurpleDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesEncryption settingsExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFile types shipped outFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsIn-Memory with On-Disk Persistent Storage.Items per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog Parsing TimeLog SizeLog SourceMIME TypesMethodMtdNextNo date format was found on your conf file.No default config file found.No input data was provided nor there's data to restore.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTLS SettingsTLS version and picked algorithmTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatToggle PanelTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2019-05-05 16:03+0200 Last-Translator: Axel Wehner Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 2.2.1 Plural-Forms: nplurals=2; plural=(n != 1); Kachel „'%1$s'“ ist deaktiviert100 – weitermachen: Der Server hat den ersten Teil der Anfrage erhalten101 – Protokollwechsel: Client gebeten, die Protokolle zu wechseln1xx informativ200 – OK: Die vom Client gesendete Anfrage war erfolgreich201 –eErstellt: Die Anforderung wurde erfüllt und angelegt202 – akzeptiert: Die Anfrage wurde zur Bearbeitung angenommen203 – nicht autorisierte Informationen: Antwort eines Dritten204 – kein Inhalt: Die Anfrage hat keinen Inhalt zurückgegeben205 – Inhalt zurücksetzen: Der Server hat den Client gebeten, das Dokument zurückzusetzen206 – Teilinhalt: Der partielle GET war erfolgreich207 – Mehrfach-Status: WebDAV; RFC 4918208 - bereits gemeldet: WebDAV; RFC 58422xx Erfolg300 – Mehrfachauswahl: mehrere Optionen für die Ressource301 – dauerhaft verschoben: Ressource wurde dauerhaft verschoben302 – vorübergehend verschoben (Umleitung)303 – siehe anderes Dokument: Die Antwort ist unter einem anderen URI304 – nicht geändert: Die Ressource wurde nicht verändert305 – Proxy verwenden: Zugriff nur über den Proxy möglich307 – temporäre Umleitung: Ressource vorübergehend verschoben3xx Umleitung400 – fehlerhafte Anfrage: Die Syntax der Anfrage ist ungültig401 – nicht autorisiert: Anforderung erfordert Benutzerauthentifizierung402 – Zahlung erforderlich403 – verboten: Der Server weigert sich, darauf zu reagieren404 – nicht gefunden: Angefragte Ressource konnte nicht gefunden werden405 – Methode nicht erlaubt: Anforderungsmethode nicht unterstützt406 – nicht zulässig407 – Proxy-Authentifizierung erforderlich408 – Zeitüberschreitung der Anfrage: Zeitüberschreitung des Server beim Warten auf die Anfrage409 – Konflikt: Konflikt in der Anfrage410 – verschwunden: Angeforderte Ressource ist nicht mehr verfügbar411 – erforderliche Länge: ungültige Inhaltslänge412 – Vorbedingung fehlgeschlagen: Server erfüllt nicht die Voraussetzungen413 – Nutzdaten zu groß414 – Anfrage-URI zu lang415 – nicht unterstützter Medientyp: Der Medientyp wird nicht unterstützt416 – angeforderter Bereich nicht erfüllbar: Dieser Teil kann nicht geliefert werden417 – Erwartung fehlgeschlagen421 – fehlgesteuerte Anfrage422 – nicht verarbeitbare Entität aufgrund von semantischen Fehlern: WebDAV423 – die Ressource, auf die zugegriffen wird, ist gesperrt424 – fehlgeschlagene Abhängigkeit: WebDAV426 – Upgrade erforderlich: Der Client sollte zu einem anderen Protokoll wechseln428 – erforderliche Vorraussetzung429 – zu viele Anfragen: Der Benutzer hat zu viele Anfragen gesendet431 – Header-Felder der Anfrage zu groß444 – (Nginx) Verbindung geschlossen, ohne Header zu senden451 – aus rechtlichen Gründen nicht verfügbar494 – (Nginx) Anfrage-Kopf zu groß495 – (Nginx) SSL-Client-Zertifikatsfehler496 – (Nginx) Client hat kein Zertifikat zur Verfügung gestellt497 – (Nginx) HTTP-Anfrage an HTTPS-Port gesendet499 – (Nginx) Verbindung vom Client während der Bearbeitung der Anfrage geschlossen4xx Client-Fehler500 – interner Serverfehler501 – nicht implementiert502 – Fehlerhaftes Gateway: Eine ungültige Antwort vom Upstream erhalten503 – Dienst nicht verfügbar: Der Server ist zurzeit nicht ansprechbar504 – Gateway-Zeitüberschreitung: Der Upstream-Server konnte keine Anfrage senden505 – HTTP-Version wird nicht unterstützt520 – CloudFlare – der Webserver gibt einen unbekannten Fehler zurück521 – CloudFlare – Webserver ist ausgefallen522 – CloudFlare – Zeitüberschreitung der Verbindung523 – CloudFlare – Herkunft ist unerreichbar524 – CloudFlare – Zeitüberschreitung aufgetreten5xx ServerfehlerASNSpline-KurveAuf kleinen Geräten automatisch versteckenTabellen auf kleinen Bildschirmen automatisch versteckenAutonome Systemnummern / Organisationen (ASNs)BalkenHell (Bright)BrowserCache-StatusDiagrammDiagrammoptionenStadtKontinent > Land sortiert nach eindeutigen Zugriffen [, avgts, cumts, maxts]LandDunkelblau (Dark Blue)Dunkelgrau (Dark Gray)Dunkelviolett (Dark Purple)ÜbersichtÜbersicht – Analysierte Anfragen gesamtDatenDaten sortiert nach Zugriffen [, avgts, cumts, maxts]Daten sortiert nach Stunde [, avgts, cumts, maxts]Datumsformat – [d] zum Hinzufügen/Bearbeiten des FormatsDatum/ZeitZeige TabellenVerschlüsselungsoptionenBeispiele können gefunden werden überAusgeschl. IP-TrefferKachel öffnenAls JSON exportierenFehlgeschlagene AnfragenDateioptionenVersendete DateitypenFinde Muster in allen AnsichtenErsteFür mehr Details besucheFormatfehler – prüfen Sie das Log-/Datums-/ZeitformatGeo-StandortGoAccess' schnelle HilfeHTTP-StatuscodesHilfeZugriffeZugriffe mit derselben IP, Datum und User-Agent sind ein eindeutiger Besuch.Zugriffe/BesucherHorizontalHostnameHostsArbeitsspeicherintern mit persistentem FestplattenspeicherEinträge pro SeiteSchlüsselwörterSchlüsselwörter von Googles SuchmaschineLetzteZuletzt aktualisiertLayoutLog-Format – [c] zum Hinzufügen/Bearbeiten des FormatsLog-Format KonfigurationLoggen der Übertragungszeit Log-GrößeLog-QuelleMIME-TypenMethodeMethNächsteEs wurde kein Datumsformat in der Konfigurationsdatei gefunden.Keine Standard-Konfigurationsdatei gefunden.Keine Eingabedaten übergeben und keine wiederherzustellende DatenEs wurde kein Log-Format in der Konfigurationsdatei gefunden.Es wurde kein Zeitformat in der Konfigurationsdatei gefunden.Nicht gefundenNicht gefundene URLs (404er)OSBetriebssystemeAnalysierte Anfragen gesamtKachel-OptionenKacheln%1$d Zeilen analysiertBitte melden Sie den Vorfall und erstatten Sie Bericht auf GitHubPlot-MetrikVorherigeProtProtokollSchließenVerweiseVerweisende SeitenRegex erlaubt – ^g zum Abbrechen – TAB zum Wechseln zwischen Groß-/KleinschreibungEntfernter NutzerEntfernter Nutzer (HTTP-Authentifizierung)Angefragte DateienAngefragte Dateien (URLs)AnfragenSchema-KonfigurationWählen Sie ein Datumsformat.Wählen Sie ein Log-Format.Wählen Sie ein Zeitformat.ServerstatistikAktives Modul sortieren nachStatische DateienStatische AnfragenStatuscodesTLS-OptionenTLS-Version und gewählter AlgorithmusTabellenspaltenTabellenCache-Status des übertragenen ObjektsDem Befehl können auch folgende Optionen mitgegeben werdenDesign (Theme)ZeitZeitverteilungZeitformat – [t] zum Hinzufügen/Bearbeiten des FormatsKachel umschaltenHäufigste Browser sortiert nach Zugriffen [, avgts, cumts, maxts]Häufigste HTTP-Status-Codes sortiert nach Zugriffen [, avgts, cumts, maxts]Häufigste Schlüsselwörter sortiert nach Zugriffen [, avgts, cumts, maxts]Häufigste Betriebssysteme sortiert nach Zugriffen [, avgts, cumts, maxts]Häufigste eingehende Verweise sortiert nach Zugriffen [, avgts, cumts, maxts]Häufigste nicht gefundene URLs sortiert nach Zugriffen [, avgts, cumts, maxts, mthd, proto]Häufigste Anfragen sortiert nach Zugriffen [, avgts, cumts, maxts, mthd, proto]Häufigste statische Anfragen sortiert nach Zugriffen [, avgts, cumts, maxts, mthd, proto]Häufigste Besucher-Hosts sortiert nach Zugriffen [, avgts, cumts, maxts]GesamtAnfragen gesamtTx. MengeTypEindeutige BesucherEindeutige Besucher pro TagEindeutige Besucher pro Tag – inklusive Spiders/BotsUser-Agents für %1$sGültige AnfragenVertikalVirtuelle HostsBes.Besucher-Hostnamen und -IPsBesucherWebSocket-Server bereit, um neue Client-Verbindungen anzunehmenBreitbildSie übergeben eine mit[ ] Aufsteigend [x] Absteigend[ ] Groß- und Kleinschreibung[?] Hilfe [Eingabe] Kachel öffnen[Aktive Kachel: %1$s][EINGABE] auswählen – [TAB] sortieren – [q] schließen[EINGABE] Schema verwenden – [q] schließen[LEERTASTE] auswählen – [EINGABE] weiter – [q] schließen[HOCH/RUNTER] zum Scrollen – [q] zum Schließen des Fensters[HOCH/RUNTER] zum Scrollen – [q] zum Schließen[q] GoAccess schließen[x] Aufsteigend [ ] Absteigend[x] Groß- und Kleinschreibungdeh%führen zu folgenden Fehlernv%goaccess-1.9.3/po/it.gmo0000644000175000017300000004470114626466521010552  3 ?;"^7p9<@4`B:$(8 a9m7"<2?7r475@v4660#E?i'5-=5s9A";9U3D(<D%;#&*./Y-B (A>>A ;"%^'(% 14 fpt{  A      %( N +S + $   ! ,!7!F! V!c!z!!!0! !!""";" [" i"t"}"*"" "&"" "###,#E#V# _# j# u####+##7#*$+<$ h$r$$$$ $$$.$ %%"%(%1% 6%@%.P% %!%%%%%%&&3&E& [&h& x& & & &&%&9&('.'3'$E'3j'<'5'<(:N(F(@(G)8Y))) ))))+) * */* 8*F*K*e*7n* ***** +$+D+4c+)+!+++,,,,=,@@,!-G-H-4.;D.9.D.6.A6/Rx/8/$0()0 R07_0E0"0@16A18x1:112<2FW22:2:2E+3q3#3C3)3840Q4B44474I05z555 55L5B6=^6%6;6#6&"7*I7/t7-7B78'8C8=Y8C8T8 09;Q9%9'9(9%:*: <:H:6d: ::::::::E:2; 8; B; L; Y;e;8{;;1;-;4<N<W<f< << <<< <<=(=.=8K========> %>1>:>2?>r> >,>>>>3>?2?D? S? `? j?t?{? ?>?3?F?=D@=@ @@@@ @A)A2A/HAxA AA AAA A3A A#B'B6B KBUBkBBBBB BBCC0CPC`C)hC;CCCC3C? DL`DDDIDEo^0I"i= bM@DRE,k?`W+3n/'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved308 - Permanent Redirect3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAvg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDark PurpleDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesEncryption settingsExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFile types shipped outFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsIn-Memory with On-Disk Persistent Storage.Items per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog Parsing TimeLog SizeLog SourceMIME TypesMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No input data was provided nor there's data to restore.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTLS SettingsTLS version and picked algorithmTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: Goaccess Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2017-08-04 13:00-0300 Last-Translator: Mario Donnarumma Language-Team: Language: it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 1.5.4 il pannello '%1$s' è disattivato100 - Continue: Il server ha ricevuto la parte iniziale della richiesta101 - Switching Protocols: Il client ha richiesto di cambiare protocolli1xx Informativo200 - OK: La richiesta inviata dal client ha avuto successo201 - Created: La richiesta è stata soddisfatta e creata202 - Accepted: La richiesta è stata accettata per essere elaborata203 - Non-authoritative Information: Risposta da terzi204 - No Content: La richiesta non ha restituito nessun contenuto205 - Reset Content: Il server ha richiesto al client di ripristinare il documento206 - Partial Content: La GET parziale ha avuto successo207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Successo300 - Multiple Choices: Opzioni multiple per la risorsa301 - Moved Permanently: La risorsa è stata spostata permanentemente302 - Moved Temporarily (redirect)303 - See Other Document: La risposta si trova ad un URI diverso304 - Not Modified: La risorsa non è stata modificata305 - Use Proxy: Può essere acceduta solo tramite proxy307 - Temporary Redirect: Risorsa spostata temporaneamente308 - Permanent Redirect3xx Reindirizzamento400 - Bad Request: La sintassi della richiesta non è valida401 - Unauthorized: La richiesta richiede l'autenticazione dell'utente402 - Payment Required403 - Forbidden: Il server si sta rifiutando di rispondere404 - Not Found: La risorsa richiesta non è stata trovata405 - Method Not Allowed: Il metodo della richiesta non è supportato406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Il tempo per inviare la richiesta è scaduto409 - Conflict: Conflitto nella richiesta410 - Gone: La risorsa richiesta non è più disponibile411 - Length Required: Content-Length non valido412 - Precondition Failed: Il server non soddisfa le precondizioni413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Tipo media non supportato416 - Requested Range Not Satisfiable: Impossibile fornire quel frammento417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity423 - Locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Il cliente dovrebbe utilizzare un protocollo diverso402 - Precondition Required429 - Too Many Requests: L'utente ha inviato troppe richieste431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Errori Client500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Risposta non valida dal server di upstream503 - Service Unavailable: Il server non è attualmente disponibile504 - Gateway Timeout: Il server di upstream non è riuscito ad inviare la richiesta505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Errori ServerArea SplineNascondi su Schermi PiccoliNascondi automaticamente le tabelle su Schermi PiccoliMedia T.S.BarreChiaroBrowserStato Della CacheGraficoOpzioni GraficoCittàContinente > Paese ordinati per accessi unici [, avgts, cumts, maxts]PaeseCum. T.S.Blu ScuroGrigio ScuroViola ScuroPannello di ControlloPannello di Controllo - Richieste Complessive AnalizzateDatiDati ordinati per accessi [, avgts, cumts, maxts]Dati ordinati per ore [, avgts, cumts, maxts]Formato Data - [d] per aggiungere/modificare formatoData/OraMostra TabelleImpostazioni di crittografiaEsempi possono trovati eseguendoAccessi IP EsclusiExp. PanelEsporta come JSONRichieste FalliteOpzioni FileTipi di file speditiTrova pattern in tutte le vistePrimoPer maggiori dettagli visitaErrori Formato - Verifica il tuo formato di log/data/oraPosizione GeograficaAiuto Rapido di GoAccessCodici Di Stato HTTPAiutoAccessiAccessi con lo stesso IP, data e agent sono una visita unica.Acessi/VisitatoriOrizzontaleHostnameHostIn Memoria con Archiviazione Persistente Su Disco.Elementi per PaginaFrasi ChiaveFrasi chiave dal motore di ricerca di GoogleUltimoUltimo AggiornamentoLayoutFormato Log - [c] per aggiungere/modificare formatoConfigurazione Formato LogTempo Parsing LogDimensioni LogSorgente LogTipi MIMEMax. T.S.MetodoMtdSuccessivoNessun formato di data trovato nel tuo file di configurazione.Nessuna file di configurazione predefinito trovato.Non sono stati forniti dati in input né ci sono dati da ripristinare.Nessun formato di log trovato nel tuo file di configurazione.Nessun formato di ora trovato nel tuo file di configurazione.Non TrovatoURL Non Trovati (404)SOSistemi OperativiRichieste Complessive AnalizzateOpzioni PannelloPannelliAnalizzate %1$d righePer favore segnalalo aprendo un issue su GitHubMetriche GraficoPrecedenteProtoProtocolloEsciReferrerSiti ReferrerRegex permesse - ^g per annullare - TAB cambia caseUtente RemotoUtente Remoto (Autenticazione HTTP)File RichiestiFile Richiesti (URL)RichiesteConfigurazione SchemaSeleziona un formato di data.Seleziona un formato di log.Seleziona un formato di ora.Statistiche ServerOrdina moduli attivi perFile StaticiRichieste StaticheCodici Di StatoImpostazioni TLSVersione TLS e algoritmo sceltoColonne TabellaTabelleLo stato della cache dell'oggetto servitoLe seguenti opzioni possono anche essere fornite al comandoTemaOraDistribuzione OrariaFormato Ora - [t] per aggiungere/modificare formatoPrincipali Browser ordinati per accessi [, avgts, cumts, maxts]Principali Codici Di Stato HTTP ordinati per accessi [, avgts, cumts, maxts]Principali Frasi Chiave ordinate per accessi [, avgts, cumts, maxts]Principali Sistemi Operativi ordinati per accessi [, avgts, cumts, maxts]Principali Siti Referrer ordinati per accessi [, avgts, cumts, maxts]Principali URL non trovati ordinati per accesso [, avgts, cumts, maxts, mthd, proto]Principali richieste ordinate per accessi [, avgts, cumts, maxts, mthd, proto]Principali richieste statiche ordinate per accessi [, avgts, cumts, maxts, mthd, proto]Principali host dei visitatori ordinati per accessi [, avgts, cumts, maxts]TotaleRichieste TotaliTx. TotaleTipoVisitatori UniciVisitatori unici al giornoVisitatori unici al giorno - Inclusi spiderUser Agent per %1$sRichieste ValideVerticaleHost VirtualiVis.Hostname e IP dei VisitatoriVisitatoriServer WebSocket pronto ad accettare nuove connessioni dai clientPanoramicoPuoi specificarne uno con[ ] ASC [x] DESC[ ] case sensitive[?] Aiuto [Enter] Exp. Panel[Pannello Attivo: %1$s][INVIO] seleziona - [TAB] ordina - [q] esci[INVIO] per usare lo schema - [q] esci[SPAZIO] per alternare - [INVIO] per procedere - [q] per uscire[SU/GIU] per scorrere - [q] per chiudere la finestra[SU/GIU] per scorrere - [q] per uscire[q] chiudi GoAccess[x] ASC [ ] DESC[x] case sensitiveith%producendo i seguenti erroriv%goaccess-1.9.3/po/insert-header.sin0000644000175000017300000000124014613301666012660 # Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } goaccess-1.9.3/po/de.po0000644000175000017300000006570014626466520010363 msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2019-05-05 16:03+0200\n" "Last-Translator: Axel Wehner \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.2.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/labels.h:45 msgid "en" msgstr "de" #: src/labels.h:48 msgid "Exp. Panel" msgstr "Kachel öffnen" #: src/labels.h:49 msgid "Help" msgstr "Hilfe" #: src/labels.h:50 msgid "Quit" msgstr "Schließen" #: src/labels.h:51 msgid "Total" msgstr "Gesamt" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] Aufsteigend [ ] Absteigend" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] Aufsteigend [x] Absteigend" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[Aktive Kachel: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q] GoAccess schließen" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] Hilfe [Eingabe] Kachel öffnen" #: src/labels.h:61 msgid "Dashboard" msgstr "Übersicht" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "Übersicht – Analysierte Anfragen gesamt" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "Analysierte Anfragen gesamt" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "Tx. Menge" #: src/labels.h:66 msgid "Date/Time" msgstr "Datum/Zeit" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "Ausgeschl. IP-Treffer" #: src/labels.h:68 msgid "Failed Requests" msgstr "Fehlgeschlagene Anfragen" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "Loggen der Übertragungszeit " #: src/labels.h:70 msgid "Log Size" msgstr "Log-Größe" #: src/labels.h:71 msgid "Log Source" msgstr "Log-Quelle" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "Verweise" #: src/labels.h:73 msgid "Total Requests" msgstr "Anfragen gesamt" #: src/labels.h:74 msgid "Static Files" msgstr "Statische Dateien" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "Nicht gefunden" #: src/labels.h:76 msgid "Requested Files" msgstr "Angefragte Dateien" #: src/labels.h:77 msgid "Unique Visitors" msgstr "Eindeutige Besucher" #: src/labels.h:78 msgid "Valid Requests" msgstr "Gültige Anfragen" #: src/labels.h:81 msgid "Hits" msgstr "Zugriffe" #: src/labels.h:82 msgid "h%" msgstr "h%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "Besucher" #: src/labels.h:84 msgid "Vis." msgstr "Bes." #: src/labels.h:85 msgid "v%" msgstr "v%" # T.S. = Time Serve (The time taken to serve the request) # Vz = Verarbeitungszeit # Wer hier Rat weiß, bitte verfeinern. #: src/labels.h:87 #, fuzzy msgid "Avg. T.S." msgstr "Durchschn. Vz." #: src/labels.h:88 #, fuzzy msgid "Cum. T.S." msgstr "Kum. Vz." #: src/labels.h:89 #, fuzzy msgid "Max. T.S." msgstr "Max. Vz." #: src/labels.h:90 msgid "Method" msgstr "Methode" #: src/labels.h:91 msgid "Mtd" msgstr "Meth" #: src/labels.h:92 msgid "Protocol" msgstr "Protokoll" #: src/labels.h:93 msgid "Proto" msgstr "Prot" #: src/labels.h:94 msgid "City" msgstr "Stadt" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "ASN" #: src/labels.h:96 msgid "Country" msgstr "Land" #: src/labels.h:97 msgid "Hostname" msgstr "Hostname" #: src/labels.h:98 msgid "Data" msgstr "Daten" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "Zugriffe/Besucher" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "Eindeutige Besucher pro Tag" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "Eindeutige Besucher pro Tag – inklusive Spiders/Bots" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "" "Zugriffe mit derselben IP, Datum und User-Agent sind ein eindeutiger Besuch." #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "Angefragte Dateien (URLs)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Häufigste Anfragen sortiert nach Zugriffen [, avgts, cumts, maxts, mthd, " "proto]" #: src/labels.h:117 msgid "Requests" msgstr "Anfragen" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "Statische Anfragen" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Häufigste statische Anfragen sortiert nach Zugriffen [, avgts, cumts, maxts, " "mthd, proto]" #: src/labels.h:127 msgid "Time Distribution" msgstr "Zeitverteilung" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Daten sortiert nach Stunde [, avgts, cumts, maxts]" #: src/labels.h:131 msgid "Time" msgstr "Zeit" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "Virtuelle Hosts" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Daten sortiert nach Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "Entfernter Nutzer (HTTP-Authentifizierung)" #: src/labels.h:145 msgid "Remote User" msgstr "Entfernter Nutzer" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "Cache-Status des übertragenen Objekts" #: src/labels.h:152 msgid "Cache Status" msgstr "Cache-Status" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "Nicht gefundene URLs (404er)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Häufigste nicht gefundene URLs sortiert nach Zugriffen [, avgts, cumts, " "maxts, mthd, proto]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "Besucher-Hostnamen und -IPs" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" "Häufigste Besucher-Hosts sortiert nach Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:166 msgid "Hosts" msgstr "Hosts" #: src/labels.h:169 msgid "Operating Systems" msgstr "Betriebssysteme" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" "Häufigste Betriebssysteme sortiert nach Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:173 msgid "OS" msgstr "OS" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "Browser" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "Häufigste Browser sortiert nach Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "Verweis-URLs" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" "Häufigste ausgehende Verweise sortiert nach Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "Verweisende Seiten" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "" "Häufigste eingehende Verweise sortiert nach Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "Schlüsselwörter von Googles Suchmaschine" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" "Häufigste Schlüsselwörter sortiert nach Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:201 msgid "Keyphrases" msgstr "Schlüsselwörter" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "Geo-Standort" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "" "Kontinent > Land sortiert nach eindeutigen Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "Autonome Systemnummern / Organisationen (ASNs)" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "HTTP-Statuscodes" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" "Häufigste HTTP-Status-Codes sortiert nach Zugriffen [, avgts, cumts, maxts]" #: src/labels.h:222 msgid "Status Codes" msgstr "Statuscodes" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "MIME-Typen" #: src/labels.h:227 msgid "File types shipped out" msgstr "Versendete Dateitypen" #: src/labels.h:232 msgid "Encryption settings" msgstr "Verschlüsselungsoptionen" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "TLS-Version und gewählter Algorithmus" #: src/labels.h:236 msgid "TLS Settings" msgstr "TLS-Optionen" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] Groß- und Kleinschreibung" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] Groß- und Kleinschreibung" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "" "Regex erlaubt – ^g zum Abbrechen – TAB zum Wechseln zwischen Groß-/" "Kleinschreibung" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "Finde Muster in allen Ansichten" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "Log-Format Konfiguration" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[LEERTASTE] auswählen – [EINGABE] weiter – [q] schließen" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "Log-Format – [c] zum Hinzufügen/Bearbeiten des Formats" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "Datumsformat – [d] zum Hinzufügen/Bearbeiten des Formats" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "Zeitformat – [t] zum Hinzufügen/Bearbeiten des Formats" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[HOCH/RUNTER] zum Scrollen – [q] zum Schließen des Fensters" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "User-Agents für %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "Schema-Konfiguration" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[EINGABE] Schema verwenden – [q] schließen" #: src/labels.h:276 msgid "Sort active module by" msgstr "Aktives Modul sortieren nach" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[EINGABE] auswählen – [TAB] sortieren – [q] schließen" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "GoAccess' schnelle Hilfe" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[HOCH/RUNTER] zum Scrollen – [q] zum Schließen" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "Arbeitsspeicherintern mit persistentem Festplattenspeicher" #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "Formatfehler – prüfen Sie das Log-/Datums-/Zeitformat" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "Es wurde kein Datumsformat in der Konfigurationsdatei gefunden." #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "Es wurde kein Log-Format in der Konfigurationsdatei gefunden." #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "Es wurde kein Zeitformat in der Konfigurationsdatei gefunden." #: src/labels.h:300 msgid "No default config file found." msgstr "Keine Standard-Konfigurationsdatei gefunden." #: src/labels.h:302 msgid "You may specify one with" msgstr "Sie übergeben eine mit" #: src/labels.h:304 msgid "producing the following errors" msgstr "führen zu folgenden Fehlern" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "%1$d Zeilen analysiert" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "Bitte melden Sie den Vorfall und erstatten Sie Bericht auf GitHub" #: src/labels.h:310 msgid "Select a time format." msgstr "Wählen Sie ein Zeitformat." #: src/labels.h:312 msgid "Select a date format." msgstr "Wählen Sie ein Datumsformat." #: src/labels.h:314 msgid "Select a log format." msgstr "Wählen Sie ein Log-Format." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "Kachel „'%1$s'“ ist deaktiviert" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "Keine Eingabedaten übergeben und keine wiederherzustellende Daten" #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "Für mehr Details besuche" #: src/labels.h:328 msgid "Last Updated" msgstr "Zuletzt aktualisiert" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "WebSocket-Server bereit, um neue Client-Verbindungen anzunehmen" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "Dem Befehl können auch folgende Optionen mitgegeben werden" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "Beispiele können gefunden werden über" #: src/labels.h:338 msgid "Server Statistics" msgstr "Serverstatistik" #: src/labels.h:340 msgid "Theme" msgstr "Design (Theme)" #: src/labels.h:342 msgid "Dark Gray" msgstr "Dunkelgrau (Dark Gray)" #: src/labels.h:344 msgid "Bright" msgstr "Hell (Bright)" #: src/labels.h:346 msgid "Dark Blue" msgstr "Dunkelblau (Dark Blue)" #: src/labels.h:348 msgid "Dark Purple" msgstr "Dunkelviolett (Dark Purple)" #: src/labels.h:350 msgid "Panels" msgstr "Kacheln" #: src/labels.h:352 msgid "Items per Page" msgstr "Einträge pro Seite" #: src/labels.h:354 msgid "Tables" msgstr "Tabellen" #: src/labels.h:356 msgid "Display Tables" msgstr "Zeige Tabellen" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "Auf kleinen Geräten automatisch verstecken" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "Tabellen auf kleinen Bildschirmen automatisch verstecken" #: src/labels.h:362 msgid "Toggle Panel" msgstr "Kachel umschalten" #: src/labels.h:364 msgid "Layout" msgstr "Layout" #: src/labels.h:366 msgid "Horizontal" msgstr "Horizontal" #: src/labels.h:368 msgid "Vertical" msgstr "Vertikal" #: src/labels.h:370 msgid "WideScreen" msgstr "Breitbild" #: src/labels.h:372 msgid "File Options" msgstr "Dateioptionen" #: src/labels.h:374 msgid "Export as JSON" msgstr "Als JSON exportieren" #: src/labels.h:376 msgid "Panel Options" msgstr "Kachel-Optionen" #: src/labels.h:378 msgid "Previous" msgstr "Vorherige" #: src/labels.h:380 msgid "Next" msgstr "Nächste" #: src/labels.h:382 msgid "First" msgstr "Erste" #: src/labels.h:384 msgid "Last" msgstr "Letzte" #: src/labels.h:386 msgid "Chart Options" msgstr "Diagrammoptionen" #: src/labels.h:388 msgid "Chart" msgstr "Diagramm" #: src/labels.h:390 msgid "Type" msgstr "Typ" #: src/labels.h:392 msgid "Area Spline" msgstr "Spline-Kurve" #: src/labels.h:394 msgid "Bar" msgstr "Balken" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "Plot-Metrik" #: src/labels.h:400 msgid "Table Columns" msgstr "Tabellenspalten" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx informativ" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx Erfolg" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Umleitung" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx Client-Fehler" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx Serverfehler" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "" "100 – weitermachen: Der Server hat den ersten Teil der Anfrage erhalten" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "101 – Protokollwechsel: Client gebeten, die Protokolle zu wechseln" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 – OK: Die vom Client gesendete Anfrage war erfolgreich" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 –eErstellt: Die Anforderung wurde erfüllt und angelegt" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 – akzeptiert: Die Anfrage wurde zur Bearbeitung angenommen" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 – nicht autorisierte Informationen: Antwort eines Dritten" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 – kein Inhalt: Die Anfrage hat keinen Inhalt zurückgegeben" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "" "205 – Inhalt zurücksetzen: Der Server hat den Client gebeten, das Dokument " "zurückzusetzen" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 – Teilinhalt: Der partielle GET war erfolgreich" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 – Mehrfach-Status: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - bereits gemeldet: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 – Mehrfachauswahl: mehrere Optionen für die Ressource" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 – dauerhaft verschoben: Ressource wurde dauerhaft verschoben" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 – vorübergehend verschoben (Umleitung)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 – siehe anderes Dokument: Die Antwort ist unter einem anderen URI" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 – nicht geändert: Die Ressource wurde nicht verändert" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 – Proxy verwenden: Zugriff nur über den Proxy möglich" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 – temporäre Umleitung: Ressource vorübergehend verschoben" #: src/labels.h:457 #, fuzzy msgid "308 - Permanent Redirect" msgstr "402 – dauerhafte Umleitung" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 – fehlerhafte Anfrage: Die Syntax der Anfrage ist ungültig" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "" "401 – nicht autorisiert: Anforderung erfordert Benutzerauthentifizierung" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 – Zahlung erforderlich" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 – verboten: Der Server weigert sich, darauf zu reagieren" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "" "404 – nicht gefunden: Angefragte Ressource konnte nicht gefunden werden" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 – Methode nicht erlaubt: Anforderungsmethode nicht unterstützt" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 – nicht zulässig" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 – Proxy-Authentifizierung erforderlich" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "" "408 – Zeitüberschreitung der Anfrage: Zeitüberschreitung des Server beim " "Warten auf die Anfrage" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 – Konflikt: Konflikt in der Anfrage" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 – verschwunden: Angeforderte Ressource ist nicht mehr verfügbar" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 – erforderliche Länge: ungültige Inhaltslänge" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "" "412 – Vorbedingung fehlgeschlagen: Server erfüllt nicht die Voraussetzungen" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 – Nutzdaten zu groß" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 – Anfrage-URI zu lang" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "" "415 – nicht unterstützter Medientyp: Der Medientyp wird nicht unterstützt" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "" "416 – angeforderter Bereich nicht erfüllbar: Dieser Teil kann nicht " "geliefert werden" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 – Erwartung fehlgeschlagen" #: src/labels.h:495 #, fuzzy msgid "418 - I'm a teapot" msgstr "418 – Ich bin ein Teekännchen" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 – fehlgesteuerte Anfrage" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "" "422 – nicht verarbeitbare Entität aufgrund von semantischen Fehlern: WebDAV" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 – die Ressource, auf die zugegriffen wird, ist gesperrt" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 – fehlgeschlagene Abhängigkeit: WebDAV" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "" "426 – Upgrade erforderlich: Der Client sollte zu einem anderen Protokoll " "wechseln" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "428 – erforderliche Vorraussetzung" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 – zu viele Anfragen: Der Benutzer hat zu viele Anfragen gesendet" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 – Header-Felder der Anfrage zu groß" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "" "408 – Zeitüberschreitung der Anfrage: Zeitüberschreitung des Server beim " "Warten auf die Anfrage" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 – aus rechtlichen Gründen nicht verfügbar" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 – (Nginx) Verbindung geschlossen, ohne Header zu senden" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 – (Nginx) Anfrage-Kopf zu groß" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 – (Nginx) SSL-Client-Zertifikatsfehler" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 – (Nginx) Client hat kein Zertifikat zur Verfügung gestellt" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 – (Nginx) HTTP-Anfrage an HTTPS-Port gesendet" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "" "499 – (Nginx) Verbindung vom Client während der Bearbeitung der Anfrage " "geschlossen" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 – interner Serverfehler" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 – nicht implementiert" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "" "502 – Fehlerhaftes Gateway: Eine ungültige Antwort vom Upstream erhalten" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 – Dienst nicht verfügbar: Der Server ist zurzeit nicht ansprechbar" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "" "504 – Gateway-Zeitüberschreitung: Der Upstream-Server konnte keine Anfrage " "senden" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 – HTTP-Version wird nicht unterstützt" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 – CloudFlare – der Webserver gibt einen unbekannten Fehler zurück" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 – CloudFlare – Webserver ist ausgefallen" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 – CloudFlare – Zeitüberschreitung der Verbindung" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 – CloudFlare – Herkunft ist unerreichbar" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 – CloudFlare – Zeitüberschreitung aufgetreten" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "" "401 – nicht autorisiert: Anforderung erfordert Benutzerauthentifizierung" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "Verweise" goaccess-1.9.3/po/Rules-quot0000644000175000017300000000414214613301665011421 # This file, Rules-quot, can be copied and used freely without restrictions. # Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \ { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ ;; \ *) \ $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ ;; \ esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ ; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header goaccess-1.9.3/po/sv.po0000644000175000017300000006411514626466521010423 msgid "" msgstr "" "Project-Id-Version: goaccess 1.6\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2018-12-13 22:48-0600\n" "Last-Translator: Anders Johansson \n" "Language-Team: none\n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/labels.h:45 msgid "en" msgstr "sv" #: src/labels.h:48 msgid "Exp. Panel" msgstr "Exp. Panel" #: src/labels.h:49 msgid "Help" msgstr "Hjälp" #: src/labels.h:50 msgid "Quit" msgstr "Avsluta" #: src/labels.h:51 msgid "Total" msgstr "Totalt" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] STIGANDE [ ] FALLANDE" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] STIGANDE [x] FALLANDE" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[Aktiv panel: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q]Avsluta GoAccess" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] Hjälp [Enter] Exp. Panel" #: src/labels.h:61 msgid "Dashboard" msgstr "Dashboard" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "Dashboard - generellt analyserade förfrågningar" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "Generellt Analyserade förfrågningar" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "Skickad mängd" #: src/labels.h:66 msgid "Date/Time" msgstr "Datum/Tid" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "Exkl. IP-träffar" #: src/labels.h:68 msgid "Failed Requests" msgstr "Misslyckade förfrågningar" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "Analystid av loggar" #: src/labels.h:70 msgid "Log Size" msgstr "Loggstorlek" #: src/labels.h:71 msgid "Log Source" msgstr "Loggkälla" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "Hänvisningar" #: src/labels.h:73 msgid "Total Requests" msgstr "Total antal förfrågningar" #: src/labels.h:74 msgid "Static Files" msgstr "Statiska filer" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "Hittades inte" #: src/labels.h:76 msgid "Requested Files" msgstr "Begärda filer" #: src/labels.h:77 msgid "Unique Visitors" msgstr "Unika besökare" #: src/labels.h:78 msgid "Valid Requests" msgstr "Gilltiga förfrågningar" #: src/labels.h:81 msgid "Hits" msgstr "Träffar" #: src/labels.h:82 msgid "h%" msgstr "h%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "Besökare" #: src/labels.h:84 msgid "Vis." msgstr "Besök." #: src/labels.h:85 msgid "v%" msgstr "v%" #: src/labels.h:87 msgid "Avg. T.S." msgstr "Genomsn. tid" #: src/labels.h:88 msgid "Cum. T.S." msgstr "Kum. tid" #: src/labels.h:89 msgid "Max. T.S." msgstr "Max. tid" #: src/labels.h:90 msgid "Method" msgstr "Metod" #: src/labels.h:91 msgid "Mtd" msgstr "Mån till datum" #: src/labels.h:92 msgid "Protocol" msgstr "Protokoll" #: src/labels.h:93 msgid "Proto" msgstr "Proto" #: src/labels.h:94 msgid "City" msgstr "Stad" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "ASN" #: src/labels.h:96 msgid "Country" msgstr "Land" #: src/labels.h:97 msgid "Hostname" msgstr "Värdnamn" #: src/labels.h:98 msgid "Data" msgstr "Data" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "Träffar/Besökare" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "Unika besökare per dag" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "Unika besökare per dag - inkl. nätspindlar" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "Träffar med samma IP, datum och agent är unika besökare" #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "Begärda filer (URLer)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Flest förfrågingar sorterade i träffar [, genomst. tid, kum. tid, max. tid, " "mån-till-dag, proto]" #: src/labels.h:117 msgid "Requests" msgstr "Uppslagningar" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "Statiska förfrågningar" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Toppförfrågningar sorterade i trufar [, genomst. tid, kum. tid, max. tid, " "mån-till-dag, proto]" #: src/labels.h:127 msgid "Time Distribution" msgstr "Tidsfördelning" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Data sorterade i timmar [, genomst. tid, kum. tid, max. tid]" #: src/labels.h:131 msgid "Time" msgstr "Tid" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "Virtuella värdar" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Data sorterat i träffar [, genomst. tid, kum. tid, max. tid]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "Fjärranvändare (HTTP-autentisering)" #: src/labels.h:145 msgid "Remote User" msgstr "Fjärranvändare" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "Cachestatus för det visade objektet" #: src/labels.h:152 msgid "Cache Status" msgstr "Cachestatus" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "Hittar inte URL:en (404)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Flest ej hittade URL:er sorterade i träffar [, genomst. tid, kum. tid, max. " "tid, mån-till-dag, proto]proto]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "Besökares Värdnamn och IP:s" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" "Flest besökares värdnamn sorterade i träffar [, genomst. tid, kum. tid, max. " "tid]" #: src/labels.h:166 msgid "Hosts" msgstr "Värdar" #: src/labels.h:169 msgid "Operating Systems" msgstr "Operativsystem" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" "Flest operativsystem sorterade i träffar [, genomst. tid, kum. tid, max. tid]" #: src/labels.h:173 msgid "OS" msgstr "OS" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "Webbläsare" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "" "Vanligast webbläsare sorterade i träffar [, genomst. tid, kum. tid, max. tid]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "Hänvisande URL:er" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" "Flest Hänvisningsförfrågningar sorterade i träffar [, genomst. tid, kum. " "tid, max. tid]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "Hänvisade sidor" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "" "Flest hänvisade sidor sorterade i träffar [, genomst. tid, kum. tid, max. " "tid]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "Nyckelord från Googles sökmotor" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" "Flest nyckelord sorterade i träffar [, genomst. tid, kum. tid, max. tid]" #: src/labels.h:201 msgid "Keyphrases" msgstr "Nyckelord" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "Geografisk plats" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "" "Kontinent > Land sorterad i unika träffar [, genomst. tid, kum. tid, max. " "tid]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "Autonoma systemnummer/organisationer (ASN)" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "HTTP Statuskod" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" "Flest HTTP Statuskod sorterade i träffar [, genomst. tid, kum. tid, max. tid]" #: src/labels.h:222 msgid "Status Codes" msgstr "Statuskoder" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "MIME-typer" #: src/labels.h:227 msgid "File types shipped out" msgstr "Filtyper skickas ut" #: src/labels.h:232 msgid "Encryption settings" msgstr "Krypteringsinställningar" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "TLS-version och plockad algoritm" #: src/labels.h:236 msgid "TLS Settings" msgstr "TLS-inställningar" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] skiftlägeskänsliga" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] skiftlägeskänsliga" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "Regex tillåtet - ^ g för att avbryta - TAB-växla" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "Hitta mönster i alla vyer" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "Loggformat konfiguration" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "" "[SPACE] för att växla - [ENTER] för att fortsätta - [q] för att avsluta" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "Logformat - [c] för att lägga till / redigera format" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "Datumformat - [d] för att lägga till / redigera format" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "Tidsformat - [t] för att lägga till / redigera format" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[UPP / NER] för att bläddra - [q] för att stänga fönstret" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "Användaragenter %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "Schemakonfiguration" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[ENTER] för att använda schema - [q]avsluta" #: src/labels.h:276 msgid "Sort active module by" msgstr "Sortera aktiv modul med" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[ENTER] välj - [TAB] sortera - [q] avsluta" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "GoAccess snabbhjälp" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[UP / DOWN] för att bläddra - [q] för att avsluta" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "In-Memory med On-Disk persistent lagring." #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "Fel format - Kontrollera din logg /datum/tidformat" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "Inget datumformat hittades på din konfigurationsfil." #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "Inget loggformat hittades på din konfigurationsfil." #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "Inget tidsformat hittades i din konfigurationfil." #: src/labels.h:300 msgid "No default config file found." msgstr "Ingen standard konfiguationsfil hittades." #: src/labels.h:302 msgid "You may specify one with" msgstr "Du kan ange en med" #: src/labels.h:304 msgid "producing the following errors" msgstr "producerar följande fel" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "Analyserade %1$d linjer" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "Var god rapportera det genom att öppna ett problem på GitHub" #: src/labels.h:310 msgid "Select a time format." msgstr "Välj ett tidsformat." #: src/labels.h:312 msgid "Select a date format." msgstr "Välj ett datumformat." #: src/labels.h:314 msgid "Select a log format." msgstr "Välj ett loggformat." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "’%1$s’ panelen är inaktiverad" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "Ingen ingångsdata tillhandahölls eller det finns data att återställa." #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "För mer information besök" #: src/labels.h:328 msgid "Last Updated" msgstr "Senast uppdaterad" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "WebSocket-server redo att acceptera nya klientanslutningar" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "Följande alternativ kan också levereras till kommandot" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "Exempel kan hittas genom att köra" #: src/labels.h:338 msgid "Server Statistics" msgstr "Serverstatistik" #: src/labels.h:340 msgid "Theme" msgstr "Tema" #: src/labels.h:342 msgid "Dark Gray" msgstr "Mörkgrå" #: src/labels.h:344 msgid "Bright" msgstr "Ljus" #: src/labels.h:346 msgid "Dark Blue" msgstr "Mörkblå" #: src/labels.h:348 msgid "Dark Purple" msgstr "Mörklila" #: src/labels.h:350 msgid "Panels" msgstr "Paneler" #: src/labels.h:352 msgid "Items per Page" msgstr "Objekt per sida" #: src/labels.h:354 msgid "Tables" msgstr "Tabeller" #: src/labels.h:356 msgid "Display Tables" msgstr "Skärmtabeller" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "Automatisk dölj på små enheter" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "Dölj automatiskt tabeller på små skärm enheter" #: src/labels.h:362 msgid "Toggle Panel" msgstr "Växla panel" #: src/labels.h:364 msgid "Layout" msgstr "Layout" #: src/labels.h:366 msgid "Horizontal" msgstr "Horisontell" #: src/labels.h:368 msgid "Vertical" msgstr "Vertikal" #: src/labels.h:370 msgid "WideScreen" msgstr "WideScreen" #: src/labels.h:372 msgid "File Options" msgstr "Filalternativ" #: src/labels.h:374 msgid "Export as JSON" msgstr "Exportera som JSON" #: src/labels.h:376 msgid "Panel Options" msgstr "Panelalternativ" #: src/labels.h:378 msgid "Previous" msgstr "Föregående" #: src/labels.h:380 msgid "Next" msgstr "Nästa" #: src/labels.h:382 msgid "First" msgstr "Första" #: src/labels.h:384 msgid "Last" msgstr "Sista" #: src/labels.h:386 msgid "Chart Options" msgstr "Diagramalternativ" #: src/labels.h:388 msgid "Chart" msgstr "Diagram" #: src/labels.h:390 msgid "Type" msgstr "Typ" #: src/labels.h:392 msgid "Area Spline" msgstr "Kurva" #: src/labels.h:394 msgid "Bar" msgstr "Stapel" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "Plotmetrisk" #: src/labels.h:400 msgid "Table Columns" msgstr "Tabellkolumn" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx Informativ" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx Success" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Omdirigering" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx Klientel" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx Serverfel" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "100 - Fortsätt: Servern mottog den första delen av begäran" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "101 - Växlingsprotokoll: Klienten bad om att byta protokoll" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - OK: Förfrågan som skickades av klienten lyckades" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - Skapad: Förfrågan har uppfyllts och skapats" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - Godkänd: Förfrågan har godkänts för behandling" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - Ej auktoritativ information: Svar från en tredje part" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - Inget innehåll: Förfrågan returnerade inte något innehåll" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "" "205 - Återställ innehåll: Server bad klienten om att återställa dokumentet" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - Delvis innehåll: Den partiella GET har blivit framgångsrik" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - Multi-Status: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - Redan rapporterad: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - Flera val: Multipla alternativ för resursen" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - Flyttade permanent: Resursen har flyttats permanent" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - Flyttade tillfälligt (omdirigera)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - Se annat dokument: Svaret finns på en annan URI" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - Ej modifierad: Resursen har inte ändrats" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - Använd proxy: Kan endast nås via proxy" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - Tillfällig omdirigering: Resurs flyttas tillfälligt" #: src/labels.h:457 #, fuzzy msgid "308 - Permanent Redirect" msgstr "402 - Betalning krävs" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - Dålig begäran: Syntaxen för förfrågan är ogiltig" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - Ej auktoriserad: Begäran behöver användarautentisering" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - Betalning krävs" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - Förbud: Server vägrar att svara på det" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - Ej funnen: Begärd resurs kunde inte hittas" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - Metod Ej tillåtet: Förfrågan metod stöds inte" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - Ej acceptabelt" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - Proxy-autentisering krävs" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "408 - Begär tidsavbrott: Server slutade vänta på begäran" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - Konflikt: Konflikt i begäran" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "" "410 - Borta: Begärd resurs är inte längre tillgänglig410 - Gone: " "Resursförfrågan är inte längre tillgänglig, Skicka feedback" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - Krav längd: Ogiltigt innehållslängd" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "" "412 - Förutsättning misslyckades: Server uppfyller inte förutsättningar" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - Belastningen för stor" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - Begär-URI för lång" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - Medietyp som inte stöds: Medietypen stöds inte" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "" "416 - Begärd räckvidd Ej Tillfredställande: Kan inte leverera den delen" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - Förväntning misslyckades" #: src/labels.h:495 #, fuzzy msgid "418 - I'm a teapot" msgstr "Jag är en tekanna" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - Felriktad förfrågan" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - Obearbetad entitet på grund av semantiska fel: WebDAV" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - Resursen som nås är låst" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - Misslyckad beroende: WebDAV" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "426 - Uppgradering krävs: Klienten ska byta till ett annat protokoll" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "428 - Förutsättning krävs" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "" "429 - För många förfrågningar: Användaren har skickat för många förfrågningar" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 - Begär headerfält för stort" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "408 - Begär tidsavbrott: Server slutade vänta på begäran" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - Ej tillgänglig för juridiska skäl" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) Anslutningen är stängd utan att skicka några rubriker" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) Begär Header För Stor" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) SSL-klientcertifikatfel" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) Klienten lämnade inte certifikat" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) HTTP-begäran skickad till HTTPS-porten" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "499 - (Nginx) Anslutning sluten av klienten vid bearbetningsförfrågan" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - Internt serverfel" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - Inte Implementerad" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "502 - Dålig Gateway: Fick ett ogiltigt svar från uppströms" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - Service Otillgänglig: Servern är för närvarande inte tillgänglig" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "" "504 - Gateway Timeout: Uppströms-servern misslyckades med att skicka " "förfrågan" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - HTTP-version stöds inte" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - Webbserver returnerar ett okänt fel" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - webbservern är nere" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - Anslutningen avbröts" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - Ursprung är oåtkomligt" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - En timeout inträffade" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - Ej auktoriserad: Begäran behöver användarautentisering" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "Hänvisningar" goaccess-1.9.3/po/Makefile.in.in0000644000175000017300000004155314613301665012077 # Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.19 GETTEXT_MACRO_VERSION = 0.19 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SED = @SED@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot POFILESDEPS_yes = $(POFILESDEPS_) POFILESDEPS_no = POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) DISTFILESDEPS_ = update-po DISTFILESDEPS_yes = $(DISTFILESDEPS_) DISTFILESDEPS_no = DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. CHECK_MACRO_VERSION = \ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. # The determination of whether the package xyz is a GNU one is based on the # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ -size -10000000c -exec grep 'GNU @PACKAGE@' \ /dev/null '{}' ';' 2>/dev/null; \ else \ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ fi; \ } | grep -v 'libtool:' >/dev/null; then \ package_gnu=yes; \ else \ package_gnu=no; \ fi; \ }; \ if test "$$package_gnu" = "yes"; then \ package_prefix='GNU '; \ else \ package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_prefix}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(POFILESDEPS) @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: # Recreate Makefile by invoking config.status. Explicitly invoke the shell, # because execution permission bits may not work on the current file system. # Use @SHELL@, which is the shell determined by autoconf for the use by its # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && @SHELL@ ./config.status $(subdir)/$@.in po-directories force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: goaccess-1.9.3/po/boldquot.sed0000644000175000017300000000033114613301665011740 s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g goaccess-1.9.3/po/es.gmo0000644000175000017300000004244314626466521010546  PQ?j;790<j@4B:`$( 97/"g<2742g7w54616h#?'5@-v=9AO932DR<;&*7/b-B1AG>A ;+%g'(% "1= oy}  A    %%K+P+|$     / ?Lfl0 ; - ; F O U d &o   #   ! !!!+!F!*d!+! !!!!! """.1" `"l"u"{"" ""." "!"## #5#K#`#v## ## # ##9#$$"$$4$3Y$<$5$<%:=%Fx%@%G&8H&&&&&&+&&'' '*'/'I'7R' ''''''$(((4G()|(!(((((()!)2$)W*Au*<**8+5=+6s+=+9+I",3l,$,$, ,<,?1-(q->-2-; .8H..;.B./3%/<Y/://&/E 0)Q03{010=0 1!@1Db1C112B!2@d2C2-2=33U323-3+324FI444414H5GX55C5%68*6(c6)66 6&687 :7E7I7 O7[7l7t77B77 7 7 773 8>80D80u828 88&89 +969I9]9$q999;99::4:::5?: u: :::: :.:::;0 ;>; ^; j; x;;; ;>;4;< <=H< <<<< <<<=+=C=K=T= Z=d= j=t=5==#== >>->H>a>{>>>>>>>@?B?G?L?1a?:?E?A@BV@?@O@F)APpA@ABBB B2B1LB~BBBBBB BCB9CBCaCrCCC.C$C@D7SD.DDDDDD"D EG:!+5|$oV/H*yIAKdx]mzP {u)}C~gvrOtE"Lf4029ni <b^&'(% q?a spchwYU lST8\FJZQ63.`RB@-7ke1Mj# D=,N;>_[WX'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol429 - Too Many Requests: The user has sent too many requests444 - (Nginx) Connection closed without sending any headers494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAvg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsItems per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog SizeLog SourceMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTable ColumnsTablesThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: Goaccess Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2017-08-04 13:00-0300 Last-Translator: Enrique Becerra Language-Team: Language: es MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 1.5.4 '%1$s' panel esta desactivado100 - Continuar: Servidor recibio la parte inicial de la peticion101 - Cambiando Protocolos: Cliente pidio cambiar protocolos1xx Informativo200 - OK: La peticion enviada por el cliente fue exitosa201 - Creada: La peticion ha sido completada y creada202 - Aceptada: La peticion fue aceptada para procesar203 - No-autoritario Informativo: Respuesta de una 3er. parte204 - Sin Contenido: Peticion no retorno ningun contenido205 - Resetear Contenido: Servidor pidio al cliente resetear el documento206 - Contenido Parcial: el GET parcial fue exitoso207 - Multi-Estado: WebDAV; RFC 4918208 - Ya Reportado: WebDAV; RFC 58422xx Exito300 - Multiples Opciones: Multiples opciones para el recurso301 - Movido Permanente: Recurso ha sido permanentemente movido302 - Movido Temporalmente (redireccion)303 - Ver Otro Documento: La respuesta es en una URI diferente304 - No Modificado: Recurso no ha sido modificado305 - Usar Proxy: Puede ser accedido solo a traves de proxy307 - Redireccion Temporal: Recurso movido temporalmente3xx Redireccion400 - Peticion Mala: La sintaxis de la peticion es invalida401 - Sin Autorizacion: Peticion necesita autenticacion de usuario402 - Pago Requerido403 - Prohibido: Servidor esta rechazando respuesta404 - No Encontrado: Peticion de recurso no pudo encontrarse405 - Metodo No Permitido: Metodo de Peticion no soportado406 - No Aceptable407 - Autenticacion de Proxy Requerida408 - Timeout de Peticion: Tiempo agotado de espera para la solicitud409 - Conflicto: Conflicto en la peticion410 - Fue: Recurso requerido no esta mas disponible411 - Longitud Requerida: Content-Length Invalido412 - Precondicion Fallida: Servidor no cumple precondiciones413 - Carga Util Demasiado larga414 - Request-URI demasiado larga415 - Tipo de medios no soportado: El tipo de medios no es soportado416 - Rango requerido no satisfacible: No puede proveer esa porcion417 - Expectativa Fallida421 - Peticion mal dirigida422 - Peticion fue imposible seguirla debido a errores semánticos423 - El recurso al que se está teniendo acceso está bloqueado424 - La solicitud falló debido a una falla en la solicitud previa426 - El cliente debería cambiarse a TLS/1.0429 - Hay muchas conexiones desde esta dirección de internet444 - (Nginx) Conexion cerrada sin enviar cabeceras494 - (Nginx) Cabecera de Peticion demasiada larga495 - (Nginx) Cliente SSL certificado erroneo496 - (Nginx) Client no proveyo certificado497 - (Nginx) Peticion HTTP enviada a puerto HTTPS499 - (Nginx) Conexion cerrada por cliente mientras procesaba peticion4xx Errores de Cliente500 - Error Interno de Servidor501 - No Implementado502 - Entrada Erronea: Recibio respuesta invalida503 - Servicio no disponible: El servidor actualmente no esta disponible504 - Timeout de Gateway: El servidor upstream fallo al enviar peticion505 - Version HTTP no soportada520 - CloudFlare - El servidor esta retornando un error desconocido521 - CloudFlare - Servidor Web caido522 - CloudFlare - Tiempo de espera de conexion agotado 523 - CloudFlare - Origen es inaccesible524 - CloudFlare - Ocurrio cese de tiempo5xx Errores de ServidorArea RanuraAuto-ocultar en Pequeños DispositivosAutomaticamente ocultar tablas en pequeños dispositivosProm. T.S.BarClaraNavegadoresEstado de CachéGraficoOpciones de GraficoCiudadContinente > Pais ordenado por hits unicos [, avgts, cumts, maxts]PaisCum. T.S.Azul OscuroGris OscuroPanel de ControlPanel de Control - Peticiones Analizadas En GeneralDatosDatos ordenados por hits [, avgts, cumts, maxts]Datos ordenados por hora [, avgts, cumts, maxts]Formato de Fecha - [d] para agregar/editar formatoFecha/HoraMostrar TablasEjemplos pueden encontrarse ejecutandoAccesos IP Excl.Exp. PanelExportar como JSONPeticiones FallidasOpciones de ArchivoEncontrar patron en todas las vistasPrimeroPara mas detalles visiteErrores de Formato - Verifique su formato de log/fecha/horaGeo LocalizacionAyuda Rapida de GoAccessCodigos de Estado HTTPAyudaHitsHits con el mismo IP, fecha y agente son unica visitaHits/VisitasHorizontalHostnameHostsItems por paginaFrases ClaveFrases de busqueda de motor de busqueda GoogleUltimoUltima actualizacionDiseñoFormato de Log - [c] para agregar/editar formatoConfiguracion de Formato de LogTamaño LogOrigen de LogMax. T.S.MetodoMtdSiguienteNo se encontro formato de fecha en su archivo de configuracionNo se encontro archivo de configuracion por defecto.No se encontro formato de log en su archivo de configuracionNo se encontro formato de hora en su archivo de configuracionNo EncontradoURLs no encontradas (404)SOSistemas OperativosPeticiones Analizadas en GeneralOpciones de PanelPanelesAnalizadas %1$d lineasPor favor avise abriendo un issue en GitHubTrazadoAnteriorProtoProtocoloSalirReferidosSitios ReferidosPermitido Regex - ^g para cancelar - TAB cambiar caseUsuario RemotoUsuario Remoto (Autenticacion HTTP)Archivos Requeridos (URLs)PeticionesConfiguracion de EsquemaElija un formato de fecha.Elija un formato de log.Elija un formato de hora.Estadisticas de ServidorOrdenar modulo activo porArchivos EstaticosPeticiones EstaticasCodigos de EstadoColumnas de TablaTablasLas siguientes opciones pueden ser ademas suplirse en el comandoSkinHoraDistribucion HorariaFormato de Hora - [t] para agregar/editar formatoNavegadores top ordenados por hits [, avgts, cumts, maxts]Codigos de Estado HTTP top ordenados por hits [, avgts, cumts, maxts]Frases de busqueda top ordenadas por hits [, avgts, cumts, maxts]Sistemas Operativos top ordenados por hits [, avgts, cumts, maxts]Sitios Referidos top ordenados por hits [, avgts, cumts, maxts]URLs no encontradas top ordenadas por hits [, avgts, cumts, maxts, mthd, proto]Peticiones Top ordenadas por hits [, avgts, cumts, maxts, mthd, proto]Peticiones estaticas top ordenadas por hits [, avgts, cumts, maxts, mthd, proto]Hosts de visitante top ordenado por hits [, avgts, cumts, maxts]TotalPeticiones TotalesTipoVisitantes UnicosVisitantes unicos por diaVisitantes unicos por dia - Incluyendo M.BusquedaAgentes de Usuario para %1$sPeticiones ValidasVerticalHosts VirtualesVis.Hosts e IPs de los VisitantesVisitantesServidor WebSocket listo para aceptar nuevas conexiones de clientesPanoramaUd. puede especificar un ancho[ ] ASC [x] DESC[ ] distinguir mayusculas[?] Ayuda [Enter] Exp. Panel[Panel Activo: %1$s][ENTER] seleccionar - [TAB] ordenar - [q]Salir[ENTER] para usar esquema - [q]Salir[ESPACIO] para alternar - [ENTER] para proceder - [q] para salir[ARRIBA/ABAJO] para scrollear - [q] para cerrar ventana[ARRIBA/ABAJO] para scrollear - [q] para salir[q]Salir GoAccess[x] ASC [ ] DESC[x] distinguir mayusculasesh%produciendo los siguientes erroresv%goaccess-1.9.3/po/ja.gmo0000644000175000017300000005401614626466521010530 L3|HI?b;79(<b@4B:X$( 97'"_<274*_x754 6B6y#?')5Q-= 9&A`93"VDv<%;:#v&*/-BJA>AR ;%'(?%h 1. , 6 : A J W ] k Ap  % !+!+E!$q! !!! ! ! !! " ")"@"Z"`"0w" """"";" !# /#:#C#*I#t# #&## ##### $$ %$ 0$ ;$E$L$P$+U$$7$*$+% .%8%N%Q%c% }%%%.% %%%%% % &&.$& S&!_&&&&&&&&'' /'<' L' Y' f' ''%'9''(($( >(3K(<(5(<(:/)>j)F)@)G1*8y*** **-*+#+3++K+w+++ ++++7+ ,,6,G,Z,v,$,,4,)-!.-P-`-q-----E-..>!/l`/ /2/_ 0Mk00t[11ST242+2 3M3_b3b3e%4V4n4bQ5$55G5V>6'6\6S7qn7-7'8J6828S8/9K89'93999k:6:$::9;6;;Br;k;B!<ed<(<)<'=0E=5v=J=G=h?>>!>!>h ?Du?b?=@L[@=@:@1!A:SAAAA*AEA.0B_B rB B BB BBBcB4C;CNCaCtCC9C C`CZED D DDD DD EE9ERE!nE3E EEhE JFWFuF F FF6GSG ZG gGEtGGG*G H!H4H DHeHxHHH HHHHHHH?9IQyIHIHJ]JmJJ$J!JJ JJ8KIK_KfKvKKKKKAKL+!LML-lLLL!L!L!M&M$9M^M$tMM M9MM N<NHYN NN N NNcNsaOiOY?PiPoQsQQRlSSSS SNS3TJT-fTKT&TU U'U@U,PU}U?UU$U V(!V"JVmV-V'V2V;W&PWwWW(WWWW Xg{;wJI3&s|/d_MO^h9}\j#`[x$ToCy =8W2iRB.ND:p%])VYX6u Sm'vb (k t5!zG+7*H< ~Qf?ra1KL"l> ePAEUF-n@cZ,4q0'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved308 - Permanent Redirect3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed418 - I'm a teapot421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsASNArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAutonomous System Numbers/Organizations (ASNs)Avg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDark PurpleDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesEncryption settingsExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFile types shipped outFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsIn-Memory with On-Disk Persistent Storage.Items per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog Parsing TimeLog SizeLog SourceMIME TypesMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No input data was provided nor there's data to restore.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrer URLsReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTLS SettingsTLS version and picked algorithmTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatToggle PanelTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top Requested Referrers sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnable to allocate memory for a log instance.Unable to find the given log.Unique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: goaccess 1.3 Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2023-07-15 17:20+0900 Last-Translator: gemmaro Language-Team: Japanese Language: ja MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; '%1$s' パネルは無効化されています100 - 継続: リクエストヘッダーを受理しました101 - プロトコル変更: HTTPヘッダーでリクエストされたプロトコルに切り替えます1xx 情報200 - 成功: リクエストに成功しました201 - 作成: リクエストが成功して新たなリソースの作成が完了しました202 - 受理: リクエストを受け取ったが処理されていません203 - 認証されていない情報: リクエストを正常に処理しましたが、返される情報は別の送信元から来る可能性があります204 - コンテンツ無し: リクエストを正常に処理しましたが、返すべき情報がありません205 - リセット要求: クライアントに対してドキュメントビューのリセットを行うよう要求しました206 - 部分応答: コンテンツの一部のみレスポンスを返しました207 - 複数ステータス: (WebDAV拡張) RFC 4918208 - 報告済み: (WebDAV拡張) RFC 58422xx 成功300 - 選択が必要: リダイレクト先が複数指定されています301 - 恒久的な移動: リクエストされたリソースは完全に移動されました302 - 一時的な移動: リクエストされたリソースは一時的に移動されました303 - 別コンテンツ: リクエストされたリソースは別のURLで提供されています304 - 更新無し: リクエストされたリソースは更新されていません305 - プロキシ使用: リクエストされたリソースはプロキシを使用して取得できます307 - 一時的な移動: リクエストされたリソースは一時的に移動されました308 - 恒久的なリダイレクト3xx リダイレクション400 - 不正なリクエスト: リクエストを処理できません401 - 認証が必要: このリクエストを処理するには認証が必要です402 - 課金が必要なコンテンツ403 - アクセス禁止: このリクエストへのアクセスは禁止されています404 - リソース不明: リクエストされたリソースは存在しません405 - 許可されていない: リクエストされたメソッドでのアクセスは禁止されています406 - リクエストを受理できません407 - プロキシ認証が必要です408 - タイムアウト: リクエストがタイムアウトしました409 - 衝突: リクエストが衝突しました410 - 消滅: リクエストされたリソースは完全に削除されました411 - Content-Lengthヘッダーが必要です412 - サーバーに与えられた前提条件を満たしていません413 - ペイロードが長すぎます414 - リクエストされたURIが長すぎます415 - サポートされていないメディアタイプ416 - リクエストされたContent-Lengthヘッダーの範囲がリソースより超過しています417 - 拡張ステータスコードが使えません418 - 私はティーポットです421 - 不明なリクエスト422 - (WebDAV拡張) 処理できないエンティティ423 - このリソースはロックされています424 - (WebDAV拡張) 依存関係でエラーが発生しました426 - アップグレードが必要: プロトコルが古すぎてリクエストを処理できません428 - リクエストを条件付きにする必要があります429 - 過重リクエスト: 制限されたリクエスト数を超えたので処理できません431 - HTTPヘッダーが長すぎます444 - (nginx) 接続を遮断しました451 - 法的理由により利用不可494 - (nginx) HTTPヘッダーが長すぎます495 - (nginx) SSLクライアント証明書エラー496 - (nginx) クライアントが証明書を提供しませんでした497 - (nginx) HTTPリクエストをHTTPSポートに送信しました499 - (nginx) リクエストを処理中にクライアントによって接続を閉じられました4xx クライアントエラー500 - 内部サーバーエラー501 - 実装されていません502 - 不正なゲートウェイ: 上位サーバーから不正なレスポンスを受信しました503 - サービス利用不可: サーバーがダウンしました504 - ゲートウェイタイムアウト: 上位サーバーがリクエストを返しません505 - HTTPバージョンがサポートされていません520 - CloudFlare - Webサーバーが未知のエラーを返しています521 - CloudFlare - Webサーバーがダウンしています522 - CloudFlare - 接続がタイムアウトしました523 - CloudFlare - Originに到達できません524 - CloudFlare - タイムアウトが発生しました5xx サーバーエラーASN平滑面グラフ自動非表示設定(小型端末用)画面が小さい場合に自動でテーブルを非表示にするAutonomous System Numbers/Organizations (ASNs)平均処理時間棒グラフライトブラウザキャッシュの状態グラフグラフ設定地域地理区分 > 国別 [ヒット数、平均処理時間、合計処理時間、最大処理時間]国名合計処理時間ダークブルーダークグレーダークパープルダッシュボードダッシュボード - 解析済みリクエスト全体データ上位のデータ [ヒット数、平均処理時間、合計処理時間、最大処理時間]上位のデータ [時刻、平均処理時間、合計処理時間、最大処理時間]日付形式 - [d] 追加/編集日付/時刻テーブル表示暗号化設定実行例除外対象数詳細表示JSON形式でエクスポート無効リクエスト数ファイルオプション送出されたファイル種別すべてのビューでパターン検索を行う最初へ詳細はこちら解析に失敗しました - ログ/日付/時刻のフォーマット設定を確認してください位置情報GoAccessクイックヘルプHTTPステータスコードヘルプヒット数IPアドレス、日付、ユーザーエージェントが全て同一だった場合、ユニークユーザーとして扱われます。ヒット数/ユーザー数水平ホスト名ホスト名ディスク上の永続化ストレージ付きのインメモリ。ページあたりの表示数キーフレーズキーフレーズ(Google検索から)最後へ最終更新日時レイアウトログ形式 - [c] 追加/編集ログ形式設定ログの解析時間ログファイルサイズログ取得元MIMEタイプ最大処理時間要求要求次へ設定ファイル内で日付形式がセットされていません。デフォルトの設定ファイルが見つかりません。入力データが与えられておらず、復元データもありません。設定ファイル内でログ形式がセットされていません。設定ファイル内で時刻形式がセットされていません。404エラー数404エラーが返されたURLOSオペレーティングシステム解析済みリクエスト全体パネルオプションパネル解析済み: %1$d 行GitHub上のIssueから問題を報告してください表示するデータ前へプロトコルプロトコル終了リファラのURLリファラ数参照元サイト正規表現が有効 - [^g] キャンセル - [TAB] 切り替え認証されたユーザー認証されたユーザー(HTTP認証)要求されたファイル数リクエストされたファイル(URL)リクエスト数スキーム設定日付形式を選択します。ログ形式を選択します。時刻形式を選択します。サーバー統計選択したカラムで並び替え静的ファイル数静的ファイルリクエスト数ステータスコードTLSの設定TLSのバージョンと選択されたアルゴリズムテーブルカラムテーブルサーブされるオブジェクトのキャッシュ状態次のオプションはコマンドで指定することもできますテーマ時刻時間分布時刻形式 - [t] 追加/編集パネルを切り替える上位のブラウザ [ヒット数、平均処理時間、合計処理時間、最大処理時間]上位のHTTPステータスコード [ヒット数、平均処理時間、合計処理時間、最大処理時間]上位のキーフレーズ [ヒット数、平均処理時間、合計処理時間、最大処理時間]上位のOS [ヒット数、平均処理時間、合計処理時間、最大処理時間]上位の参照元サイト [ヒット数、平均処理時間、合計処理時間、最大処理時間]上位の要求元のリファラ [ヒット数、平均処理時間、合計処理時間、最大処理時間]上位のnot foundなURL [ヒット数、平均処理時間、合計処理時間、最大処理時間、メソッド、プロトコル]上位のリクエスト [ヒット数、平均処理時間、合計処理時間、最大処理時間、メソッド、プロトコル]上位の静的ファイルリクエスト [ヒット数、平均処理時間、合計処理時間、最大処理時間、メソッド、プロトコル]上位のユーザーホスト [ヒット数、平均処理時間、合計処理時間、最大処理時間]合計合計リクエスト数データ転送量タイプログインスタンスのためのメモリを割り当てられません。与えられたログを見付けられません。ユニークユーザー数一日あたりのユニークユーザー数一日あたりのユニークユーザー数(クローラも含める)%1$s のユーザーエージェント有効リクエスト数垂直バーチャルホストユーザー数ユーザーのホスト名とIPアドレスユーザー数クライアントからのWebSocket接続を待っていますワイドスクリーンいずれか指定してください[ ] 昇順 [x] 降順[ ] 大文字と小文字を区別する[?] ヘルプ [Enter] 詳細表示[表示中のパネル: %1$s][ENTER] 選択 - [TAB] ソート - [q] 終了[ENTER] スキーム選択 - [q] 終了[SPACE] 切り替え - [ENTER] 決定 - [q] 終了[↑/↓] スクロール - [q] ウィンドウを閉じる[↑/↓] スクロール - [q] 終了[q] GoAccessを閉じる[x] 昇順 [ ] 降順[x] 大文字と小文字を区別するjaヒット率(%)エラーが発生しました訪問率(%)goaccess-1.9.3/po/ko.po0000644000175000017300000006633514626466521010412 msgid "" msgstr "" "Project-Id-Version: goaccess 1.6.3\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2022-09-06 21:27+0900\n" "Last-Translator: David 창모 Yang \n" "Language-Team: Korean \n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0\n" "X-Generator: Gtranslator 40.0\n" #: src/labels.h:45 msgid "en" msgstr "ko" #: src/labels.h:48 msgid "Exp. Panel" msgstr "패널 펼치기" #: src/labels.h:49 msgid "Help" msgstr "도움말" #: src/labels.h:50 msgid "Quit" msgstr "종료" #: src/labels.h:51 msgid "Total" msgstr "합계" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] 오름차순 [ ] 내림차순" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] 오름차순 [x] 내림차순" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[표시 중인 패널: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q] GoAccess 종료" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] 도움말 [Enter] 패널 펼치기" #: src/labels.h:61 msgid "Dashboard" msgstr "대시보드" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "대시보드 - 기록 분석 개요" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "기록 분석 개요" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "전송량" #: src/labels.h:66 msgid "Date/Time" msgstr "날짜/시간" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "제외된 IP 방문" #: src/labels.h:68 msgid "Failed Requests" msgstr "무효 요청 수" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "로그 분석 시간" #: src/labels.h:70 msgid "Log Size" msgstr "로그 용량" #: src/labels.h:71 msgid "Log Source" msgstr "로그 출처" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "참조자 수" #: src/labels.h:73 msgid "Total Requests" msgstr "요청 수 합계" #: src/labels.h:74 msgid "Static Files" msgstr "정적 파일 수" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "찾을 수 없음" #: src/labels.h:76 msgid "Requested Files" msgstr "요청된 파일 수" #: src/labels.h:77 msgid "Unique Visitors" msgstr "순 방문자" #: src/labels.h:78 msgid "Valid Requests" msgstr "유효 요청 수" #: src/labels.h:81 msgid "Hits" msgstr "방문 수" #: src/labels.h:82 msgid "h%" msgstr "h%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "방문자 수" #: src/labels.h:84 msgid "Vis." msgstr "방문자 수" #: src/labels.h:85 msgid "v%" msgstr "v%" #: src/labels.h:87 msgid "Avg. T.S." msgstr "평균 처리시간" #: src/labels.h:88 msgid "Cum. T.S." msgstr "누적 처리시간" #: src/labels.h:89 msgid "Max. T.S." msgstr "최대 처리시간" #: src/labels.h:90 msgid "Method" msgstr "접속 방법" #: src/labels.h:91 msgid "Mtd" msgstr "접속 방법" #: src/labels.h:92 msgid "Protocol" msgstr "프로토콜" #: src/labels.h:93 msgid "Proto" msgstr "프로토콜" #: src/labels.h:94 msgid "City" msgstr "도시" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "국가" #: src/labels.h:97 msgid "Hostname" msgstr "호스트명" #: src/labels.h:98 msgid "Data" msgstr "데이터" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "방문 수/방문자 수" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "일일 순 방문자" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "일일 순 방문자 - 크롤러 포함" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "동일한 IP주소, 날짜, 에이전트를 가진 방문은 순 방문으로 간주됩니다." #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "요청된 파일 (URL)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "방문 수 순으로 정렬한 요청 수 [, 평균 처리시간, 누적 처리시간, 최대 처리시" "간, 접속 방법, 프로토콜]" #: src/labels.h:117 msgid "Requests" msgstr "요청 수" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "정적 파일 요청 수" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "방문 수 순으로 정렬한 정적 파일 요청 수 [, 평균 처리시간, 누적 처리시간, 최" "대 처리시간, 접속 방법, 프로토콜]" #: src/labels.h:127 msgid "Time Distribution" msgstr "시간 분포" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "시간별로 정렬한 데이터 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]" #: src/labels.h:131 msgid "Time" msgstr "시간" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "가상 호스트" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "" "방문 수로 정렬한 데이터 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "원격 사용자 (HTTP 인증)" #: src/labels.h:145 msgid "Remote User" msgstr "원격 사용자" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "로드되는 개체의 캐시 상태" #: src/labels.h:152 msgid "Cache Status" msgstr "캐시 상태" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "찾을 수 없는 URL (404)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "방문 수로 정렬한 찾을 수 없는 URL [, 평균 처리시간, 누적 처리시간, 최대 처리" "시간, 접속 방법, 프로토콜]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "방문자 호스트명 및 IP" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" "방문 수로 정렬한 방문자 호스트 [, 평균 처리시간, 누적 처리시간, 최대 처리시" "간]" #: src/labels.h:166 msgid "Hosts" msgstr "호스트명" #: src/labels.h:169 msgid "Operating Systems" msgstr "운영체제" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" "방문 수로 정렬한 운영체제 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]" #: src/labels.h:173 msgid "OS" msgstr "OS" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "브라우저" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "" "방문 수로 정렬한 브라우저 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "참조자 URL" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" "방문 수로 정렬한 요청 참조자 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "출발 사이트" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "" "방문 수로 정렬한 출발 사이트 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "구글로 검색된 관건문구" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" "방문 수로 정렬한 관건문구 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]" #: src/labels.h:201 msgid "Keyphrases" msgstr "관건문구" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "지리적 위치" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "" "순 방문 수로 정렬한 대륙 > 국가 [, 평균 처리시간, 누적 처리시간, 최대 처리시" "간]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "HTTP 상태 코드" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" "방문 수로 정렬한 HTTP 상태 코드 [, 평균 처리시간, 누적 처리시간, 최대 처리시" "간]" #: src/labels.h:222 msgid "Status Codes" msgstr "상태 코드" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "MIME 유형" #: src/labels.h:227 msgid "File types shipped out" msgstr "로드된 파일 유형" #: src/labels.h:232 msgid "Encryption settings" msgstr "암호화 설정사항" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "TLS 버전 및 선택한 알고리즘" #: src/labels.h:236 msgid "TLS Settings" msgstr "TLS 설정사항" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] 대소문자 구분" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] 대소문자 구분" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "정규표현식 허용 - 취소하려면 ^g - 대소문자 전환은 TAB" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "모든 보기에서 패턴을 찾기" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "로그 형식 구성" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "토글(똑딱)은 [SPACE] - 진행은 [ENTER] - 종료는 [q]" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "로그 형식 - 형식 추가/편집은 [c]" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "날짜 형식 - 형식 추가/편집은 [d]" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "시간 형식 - 형식 추가/편집은 [t]" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "스크롤은 [↑/↓] - 창 닫기는 [q]" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "%1$s 의 사용자 에이전트" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "스킴 구성" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "스킴을 사용하려면 [ENTER] - [q] 종료" #: src/labels.h:276 msgid "Sort active module by" msgstr "활성화된 모듈의 정렬 기준" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[ENTER] 선택 - [TAB] 정렬 - [q] 종료" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "GoAccess 빠른 도움말" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "스크롤은 [↑/↓] - 종료는 [q]" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "디스크상의 지속적 저장공간과 함께 메모리 기억." #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "형식 오류 - 로그/날짜/시간 형식을 확인하세요" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "conf 파일에 날짜 형식이 발견되지 않았습니다." #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "conf 파일에 로그 형식이 발견되지 않았습니다." #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "conf 파일에 시간 형식이 발견되지 않았습니다." #: src/labels.h:300 msgid "No default config file found." msgstr "기본 제공 config 파일을 찾을 수 없습니다." #: src/labels.h:302 msgid "You may specify one with" msgstr "별도로 지정하시려면" #: src/labels.h:304 msgid "producing the following errors" msgstr "다음과 같은 오류 메시지 발생" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "%1$d 개의 행을 식별" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "GitHub에서 Issue를 열어 신고해 주세요" #: src/labels.h:310 msgid "Select a time format." msgstr "시간 형식을 선택하세요." #: src/labels.h:312 msgid "Select a date format." msgstr "날짜 형식을 선택하세요." #: src/labels.h:314 msgid "Select a log format." msgstr "로그 형식을 선택하세요." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "'%1$s' 패널은 비활성 상태입니다" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "입력 데이터가 주어지지 않았고 복원할 데이터도 없음" #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "자세한 사항은 다음을 방문하세요" #: src/labels.h:328 msgid "Last Updated" msgstr "최근 업데이트" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "WebSocket 서버가 새로운 클라이언트 접속을 받을 준비가 되었습니다" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "명령어에 다음과 같은 옵션을 추가할 수 있습니다" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "다음을 실행하여 예시를 볼 수 있습니다" #: src/labels.h:338 msgid "Server Statistics" msgstr "서버 통계" #: src/labels.h:340 msgid "Theme" msgstr "테마" #: src/labels.h:342 msgid "Dark Gray" msgstr "짙은 회색" #: src/labels.h:344 msgid "Bright" msgstr "밝은 색" #: src/labels.h:346 msgid "Dark Blue" msgstr "짙은 파란색" #: src/labels.h:348 msgid "Dark Purple" msgstr "짙은 보라색" #: src/labels.h:350 msgid "Panels" msgstr "패널" #: src/labels.h:352 msgid "Items per Page" msgstr "페이지에 표시할 항목 수" #: src/labels.h:354 msgid "Tables" msgstr "표" #: src/labels.h:356 msgid "Display Tables" msgstr "표 표시" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "소형 기기에서는 자동 숨김" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "작은 화면의 기기에서는 표를 자동으로 숨깁니다" #: src/labels.h:362 msgid "Toggle Panel" msgstr "패널 토글" #: src/labels.h:364 msgid "Layout" msgstr "레이아웃" #: src/labels.h:366 msgid "Horizontal" msgstr "가로" #: src/labels.h:368 msgid "Vertical" msgstr "세로" #: src/labels.h:370 msgid "WideScreen" msgstr "와이드스크린" #: src/labels.h:372 msgid "File Options" msgstr "파일 옵션" #: src/labels.h:374 msgid "Export as JSON" msgstr "JSON 형태로 내보내기" #: src/labels.h:376 msgid "Panel Options" msgstr "패널 옵션" #: src/labels.h:378 msgid "Previous" msgstr "이전" #: src/labels.h:380 msgid "Next" msgstr "다음" #: src/labels.h:382 msgid "First" msgstr "처음" #: src/labels.h:384 msgid "Last" msgstr "마지막" #: src/labels.h:386 msgid "Chart Options" msgstr "도표 옵션" #: src/labels.h:388 msgid "Chart" msgstr "도표" #: src/labels.h:390 msgid "Type" msgstr "유형" #: src/labels.h:392 msgid "Area Spline" msgstr "활면곡선" #: src/labels.h:394 msgid "Bar" msgstr "막대그래프" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "표시할 데이터" #: src/labels.h:400 msgid "Table Columns" msgstr "표의 열" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx 참고사항" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx 성공" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx 넘겨주기" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx 클라이언트 오류" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx 서버 오류" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "" "100 - 계속: 서버는 요청의 첫 번째 부분을 받았으며 나머지를 기다리고 있음" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "101 - 프로토콜 전환: 클라이언트가 서버에 프로토콜 전환을 요청" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - 성공: 요청이 제대로 처리되었음" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - 작성됨: 성공적으로 요청되었으며 서버가 새 리소스를 작성함" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - 허용됨: 서버가 요청을 접수했지만 아직 처리하지 않았음" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - 신뢰할 수 없는 정보: 제3자에게서 온 담신" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - 내용 없음: 요청이 공백의 데이터를 반환하였음" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "205 - 내용 재설정: 서버가 클라이언트에게 문서를 재설정할 것을 요청함" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - 부분적 내용: GET 요청의 일부만 성공적으로 처리됨" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - 다중 상태: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - 이미 보고됨: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - 여러 선택지: 리소스가 실행할 수 있는 옵션이 다수 있음" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - 영구 이동: 리소스가 영구적으로 이동함" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - 임시 이동: (넘겨주기)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - 다른 문서 조회: 답신이 다른 URI에 존재함" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - 수정 안함: 리소스가 수정되지 않았음" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - 프록시 이용: 프록시를 통해서만 접근 가능" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - 임시적 넘겨주기: 리소스가 임시적으로 이동함" #: src/labels.h:457 msgid "308 - Permanent Redirect" msgstr "308 - 영구적 넘겨주기" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - 잘못된 요청: 요청의 구문이 잘못됨" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - 권한 없음: 요청에 사용자 인증이 필요함" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - 결제 필요" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - 금지됨: 서버가 답신을 거부함" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - 찾을 수 없음: 요청한 리소스가 발견되지 않음" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - 허용되지 않는 메소드: 요청의 메소드가 지원되지 않음" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - 허용되지 않음" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - 프록시 인증 필요" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "408 - 요청 시간초과: 서버의 요청 대기 시간이 초과됨" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - 충돌: 요청에 충돌 사항이 포함됨" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - 사라짐: 요청한 리소스가 삭제됨" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - 길이 필요: 유효하지 않은 내용의 길이" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "412 - 사전조건 실패: 요청된 사전조건을 서버가 만족시키지 않음" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - 요청의 본문이 너무 큼" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - 요청의 URI가 너무 긺" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - 지원되지 않는 미디어 유형: 미디어 유형이 지원되지 않음" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "" "416 - 처리할 수 없는 요청범위: 서버가 제공할 수 있는 범위를 넘어선 요청" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - 예상 실패" #: src/labels.h:495 msgid "418 - I'm a teapot" msgstr "418 - 저는 주전자인데요" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - 오도된 요청" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - 구문 오류로 인해 처리할 수 없는 엔티티: WebDAV" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - 접근하려는 리소스가 잠겨 있음" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - 의존사항 실패: WebDAV" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "426 - 업그레이드 필요: 클라이언트는 다른 프로토콜을 이용해야 함" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "428 - 전제조건 필요" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 - 요청 과다: 사용자가 너무 많은 요청을 보냄" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 - 요청 헤더란이 너무 큼" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "408 - 요청 시간초과: 서버의 요청 대기 시간이 초과됨" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - 법적인 이유로 인해 이용 불가" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) 헤더를 보내지 않고 연결이 끊어짐" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) 요청 헤더가 너무 큼" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) SSL 클라이언트 인증서 오류" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) 클라이언트가 인증서를 제공하지 않음" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) HTTP 요청이 HTTPS 포트로 보내짐" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "499 - (Nginx) 요청을 처리하는 도중 클라이언트가 연결을 해제함" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - 내부 서버 오류" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - 구현되지 않음" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "502 - 불량 게이트웨이: 상위 서버에서 잘못된 응답을 받음" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - 서비스 이용 불가: 서버를 현재 이용할 수 없음" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "504 - 게이트웨이 시간초과: 상위 서버가 요청을 보내는데 실패함" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - HTTP 버전이 지원되지 않음" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - 웹서버가 알 수 없는 오류를 반환함" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - 웹서버 다운" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - 연결 시간초과" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - 요청의 근원에 도달할 수 없음" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - 시간초과 발생" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - 권한 없음: 요청에 사용자 인증이 필요함" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "참조자 수" goaccess-1.9.3/po/en@quot.header0000644000175000017300000000226314613301665012205 # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # goaccess-1.9.3/po/ko.gmo0000644000175000017300000004771314626466521010555 3?;B~79<@?4B:$3(X 97"<"2_747(5`466P#e?'5-'=U9AB[n93D[<w%;#&:*a/-B-?[Aq>A 4;U%'(%. @L1g   A ' 1 ; E Q %[  + + $ ! !! 0! Q! _!j!y! !!!!!0! """6"H"M";R" " """*"" "&""# '#4##;#_#x## # # ####+##7 $*D$+o$ $$$$$ $$$.% @%L%U%[%d% i%s%.% %!%%%&&%&;&P&f&x& && & & & &&%&9!'['a'f'$x' '3'<'5(<Q(:(F(@)GQ)8))) )))*+*K*`*o* x****7* ** ++.+J+$_++4+)+!,$,4,E,X,[,^,},,*.dD.U..1/XB/R/>/E-0_s0I0%1(C1 l1Qw1;1#2=)28g2?2D2%3B35S3<33.3C 4OM444F4251O595U5$6!66SX6b67#7C7DZ707!7X7K8@e8$8<8.9)792a9A969R :`:{::L:D:UB;(;B;#<&(<;O<&<< <$<A<8=L= \= g= t== ==m= >>'> 8>F> W>#d> >c>b>+Y? ? ??5???@,@ >@L@$d@@-@>@@A(A ;A EA^PAAA A ABA!,B NB [B |BB B+BBB B C C%C 9C GCUC=\C7CHC=D=YDDDD DD DDD0EJE^E eE rEE EEHEEEF3F JF UF!cF!F!F F$FFG 'G5G%FG lGwG${GBGGG G+G +Hf9HlHf IftIjIFJJ\KmKaLhL zLL LL'LLLMM M.M LMXZMMM!MN&NDN*aN.N=N*N&$OKO!_OOOO(OOey;uIH3&qz/b]KM\f9{Zh#^Yv$RmCw =8U2gP~B.LD:n%[)TWV6}s Qk't` (i r5!xG+7*< |Od?p_1J"j> cNAESF-l@aX,4o0'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved308 - Permanent Redirect3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed418 - I'm a teapot421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAvg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDark PurpleDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesEncryption settingsExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFile types shipped outFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsIn-Memory with On-Disk Persistent Storage.Items per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog Parsing TimeLog SizeLog SourceMIME TypesMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No input data was provided nor there's data to restore.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTLS SettingsTLS version and picked algorithmTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatToggle PanelTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: goaccess 1.6.3 Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2022-09-06 21:27+0900 Last-Translator: David 창모 Yang Language-Team: Korean Language: ko MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0 X-Generator: Gtranslator 40.0 '%1$s' 패널은 비활성 상태입니다100 - 계속: 서버는 요청의 첫 번째 부분을 받았으며 나머지를 기다리고 있음101 - 프로토콜 전환: 클라이언트가 서버에 프로토콜 전환을 요청1xx 참고사항200 - 성공: 요청이 제대로 처리되었음201 - 작성됨: 성공적으로 요청되었으며 서버가 새 리소스를 작성함202 - 허용됨: 서버가 요청을 접수했지만 아직 처리하지 않았음203 - 신뢰할 수 없는 정보: 제3자에게서 온 담신204 - 내용 없음: 요청이 공백의 데이터를 반환하였음205 - 내용 재설정: 서버가 클라이언트에게 문서를 재설정할 것을 요청함206 - 부분적 내용: GET 요청의 일부만 성공적으로 처리됨207 - 다중 상태: WebDAV; RFC 4918208 - 이미 보고됨: WebDAV; RFC 58422xx 성공300 - 여러 선택지: 리소스가 실행할 수 있는 옵션이 다수 있음301 - 영구 이동: 리소스가 영구적으로 이동함302 - 임시 이동: (넘겨주기)303 - 다른 문서 조회: 답신이 다른 URI에 존재함304 - 수정 안함: 리소스가 수정되지 않았음305 - 프록시 이용: 프록시를 통해서만 접근 가능307 - 임시적 넘겨주기: 리소스가 임시적으로 이동함308 - 영구적 넘겨주기3xx 넘겨주기400 - 잘못된 요청: 요청의 구문이 잘못됨401 - 권한 없음: 요청에 사용자 인증이 필요함402 - 결제 필요403 - 금지됨: 서버가 답신을 거부함404 - 찾을 수 없음: 요청한 리소스가 발견되지 않음405 - 허용되지 않는 메소드: 요청의 메소드가 지원되지 않음406 - 허용되지 않음407 - 프록시 인증 필요408 - 요청 시간초과: 서버의 요청 대기 시간이 초과됨409 - 충돌: 요청에 충돌 사항이 포함됨410 - 사라짐: 요청한 리소스가 삭제됨411 - 길이 필요: 유효하지 않은 내용의 길이412 - 사전조건 실패: 요청된 사전조건을 서버가 만족시키지 않음413 - 요청의 본문이 너무 큼414 - 요청의 URI가 너무 긺415 - 지원되지 않는 미디어 유형: 미디어 유형이 지원되지 않음416 - 처리할 수 없는 요청범위: 서버가 제공할 수 있는 범위를 넘어선 요청417 - 예상 실패418 - 저는 주전자인데요421 - 오도된 요청422 - 구문 오류로 인해 처리할 수 없는 엔티티: WebDAV423 - 접근하려는 리소스가 잠겨 있음424 - 의존사항 실패: WebDAV426 - 업그레이드 필요: 클라이언트는 다른 프로토콜을 이용해야 함428 - 전제조건 필요429 - 요청 과다: 사용자가 너무 많은 요청을 보냄431 - 요청 헤더란이 너무 큼444 - (Nginx) 헤더를 보내지 않고 연결이 끊어짐451 - 법적인 이유로 인해 이용 불가494 - (Nginx) 요청 헤더가 너무 큼495 - (Nginx) SSL 클라이언트 인증서 오류496 - (Nginx) 클라이언트가 인증서를 제공하지 않음497 - (Nginx) HTTP 요청이 HTTPS 포트로 보내짐499 - (Nginx) 요청을 처리하는 도중 클라이언트가 연결을 해제함4xx 클라이언트 오류500 - 내부 서버 오류501 - 구현되지 않음502 - 불량 게이트웨이: 상위 서버에서 잘못된 응답을 받음503 - 서비스 이용 불가: 서버를 현재 이용할 수 없음504 - 게이트웨이 시간초과: 상위 서버가 요청을 보내는데 실패함505 - HTTP 버전이 지원되지 않음520 - CloudFlare - 웹서버가 알 수 없는 오류를 반환함521 - CloudFlare - 웹서버 다운522 - CloudFlare - 연결 시간초과523 - CloudFlare - 요청의 근원에 도달할 수 없음524 - CloudFlare - 시간초과 발생5xx 서버 오류활면곡선소형 기기에서는 자동 숨김작은 화면의 기기에서는 표를 자동으로 숨깁니다평균 처리시간막대그래프밝은 색브라우저캐시 상태도표도표 옵션도시순 방문 수로 정렬한 대륙 > 국가 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]국가누적 처리시간짙은 파란색짙은 회색짙은 보라색대시보드대시보드 - 기록 분석 개요데이터방문 수로 정렬한 데이터 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]시간별로 정렬한 데이터 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]날짜 형식 - 형식 추가/편집은 [d]날짜/시간표 표시암호화 설정사항다음을 실행하여 예시를 볼 수 있습니다제외된 IP 방문패널 펼치기JSON 형태로 내보내기무효 요청 수파일 옵션로드된 파일 유형모든 보기에서 패턴을 찾기처음자세한 사항은 다음을 방문하세요형식 오류 - 로그/날짜/시간 형식을 확인하세요지리적 위치GoAccess 빠른 도움말HTTP 상태 코드도움말방문 수동일한 IP주소, 날짜, 에이전트를 가진 방문은 순 방문으로 간주됩니다.방문 수/방문자 수가로호스트명호스트명디스크상의 지속적 저장공간과 함께 메모리 기억.페이지에 표시할 항목 수관건문구구글로 검색된 관건문구마지막최근 업데이트레이아웃로그 형식 - 형식 추가/편집은 [c]로그 형식 구성로그 분석 시간로그 용량로그 출처MIME 유형최대 처리시간접속 방법접속 방법다음conf 파일에 날짜 형식이 발견되지 않았습니다.기본 제공 config 파일을 찾을 수 없습니다.입력 데이터가 주어지지 않았고 복원할 데이터도 없음conf 파일에 로그 형식이 발견되지 않았습니다.conf 파일에 시간 형식이 발견되지 않았습니다.찾을 수 없음찾을 수 없는 URL (404)OS운영체제기록 분석 개요패널 옵션패널%1$d 개의 행을 식별GitHub에서 Issue를 열어 신고해 주세요표시할 데이터이전프로토콜프로토콜종료참조자 수출발 사이트정규표현식 허용 - 취소하려면 ^g - 대소문자 전환은 TAB원격 사용자원격 사용자 (HTTP 인증)요청된 파일 수요청된 파일 (URL)요청 수스킴 구성날짜 형식을 선택하세요.로그 형식을 선택하세요.시간 형식을 선택하세요.서버 통계활성화된 모듈의 정렬 기준정적 파일 수정적 파일 요청 수상태 코드TLS 설정사항TLS 버전 및 선택한 알고리즘표의 열표로드되는 개체의 캐시 상태명령어에 다음과 같은 옵션을 추가할 수 있습니다테마시간시간 분포시간 형식 - 형식 추가/편집은 [t]패널 토글방문 수로 정렬한 브라우저 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]방문 수로 정렬한 HTTP 상태 코드 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]방문 수로 정렬한 관건문구 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]방문 수로 정렬한 운영체제 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]방문 수로 정렬한 출발 사이트 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]방문 수로 정렬한 찾을 수 없는 URL [, 평균 처리시간, 누적 처리시간, 최대 처리시간, 접속 방법, 프로토콜]방문 수 순으로 정렬한 요청 수 [, 평균 처리시간, 누적 처리시간, 최대 처리시간, 접속 방법, 프로토콜]방문 수 순으로 정렬한 정적 파일 요청 수 [, 평균 처리시간, 누적 처리시간, 최대 처리시간, 접속 방법, 프로토콜]방문 수로 정렬한 방문자 호스트 [, 평균 처리시간, 누적 처리시간, 최대 처리시간]합계요청 수 합계전송량유형순 방문자일일 순 방문자일일 순 방문자 - 크롤러 포함%1$s 의 사용자 에이전트유효 요청 수세로가상 호스트방문자 수방문자 호스트명 및 IP방문자 수WebSocket 서버가 새로운 클라이언트 접속을 받을 준비가 되었습니다와이드스크린별도로 지정하시려면[ ] 오름차순 [x] 내림차순[ ] 대소문자 구분[?] 도움말 [Enter] 패널 펼치기[표시 중인 패널: %1$s][ENTER] 선택 - [TAB] 정렬 - [q] 종료스킴을 사용하려면 [ENTER] - [q] 종료토글(똑딱)은 [SPACE] - 진행은 [ENTER] - 종료는 [q]스크롤은 [↑/↓] - 창 닫기는 [q]스크롤은 [↑/↓] - 종료는 [q][q] GoAccess 종료[x] 오름차순 [ ] 내림차순[x] 대소문자 구분koh%다음과 같은 오류 메시지 발생v%goaccess-1.9.3/po/es.po0000644000175000017300000006304114626466520010376 msgid "" msgstr "" "Project-Id-Version: Goaccess\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2017-08-04 13:00-0300\n" "Last-Translator: Enrique Becerra \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.5.4\n" #: src/labels.h:45 msgid "en" msgstr "es" #: src/labels.h:48 msgid "Exp. Panel" msgstr "Exp. Panel" #: src/labels.h:49 msgid "Help" msgstr "Ayuda" #: src/labels.h:50 msgid "Quit" msgstr "Salir" #: src/labels.h:51 msgid "Total" msgstr "Total" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] ASC [ ] DESC" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] ASC [x] DESC" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[Panel Activo: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q]Salir GoAccess" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] Ayuda [Enter] Exp. Panel" #: src/labels.h:61 msgid "Dashboard" msgstr "Panel de Control" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "Panel de Control - Peticiones Analizadas En General" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "Peticiones Analizadas en General" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "" #: src/labels.h:66 msgid "Date/Time" msgstr "Fecha/Hora" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "Accesos IP Excl." #: src/labels.h:68 msgid "Failed Requests" msgstr "Peticiones Fallidas" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "" #: src/labels.h:70 msgid "Log Size" msgstr "Tamaño Log" #: src/labels.h:71 msgid "Log Source" msgstr "Origen de Log" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "Referidos" #: src/labels.h:73 msgid "Total Requests" msgstr "Peticiones Totales" #: src/labels.h:74 msgid "Static Files" msgstr "Archivos Estaticos" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "No Encontrado" #: src/labels.h:76 #, fuzzy msgid "Requested Files" msgstr "Archivos Requeridos (URLs)" #: src/labels.h:77 msgid "Unique Visitors" msgstr "Visitantes Unicos" #: src/labels.h:78 msgid "Valid Requests" msgstr "Peticiones Validas" #: src/labels.h:81 msgid "Hits" msgstr "Hits" #: src/labels.h:82 msgid "h%" msgstr "h%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "Visitantes" #: src/labels.h:84 msgid "Vis." msgstr "Vis." #: src/labels.h:85 msgid "v%" msgstr "v%" #: src/labels.h:87 msgid "Avg. T.S." msgstr "Prom. T.S." #: src/labels.h:88 msgid "Cum. T.S." msgstr "Cum. T.S." #: src/labels.h:89 msgid "Max. T.S." msgstr "Max. T.S." #: src/labels.h:90 msgid "Method" msgstr "Metodo" #: src/labels.h:91 msgid "Mtd" msgstr "Mtd" #: src/labels.h:92 msgid "Protocol" msgstr "Protocolo" #: src/labels.h:93 msgid "Proto" msgstr "Proto" #: src/labels.h:94 msgid "City" msgstr "Ciudad" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "Pais" #: src/labels.h:97 msgid "Hostname" msgstr "Hostname" #: src/labels.h:98 msgid "Data" msgstr "Datos" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "Hits/Visitas" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "Visitantes unicos por dia" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "Visitantes unicos por dia - Incluyendo M.Busqueda" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "Hits con el mismo IP, fecha y agente son unica visita" #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "Archivos Requeridos (URLs)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "Peticiones Top ordenadas por hits [, avgts, cumts, maxts, mthd, proto]" #: src/labels.h:117 msgid "Requests" msgstr "Peticiones" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "Peticiones Estaticas" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Peticiones estaticas top ordenadas por hits [, avgts, cumts, maxts, mthd, " "proto]" #: src/labels.h:127 msgid "Time Distribution" msgstr "Distribucion Horaria" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Datos ordenados por hora [, avgts, cumts, maxts]" #: src/labels.h:131 msgid "Time" msgstr "Hora" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "Hosts Virtuales" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Datos ordenados por hits [, avgts, cumts, maxts]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "Usuario Remoto (Autenticacion HTTP)" #: src/labels.h:145 msgid "Remote User" msgstr "Usuario Remoto" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "" #: src/labels.h:152 msgid "Cache Status" msgstr "Estado de Caché" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "URLs no encontradas (404)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "URLs no encontradas top ordenadas por hits [, avgts, cumts, maxts, mthd, " "proto]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "Hosts e IPs de los Visitantes" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "Hosts de visitante top ordenado por hits [, avgts, cumts, maxts]" #: src/labels.h:166 msgid "Hosts" msgstr "Hosts" #: src/labels.h:169 msgid "Operating Systems" msgstr "Sistemas Operativos" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "Sistemas Operativos top ordenados por hits [, avgts, cumts, maxts]" #: src/labels.h:173 msgid "OS" msgstr "SO" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "Navegadores" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "Navegadores top ordenados por hits [, avgts, cumts, maxts]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "URLs Referidos" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "Peticiones top de referidos ordenadas por hits [, avgts, cumts, maxts]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "Sitios Referidos" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "Sitios Referidos top ordenados por hits [, avgts, cumts, maxts]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "Frases de busqueda de motor de busqueda Google" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "Frases de busqueda top ordenadas por hits [, avgts, cumts, maxts]" #: src/labels.h:201 msgid "Keyphrases" msgstr "Frases Clave" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "Geo Localizacion" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "Continente > Pais ordenado por hits unicos [, avgts, cumts, maxts]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "Codigos de Estado HTTP" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "Codigos de Estado HTTP top ordenados por hits [, avgts, cumts, maxts]" #: src/labels.h:222 msgid "Status Codes" msgstr "Codigos de Estado" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "" #: src/labels.h:227 msgid "File types shipped out" msgstr "" #: src/labels.h:232 msgid "Encryption settings" msgstr "" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "" #: src/labels.h:236 msgid "TLS Settings" msgstr "" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] distinguir mayusculas" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] distinguir mayusculas" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "Permitido Regex - ^g para cancelar - TAB cambiar case" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "Encontrar patron en todas las vistas" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "Configuracion de Formato de Log" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[ESPACIO] para alternar - [ENTER] para proceder - [q] para salir" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "Formato de Log - [c] para agregar/editar formato" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "Formato de Fecha - [d] para agregar/editar formato" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "Formato de Hora - [t] para agregar/editar formato" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[ARRIBA/ABAJO] para scrollear - [q] para cerrar ventana" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "Agentes de Usuario para %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "Configuracion de Esquema" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[ENTER] para usar esquema - [q]Salir" #: src/labels.h:276 msgid "Sort active module by" msgstr "Ordenar modulo activo por" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[ENTER] seleccionar - [TAB] ordenar - [q]Salir" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "Ayuda Rapida de GoAccess" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[ARRIBA/ABAJO] para scrollear - [q] para salir" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "" #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "Errores de Formato - Verifique su formato de log/fecha/hora" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "No se encontro formato de fecha en su archivo de configuracion" #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "No se encontro formato de log en su archivo de configuracion" #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "No se encontro formato de hora en su archivo de configuracion" #: src/labels.h:300 msgid "No default config file found." msgstr "No se encontro archivo de configuracion por defecto." #: src/labels.h:302 msgid "You may specify one with" msgstr "Ud. puede especificar un ancho" #: src/labels.h:304 msgid "producing the following errors" msgstr "produciendo los siguientes errores" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "Analizadas %1$d lineas" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "Por favor avise abriendo un issue en GitHub" #: src/labels.h:310 msgid "Select a time format." msgstr "Elija un formato de hora." #: src/labels.h:312 msgid "Select a date format." msgstr "Elija un formato de fecha." #: src/labels.h:314 msgid "Select a log format." msgstr "Elija un formato de log." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "'%1$s' panel esta desactivado" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "" #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "Para mas detalles visite" #: src/labels.h:328 msgid "Last Updated" msgstr "Ultima actualizacion" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "Servidor WebSocket listo para aceptar nuevas conexiones de clientes" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "Las siguientes opciones pueden ser ademas suplirse en el comando" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "Ejemplos pueden encontrarse ejecutando" #: src/labels.h:338 msgid "Server Statistics" msgstr "Estadisticas de Servidor" #: src/labels.h:340 msgid "Theme" msgstr "Skin" #: src/labels.h:342 msgid "Dark Gray" msgstr "Gris Oscuro" #: src/labels.h:344 msgid "Bright" msgstr "Clara" #: src/labels.h:346 msgid "Dark Blue" msgstr "Azul Oscuro" #: src/labels.h:348 #, fuzzy msgid "Dark Purple" msgstr "Morado Oscuro" #: src/labels.h:350 msgid "Panels" msgstr "Paneles" #: src/labels.h:352 msgid "Items per Page" msgstr "Items por pagina" #: src/labels.h:354 msgid "Tables" msgstr "Tablas" #: src/labels.h:356 msgid "Display Tables" msgstr "Mostrar Tablas" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "Auto-ocultar en Pequeños Dispositivos" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "Automaticamente ocultar tablas en pequeños dispositivos" #: src/labels.h:362 msgid "Toggle Panel" msgstr "" #: src/labels.h:364 msgid "Layout" msgstr "Diseño" #: src/labels.h:366 msgid "Horizontal" msgstr "Horizontal" #: src/labels.h:368 msgid "Vertical" msgstr "Vertical" #: src/labels.h:370 msgid "WideScreen" msgstr "Panorama" #: src/labels.h:372 msgid "File Options" msgstr "Opciones de Archivo" #: src/labels.h:374 msgid "Export as JSON" msgstr "Exportar como JSON" #: src/labels.h:376 msgid "Panel Options" msgstr "Opciones de Panel" #: src/labels.h:378 msgid "Previous" msgstr "Anterior" #: src/labels.h:380 msgid "Next" msgstr "Siguiente" #: src/labels.h:382 msgid "First" msgstr "Primero" #: src/labels.h:384 msgid "Last" msgstr "Ultimo" #: src/labels.h:386 msgid "Chart Options" msgstr "Opciones de Grafico" #: src/labels.h:388 msgid "Chart" msgstr "Grafico" #: src/labels.h:390 msgid "Type" msgstr "Tipo" #: src/labels.h:392 msgid "Area Spline" msgstr "Area Ranura" #: src/labels.h:394 msgid "Bar" msgstr "Bar" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "Trazado" #: src/labels.h:400 msgid "Table Columns" msgstr "Columnas de Tabla" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx Informativo" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx Exito" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Redireccion" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx Errores de Cliente" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx Errores de Servidor" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "100 - Continuar: Servidor recibio la parte inicial de la peticion" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "101 - Cambiando Protocolos: Cliente pidio cambiar protocolos" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - OK: La peticion enviada por el cliente fue exitosa" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - Creada: La peticion ha sido completada y creada" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - Aceptada: La peticion fue aceptada para procesar" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - No-autoritario Informativo: Respuesta de una 3er. parte" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - Sin Contenido: Peticion no retorno ningun contenido" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "" "205 - Resetear Contenido: Servidor pidio al cliente resetear el documento" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - Contenido Parcial: el GET parcial fue exitoso" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - Multi-Estado: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - Ya Reportado: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - Multiples Opciones: Multiples opciones para el recurso" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - Movido Permanente: Recurso ha sido permanentemente movido" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - Movido Temporalmente (redireccion)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - Ver Otro Documento: La respuesta es en una URI diferente" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - No Modificado: Recurso no ha sido modificado" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - Usar Proxy: Puede ser accedido solo a traves de proxy" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - Redireccion Temporal: Recurso movido temporalmente" #: src/labels.h:457 #, fuzzy msgid "308 - Permanent Redirect" msgstr "402 - Pago Requerido" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - Peticion Mala: La sintaxis de la peticion es invalida" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - Sin Autorizacion: Peticion necesita autenticacion de usuario" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - Pago Requerido" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - Prohibido: Servidor esta rechazando respuesta" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - No Encontrado: Peticion de recurso no pudo encontrarse" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - Metodo No Permitido: Metodo de Peticion no soportado" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - No Aceptable" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - Autenticacion de Proxy Requerida" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "408 - Timeout de Peticion: Tiempo agotado de espera para la solicitud" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - Conflicto: Conflicto en la peticion" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - Fue: Recurso requerido no esta mas disponible" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - Longitud Requerida: Content-Length Invalido" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "412 - Precondicion Fallida: Servidor no cumple precondiciones" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - Carga Util Demasiado larga" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - Request-URI demasiado larga" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - Tipo de medios no soportado: El tipo de medios no es soportado" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "416 - Rango requerido no satisfacible: No puede proveer esa porcion" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - Expectativa Fallida" #: src/labels.h:495 #, fuzzy msgid "418 - I'm a teapot" msgstr "418 - Soy una tetera" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - Peticion mal dirigida" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - Peticion fue imposible seguirla debido a errores semánticos" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - El recurso al que se está teniendo acceso está bloqueado" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - La solicitud falló debido a una falla en la solicitud previa" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "426 - El cliente debería cambiarse a TLS/1.0" #: src/labels.h:511 #, fuzzy msgid "428 - Precondition Required" msgstr "402 - Pago Requerido" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 - Hay muchas conexiones desde esta dirección de internet" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 #, fuzzy msgid "431 - Request Header Fields Too Large" msgstr "494 - (Nginx) Cabecera de Peticion demasiada larga" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "408 - Timeout de Peticion: Tiempo agotado de espera para la solicitud" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) Conexion cerrada sin enviar cabeceras" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) Cabecera de Peticion demasiada larga" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) Cliente SSL certificado erroneo" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) Client no proveyo certificado" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) Peticion HTTP enviada a puerto HTTPS" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "499 - (Nginx) Conexion cerrada por cliente mientras procesaba peticion" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - Error Interno de Servidor" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - No Implementado" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "502 - Entrada Erronea: Recibio respuesta invalida" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "" "503 - Servicio no disponible: El servidor actualmente no esta disponible" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "" "504 - Timeout de Gateway: El servidor upstream fallo al enviar peticion" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - Version HTTP no soportada" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - El servidor esta retornando un error desconocido" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - Servidor Web caido" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - Tiempo de espera de conexion agotado " #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - Origen es inaccesible" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - Ocurrio cese de tiempo" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - Sin Autorizacion: Peticion necesita autenticacion de usuario" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "Referidos" goaccess-1.9.3/po/pt_BR.po0000644000175000017300000006374114626466521011005 msgid "" msgstr "" "Project-Id-Version: Goaccess\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2019-04-25 20:34-0300\n" "Last-Translator: Alan Placidina Maria \n" "Language-Team: \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.5.4\n" #: src/labels.h:45 msgid "en" msgstr "pt-BR" #: src/labels.h:48 msgid "Exp. Panel" msgstr "Exp. Panel" #: src/labels.h:49 msgid "Help" msgstr "Ajuda" #: src/labels.h:50 msgid "Quit" msgstr "Sair" #: src/labels.h:51 msgid "Total" msgstr "Total" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] ASC [ ] DESC" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] ASC [x] DESC" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[Painel Ativo: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q]Sair GoAccess" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] Ajuda [Enter] Exp. Panel" #: src/labels.h:61 msgid "Dashboard" msgstr "Painel de Controle" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "Painel de Controle - Análise geral das requisições" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "Análise geral das requisições" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "Tx. Total" #: src/labels.h:66 msgid "Date/Time" msgstr "Data/Hora" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "Accesos IP Excl." #: src/labels.h:68 msgid "Failed Requests" msgstr "Req. Inválidas" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "" #: src/labels.h:70 msgid "Log Size" msgstr "Tamanho do Log" #: src/labels.h:71 msgid "Log Source" msgstr "Origem do Log" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "Referenciadores" #: src/labels.h:73 msgid "Total Requests" msgstr "Requisições" #: src/labels.h:74 msgid "Static Files" msgstr "Arquivos Estáticos" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "Não Encontrado" #: src/labels.h:76 msgid "Requested Files" msgstr "Req. Arquivos" #: src/labels.h:77 msgid "Unique Visitors" msgstr "Visitantes Únicos" #: src/labels.h:78 msgid "Valid Requests" msgstr "Req. Válidas" #: src/labels.h:81 msgid "Hits" msgstr "Requisições" #: src/labels.h:82 msgid "h%" msgstr "h%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "Visitantes" #: src/labels.h:84 msgid "Vis." msgstr "Vis." #: src/labels.h:85 msgid "v%" msgstr "v%" #: src/labels.h:87 msgid "Avg. T.S." msgstr "Méd. T.S." #: src/labels.h:88 msgid "Cum. T.S." msgstr "Cum. T.S." #: src/labels.h:89 msgid "Max. T.S." msgstr "Máx. T.S." #: src/labels.h:90 msgid "Method" msgstr "Método" #: src/labels.h:91 msgid "Mtd" msgstr "Mtd" #: src/labels.h:92 msgid "Protocol" msgstr "Protocolo" #: src/labels.h:93 msgid "Proto" msgstr "Proto" #: src/labels.h:94 msgid "City" msgstr "Cidade" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "Pais" #: src/labels.h:97 msgid "Hostname" msgstr "Hostname" #: src/labels.h:98 msgid "Data" msgstr "Dados" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "Requisições/Visitas" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "Visitantes únicos por dia" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "Visitantes únicos por dia" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "Requisições com o mesmo IP, data e agente são uma visita única." #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "Requisições" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Requisições ordenadas por requisições [, avgts, cumts, maxts, mthd, proto]" #: src/labels.h:117 msgid "Requests" msgstr "Requisições" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "Requisições Estáticas" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Requisições estáticas ordenadas por requisições [, avgts, cumts, maxts, " "mthd, proto]" #: src/labels.h:127 msgid "Time Distribution" msgstr "Requisições Por Hora" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Dados ordenados por hora [, avgts, cumts, maxts]" #: src/labels.h:131 msgid "Time" msgstr "Hora" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "Hosts Virtuais" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Dados ordenados por requisições [, avgts, cumts, maxts]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "Usuário Remoto (Autenticação HTTP)" #: src/labels.h:145 msgid "Remote User" msgstr "Usuário Remoto" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "" #: src/labels.h:152 msgid "Cache Status" msgstr "" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "URLs Não Encontradas (404)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "URLs não encontradas ordenadas por requisições [, avgts, cumts, maxts, mthd, " "proto]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "Endereços IPv4" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "Hosts de visitantes ordenados por requisições [, avgts, cumts, maxts]" #: src/labels.h:166 msgid "Hosts" msgstr "Hosts" #: src/labels.h:169 msgid "Operating Systems" msgstr "Sistemas Operacionais" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" "Sistemas Operacionais ordenados por requisições [, avgts, cumts, maxts]" #: src/labels.h:173 msgid "OS" msgstr "SO" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "Navegadores" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "Navegadores ordenados por requisições [, avgts, cumts, maxts]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "URLs Referenciadas" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" "Requisições referenciadas ordenadas por requisições [, avgts, cumts, maxts]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "Sites Referenciados" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "Sites referenciados ordenados por requisições [, avgts, cumts, maxts]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "Mecanismo de pesquisa do Google" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" "Frases-chave de busca ordenadas por requisições [, avgts, cumts, maxts]" #: src/labels.h:201 msgid "Keyphrases" msgstr "Frases-chave" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "Geo Localização" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "" "Continente/Pais ordenado por requisições únicas [, avgts, cumts, maxts]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "Codigos de Status HTTP" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" "Codigos de Status HTTP ordenados por requisições [, avgts, cumts, maxts]" #: src/labels.h:222 msgid "Status Codes" msgstr "Codigos de Status" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "" #: src/labels.h:227 msgid "File types shipped out" msgstr "" #: src/labels.h:232 msgid "Encryption settings" msgstr "" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "" #: src/labels.h:236 msgid "TLS Settings" msgstr "" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] distinguir maiúsculas" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] distinguir maiúsculas" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "Regex Permitidos - ^g para cancelar - TAB mudar caso" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "Encontrar padrão em todas as vistas" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "Configuração do Formato de Log" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[SPACE] para alternar - [ENTER] para prosseguir - [q] para sair" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "Formato de Log - [c] para adicionar/editar formato" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "Formato da Data - [d] para adicionar/editar formato" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "Formato da Hora - [t] para adicionar/editar formato" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[UP/DOWN] para rolar - [q] para fechar a janela" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "Agentes de Usuário para %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "Configuração de Esquema" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[ENTER] para usar esquema - [q]Sair" #: src/labels.h:276 msgid "Sort active module by" msgstr "Ordenar modulo ativo por" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[ENTER] selecionar - [TAB] ordenar - [q]Sair" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "Ajuda Rápida de GoAccess" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[UP/DOWN] para rolar - [q] para sair" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "" #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "Formato de Erros - Verifique seu formato de log/data/hora" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "Nenhum formato de data encontrado no seu arquivo de configuração" #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "Nenhum formato de log encontrado no seu arquivo de configuração" #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "Formato de hora não foi encontrado no seu arquivo de configuração" #: src/labels.h:300 msgid "No default config file found." msgstr "Nenhum arquivo de configuração padrão foi encontrado." #: src/labels.h:302 msgid "You may specify one with" msgstr "Você pode especificar uma largura" #: src/labels.h:304 msgid "producing the following errors" msgstr "produzindo os seguintes erros" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "Analizadas %1$d linhas" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "Por favor, informe abrindo um problema no GitHub" #: src/labels.h:310 msgid "Select a time format." msgstr "Selecione um formato de hora." #: src/labels.h:312 msgid "Select a date format." msgstr "Selecione um formato de data." #: src/labels.h:314 msgid "Select a log format." msgstr "Selecione um formato de log." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "'%1$s' painel está desativado" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "" #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "Para mais detalhes visite" #: src/labels.h:328 msgid "Last Updated" msgstr "Última atualização" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "Servidor WebSocket pronto para aceitar novas conexões de clientes" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "As seguintes opções também podem ser fornecidas para o comando" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "Exemplos podem ser encontrados executando" #: src/labels.h:338 msgid "Server Statistics" msgstr "Estatísticas do servidor" #: src/labels.h:340 msgid "Theme" msgstr "Tema" #: src/labels.h:342 msgid "Dark Gray" msgstr "Cinza Escuro" #: src/labels.h:344 msgid "Bright" msgstr "Claro" #: src/labels.h:346 msgid "Dark Blue" msgstr "Azul Escuro" #: src/labels.h:348 #, fuzzy msgid "Dark Purple" msgstr "Roxo Escuro" #: src/labels.h:350 msgid "Panels" msgstr "Painéis" #: src/labels.h:352 msgid "Items per Page" msgstr "Itens por página" #: src/labels.h:354 msgid "Tables" msgstr "Tabelas" #: src/labels.h:356 msgid "Display Tables" msgstr "Mostrar Tabelas" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "Ocultar em Dispositivos Pequenos" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "Ocultar tabelas em dispositivos pequenos" #: src/labels.h:362 msgid "Toggle Panel" msgstr "" #: src/labels.h:364 msgid "Layout" msgstr "Layout" #: src/labels.h:366 msgid "Horizontal" msgstr "Horizontal" #: src/labels.h:368 msgid "Vertical" msgstr "Vertical" #: src/labels.h:370 msgid "WideScreen" msgstr "" #: src/labels.h:372 msgid "File Options" msgstr "Opções de Arquivo" #: src/labels.h:374 msgid "Export as JSON" msgstr "Exportar como JSON" #: src/labels.h:376 msgid "Panel Options" msgstr "Opções do Painel" #: src/labels.h:378 msgid "Previous" msgstr "Anterior" #: src/labels.h:380 msgid "Next" msgstr "Próximo" #: src/labels.h:382 msgid "First" msgstr "Primeiro" #: src/labels.h:384 msgid "Last" msgstr "Último" #: src/labels.h:386 msgid "Chart Options" msgstr "Opções de Gráfico" #: src/labels.h:388 msgid "Chart" msgstr "Gráfico" #: src/labels.h:390 msgid "Type" msgstr "Tipo" #: src/labels.h:392 msgid "Area Spline" msgstr "Área Spline" #: src/labels.h:394 msgid "Bar" msgstr "Barra" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "Métrica de Plotagem" #: src/labels.h:400 msgid "Table Columns" msgstr "Colunas da Tabela" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx Informativo" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx Exito" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Redirecionamento" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx Erros do cliente" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx Erros do servidor" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "100 - Continuar: o servidor recebeu a parte inicial da requisição" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "101 - Protocolos de comutação: cliente pediu para alternar protocolos" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - OK: A requisição feita pelo cliente foi bem-sucedida" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - Criado: A requisição foi concluída e criada" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - Aceito: A requisição foi aceita para processar" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - Informações não autorizadas: resposta de terceiros" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - Nenhum conteúdo: A requisição não retornou nenhum conteúdo" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "" "205 - Redefinir conteúdo: O servidor pediu ao cliente para redefinir o " "documento" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - Conteúdo Parcial: O GET parcial foi bem-sucedido" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - Mútiplos-Status: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - Já Relatado: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - Múltiplas Opções: Múltiplas alternativas para o recurso" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - Movido Permanentemente: Recurso foi movido permanentemente" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - Movido Temporariamente (redirecionar)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - Consulte Outro Documento: A resposta está em uma URI diferente" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - Não Modificado: O recurso não foi modificado" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - Usar Proxy: Só pode ser acessado através do proxy" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - Redirecionamento Temporário: Recurso temporariamente movido" #: src/labels.h:457 #, fuzzy msgid "308 - Permanent Redirect" msgstr "402 - Pagamento Exigido" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - Solicitação Incorreta: A sintaxe da solicitação é inválida" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - Não Autorizado: Solicitação precisa de autenticação de usuário" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - Pagamento Exigido" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - Proibido: Servidor está se recusando a responder" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - Não Encontrado: Recurso solicitado não pôde ser encontrado" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - Método Não Permitido: Método de solicitação não suportado" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - Não Aceitável" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - Autenticação de Proxy Necessária" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "" "408 - Tempo Limite da Solicitação: O servidor expirou aguardando a " "solicitação" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - Conflito: Conflito no pedido" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - Foi: Recurso solicitado não está mais disponível" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - Comprimento Necessário: Comprimento de conteúdo inválido" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "" "412 - Falha na Pré-Condição: O servidor não atende às condições prévias" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - Payload Muito Grande" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - Requisição-URI muito longa" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - Tipo de Mídia Sem Suporte: Tipo de mídia não é suportado" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "" "416 - Intervalo da Requisição Não Satisfatório: Não é possível fornecer essa " "parte" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - Falha na Expectativa" #: src/labels.h:495 msgid "418 - I'm a teapot" msgstr "" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - Requisição Misdirected" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - Entidade Não Processável devido a erros semânticos: WebDAV" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - O recurso que está sendo acessado está bloqueado" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - Falha na Dependência: WebDAV" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "" "426 - Atualização Necessária: O cliente deve alternar para um protocolo " "diferente" #: src/labels.h:511 #, fuzzy msgid "428 - Precondition Required" msgstr "428 - Pré-Requisito Obrigatório" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "" "429 - Requisições Demasiadas: O utilizador enviou requisições demasiadamente" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 #, fuzzy msgid "431 - Request Header Fields Too Large" msgstr "431 - Campos de Cabeçalho de requisição muito grande" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "" "408 - Tempo Limite da Solicitação: O servidor expirou aguardando a " "solicitação" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - Indisponível Por Razões Legais" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) Conexão fechada sem enviar cabeçalhos" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) Cabeçalho da Requisição Muito Grande" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) Erro de certificado de cliente SSL" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) O cliente não forneceu certificado" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) Requisição HTTP enviada para a porta HTTPS" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "" "499 - (Nginx) Conexão fechada pelo cliente durante o processamento da " "requisição" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - Error Interno do Servidor" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - Não Implementado" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "502 - Gateway Inválido: Recebeu uma resposta inválida do upstream" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - Serviço Indisponível: O servidor está indisponível no momento" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "504 - Gateway timeout: O servidor upstream falhou ao enviar pedido" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - Versão HTTP Não Suportada" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - Servidor Web está retornando um erro desconhecido" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - Servidor Web está offline" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - A conexão expirou" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - A origem está inacessível" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - Ocorreu tempo limite" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - Não Autorizado: Solicitação precisa de autenticação de usuário" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "Referenciadores" goaccess-1.9.3/po/quot.sed0000644000175000017300000000023114613301665011076 s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g goaccess-1.9.3/po/sv.gmo0000644000175000017300000004541014626466521010564 3?;B~79<@?4B:$3(X 97"<"2_7475G}4667#L?p'5-=<z9A)B9\3D/<K%;#&*5/`-B/AE>A ;)%e'(% $1?.q   A& . 8 B L X %b  + + $ !!#! 7! X! f!q!! !!!!!0! ")"="O"T";Y" " """*"" "&#)# .#;##B#f### # # ####+##7$*K$+v$ $$$$$ $$%.% G%S%\%b%k% p%z%.% %!%%%&&,&B&W&m&& && & & & &&%'9('b'h'm'$' '3'<'5"(<X(:(F(@)GX)8))) )))*+&*R*g*v* ****7* **+"+5+Q+$f++4+)+! ,+,;,L,_,b,e,,Q,"-=-<:.w.8.3.9.<-/Dj/O/B/$B0)g0 02090( 1631/j1.1;12<2?S22/2127 3D3 Y3<z3#33,a4K44465JJ5 55<5!6!16ES66V6# 7F17*x7%7%7/758GU8 888=8K9Qe9979':(6:+_:): :::!:2:*"; M;Z;a; f; r;~;;;O;;; ; < < <1#<U<=Z<<<8< =='="A=d= v=== =====2>D>U>j>y>>:>> > >>)>? /?!9?[?a?s?6z??? ? ? ?@ @@@5&@)\@I@4@1A 7AEA^AaA%pAAAA>A B BB $B.B 6BDB3UBB%BBB BBCC5CKC[CsCC CC C CC$C8DODTDXD7hD DODNDILENEPEm6FdFa GTkGGGGGGH-HLHbH{HHHH H:H I II9IRIpI+I-ILI>+J4jJJJJJJJKey9uHG1%qz-b]KM\f7{Zh"^Yv#RmAw ;6U0gP~@,LB8n$[(TWV4}s Qk&t` 'ir3 xE5)F: |Od=p_/IJ!j< cN?CSD+l>aX*2o.'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsASNArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAutonomous System Numbers/Organizations (ASNs)Avg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDark PurpleDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesEncryption settingsExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFile types shipped outFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsIn-Memory with On-Disk Persistent Storage.Items per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog Parsing TimeLog SizeLog SourceMIME TypesMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No input data was provided nor there's data to restore.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTLS SettingsTLS version and picked algorithmTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatToggle PanelTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: goaccess 1.6 Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2018-12-13 22:48-0600 Last-Translator: Anders Johansson Language-Team: none Language: sv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); ’%1$s’ panelen är inaktiverad100 - Fortsätt: Servern mottog den första delen av begäran101 - Växlingsprotokoll: Klienten bad om att byta protokoll1xx Informativ200 - OK: Förfrågan som skickades av klienten lyckades201 - Skapad: Förfrågan har uppfyllts och skapats202 - Godkänd: Förfrågan har godkänts för behandling203 - Ej auktoritativ information: Svar från en tredje part204 - Inget innehåll: Förfrågan returnerade inte något innehåll205 - Återställ innehåll: Server bad klienten om att återställa dokumentet206 - Delvis innehåll: Den partiella GET har blivit framgångsrik207 - Multi-Status: WebDAV; RFC 4918208 - Redan rapporterad: WebDAV; RFC 58422xx Success300 - Flera val: Multipla alternativ för resursen301 - Flyttade permanent: Resursen har flyttats permanent302 - Flyttade tillfälligt (omdirigera)303 - Se annat dokument: Svaret finns på en annan URI304 - Ej modifierad: Resursen har inte ändrats305 - Använd proxy: Kan endast nås via proxy307 - Tillfällig omdirigering: Resurs flyttas tillfälligt3xx Omdirigering400 - Dålig begäran: Syntaxen för förfrågan är ogiltig401 - Ej auktoriserad: Begäran behöver användarautentisering402 - Betalning krävs403 - Förbud: Server vägrar att svara på det404 - Ej funnen: Begärd resurs kunde inte hittas405 - Metod Ej tillåtet: Förfrågan metod stöds inte406 - Ej acceptabelt407 - Proxy-autentisering krävs408 - Begär tidsavbrott: Server slutade vänta på begäran409 - Konflikt: Konflikt i begäran410 - Borta: Begärd resurs är inte längre tillgänglig410 - Gone: Resursförfrågan är inte längre tillgänglig, Skicka feedback411 - Krav längd: Ogiltigt innehållslängd412 - Förutsättning misslyckades: Server uppfyller inte förutsättningar413 - Belastningen för stor414 - Begär-URI för lång415 - Medietyp som inte stöds: Medietypen stöds inte416 - Begärd räckvidd Ej Tillfredställande: Kan inte leverera den delen417 - Förväntning misslyckades421 - Felriktad förfrågan422 - Obearbetad entitet på grund av semantiska fel: WebDAV423 - Resursen som nås är låst424 - Misslyckad beroende: WebDAV426 - Uppgradering krävs: Klienten ska byta till ett annat protokoll428 - Förutsättning krävs429 - För många förfrågningar: Användaren har skickat för många förfrågningar431 - Begär headerfält för stort444 - (Nginx) Anslutningen är stängd utan att skicka några rubriker451 - Ej tillgänglig för juridiska skäl494 - (Nginx) Begär Header För Stor495 - (Nginx) SSL-klientcertifikatfel496 - (Nginx) Klienten lämnade inte certifikat497 - (Nginx) HTTP-begäran skickad till HTTPS-porten499 - (Nginx) Anslutning sluten av klienten vid bearbetningsförfrågan4xx Klientel500 - Internt serverfel501 - Inte Implementerad502 - Dålig Gateway: Fick ett ogiltigt svar från uppströms503 - Service Otillgänglig: Servern är för närvarande inte tillgänglig504 - Gateway Timeout: Uppströms-servern misslyckades med att skicka förfrågan505 - HTTP-version stöds inte520 - CloudFlare - Webbserver returnerar ett okänt fel521 - CloudFlare - webbservern är nere522 - CloudFlare - Anslutningen avbröts523 - CloudFlare - Ursprung är oåtkomligt524 - CloudFlare - En timeout inträffade5xx ServerfelASNKurvaAutomatisk dölj på små enheterDölj automatiskt tabeller på små skärm enheterAutonoma systemnummer/organisationer (ASN)Genomsn. tidStapelLjusWebbläsareCachestatusDiagramDiagramalternativStadKontinent > Land sorterad i unika träffar [, genomst. tid, kum. tid, max. tid]LandKum. tidMörkblåMörkgråMörklilaDashboardDashboard - generellt analyserade förfrågningarDataData sorterat i träffar [, genomst. tid, kum. tid, max. tid]Data sorterade i timmar [, genomst. tid, kum. tid, max. tid]Datumformat - [d] för att lägga till / redigera formatDatum/TidSkärmtabellerKrypteringsinställningarExempel kan hittas genom att köraExkl. IP-träffarExp. PanelExportera som JSONMisslyckade förfrågningarFilalternativFiltyper skickas utHitta mönster i alla vyerFörstaFör mer information besökFel format - Kontrollera din logg /datum/tidformatGeografisk platsGoAccess snabbhjälpHTTP StatuskodHjälpTräffarTräffar med samma IP, datum och agent är unika besökareTräffar/BesökareHorisontellVärdnamnVärdarIn-Memory med On-Disk persistent lagring.Objekt per sidaNyckelordNyckelord från Googles sökmotorSistaSenast uppdateradLayoutLogformat - [c] för att lägga till / redigera formatLoggformat konfigurationAnalystid av loggarLoggstorlekLoggkällaMIME-typerMax. tidMetodMån till datumNästaInget datumformat hittades på din konfigurationsfil.Ingen standard konfiguationsfil hittades.Ingen ingångsdata tillhandahölls eller det finns data att återställa.Inget loggformat hittades på din konfigurationsfil.Inget tidsformat hittades i din konfigurationfil.Hittades inteHittar inte URL:en (404)OSOperativsystemGenerellt Analyserade förfrågningarPanelalternativPanelerAnalyserade %1$d linjerVar god rapportera det genom att öppna ett problem på GitHubPlotmetriskFöregåendeProtoProtokollAvslutaHänvisningarHänvisade sidorRegex tillåtet - ^ g för att avbryta - TAB-växlaFjärranvändareFjärranvändare (HTTP-autentisering)Begärda filerBegärda filer (URLer)UppslagningarSchemakonfigurationVälj ett datumformat.Välj ett loggformat.Välj ett tidsformat.ServerstatistikSortera aktiv modul medStatiska filerStatiska förfrågningarStatuskoderTLS-inställningarTLS-version och plockad algoritmTabellkolumnTabellerCachestatus för det visade objektetFöljande alternativ kan också levereras till kommandotTemaTidTidsfördelningTidsformat - [t] för att lägga till / redigera formatVäxla panelVanligast webbläsare sorterade i träffar [, genomst. tid, kum. tid, max. tid]Flest HTTP Statuskod sorterade i träffar [, genomst. tid, kum. tid, max. tid]Flest nyckelord sorterade i träffar [, genomst. tid, kum. tid, max. tid]Flest operativsystem sorterade i träffar [, genomst. tid, kum. tid, max. tid]Flest hänvisade sidor sorterade i träffar [, genomst. tid, kum. tid, max. tid]Flest ej hittade URL:er sorterade i träffar [, genomst. tid, kum. tid, max. tid, mån-till-dag, proto]proto]Flest förfrågingar sorterade i träffar [, genomst. tid, kum. tid, max. tid, mån-till-dag, proto]Toppförfrågningar sorterade i trufar [, genomst. tid, kum. tid, max. tid, mån-till-dag, proto]Flest besökares värdnamn sorterade i träffar [, genomst. tid, kum. tid, max. tid]TotaltTotal antal förfrågningarSkickad mängdTypUnika besökareUnika besökare per dagUnika besökare per dag - inkl. nätspindlarAnvändaragenter %1$sGilltiga förfrågningarVertikalVirtuella värdarBesök.Besökares Värdnamn och IP:sBesökareWebSocket-server redo att acceptera nya klientanslutningarWideScreenDu kan ange en med[ ] STIGANDE [x] FALLANDE[ ] skiftlägeskänsliga[?] Hjälp [Enter] Exp. Panel[Aktiv panel: %1$s][ENTER] välj - [TAB] sortera - [q] avsluta[ENTER] för att använda schema - [q]avsluta[SPACE] för att växla - [ENTER] för att fortsätta - [q] för att avsluta[UPP / NER] för att bläddra - [q] för att stänga fönstret[UP / DOWN] för att bläddra - [q] för att avsluta[q]Avsluta GoAccess[x] STIGANDE [ ] FALLANDE[x] skiftlägeskänsligasvh%producerar följande felv%goaccess-1.9.3/po/remove-potcdate.sin0000644000175000017300000000066014613301665013230 # Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } goaccess-1.9.3/po/it.po0000644000175000017300000006341114626466521010405 msgid "" msgstr "" "Project-Id-Version: Goaccess\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2017-08-04 13:00-0300\n" "Last-Translator: Mario Donnarumma \n" "Language-Team: \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.5.4\n" #: src/labels.h:45 msgid "en" msgstr "it" #: src/labels.h:48 msgid "Exp. Panel" msgstr "Exp. Panel" #: src/labels.h:49 msgid "Help" msgstr "Aiuto" #: src/labels.h:50 msgid "Quit" msgstr "Esci" #: src/labels.h:51 msgid "Total" msgstr "Totale" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] ASC [ ] DESC" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] ASC [x] DESC" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[Pannello Attivo: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q] chiudi GoAccess" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] Aiuto [Enter] Exp. Panel" #: src/labels.h:61 msgid "Dashboard" msgstr "Pannello di Controllo" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "Pannello di Controllo - Richieste Complessive Analizzate" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "Richieste Complessive Analizzate" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "Tx. Totale" #: src/labels.h:66 msgid "Date/Time" msgstr "Data/Ora" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "Accessi IP Esclusi" #: src/labels.h:68 msgid "Failed Requests" msgstr "Richieste Fallite" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "Tempo Parsing Log" #: src/labels.h:70 msgid "Log Size" msgstr "Dimensioni Log" #: src/labels.h:71 msgid "Log Source" msgstr "Sorgente Log" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "Referrer" #: src/labels.h:73 msgid "Total Requests" msgstr "Richieste Totali" #: src/labels.h:74 msgid "Static Files" msgstr "File Statici" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "Non Trovato" #: src/labels.h:76 msgid "Requested Files" msgstr "File Richiesti" #: src/labels.h:77 msgid "Unique Visitors" msgstr "Visitatori Unici" #: src/labels.h:78 msgid "Valid Requests" msgstr "Richieste Valide" #: src/labels.h:81 msgid "Hits" msgstr "Accessi" #: src/labels.h:82 msgid "h%" msgstr "h%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "Visitatori" #: src/labels.h:84 msgid "Vis." msgstr "Vis." #: src/labels.h:85 msgid "v%" msgstr "v%" #: src/labels.h:87 msgid "Avg. T.S." msgstr "Media T.S." #: src/labels.h:88 msgid "Cum. T.S." msgstr "Cum. T.S." #: src/labels.h:89 msgid "Max. T.S." msgstr "Max. T.S." #: src/labels.h:90 msgid "Method" msgstr "Metodo" #: src/labels.h:91 msgid "Mtd" msgstr "Mtd" #: src/labels.h:92 msgid "Protocol" msgstr "Protocollo" #: src/labels.h:93 msgid "Proto" msgstr "Proto" #: src/labels.h:94 msgid "City" msgstr "Città" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "Paese" #: src/labels.h:97 msgid "Hostname" msgstr "Hostname" #: src/labels.h:98 msgid "Data" msgstr "Dati" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "Acessi/Visitatori" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "Visitatori unici al giorno" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "Visitatori unici al giorno - Inclusi spider" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "Accessi con lo stesso IP, data e agent sono una visita unica." #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "File Richiesti (URL)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Principali richieste ordinate per accessi [, avgts, cumts, maxts, mthd, " "proto]" #: src/labels.h:117 msgid "Requests" msgstr "Richieste" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "Richieste Statiche" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Principali richieste statiche ordinate per accessi [, avgts, cumts, maxts, " "mthd, proto]" #: src/labels.h:127 msgid "Time Distribution" msgstr "Distribuzione Oraria" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Dati ordinati per ore [, avgts, cumts, maxts]" #: src/labels.h:131 msgid "Time" msgstr "Ora" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "Host Virtuali" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Dati ordinati per accessi [, avgts, cumts, maxts]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "Utente Remoto (Autenticazione HTTP)" #: src/labels.h:145 msgid "Remote User" msgstr "Utente Remoto" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "Lo stato della cache dell'oggetto servito" #: src/labels.h:152 msgid "Cache Status" msgstr "Stato Della Cache" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "URL Non Trovati (404)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Principali URL non trovati ordinati per accesso [, avgts, cumts, maxts, " "mthd, proto]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "Hostname e IP dei Visitatori" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" "Principali host dei visitatori ordinati per accessi [, avgts, cumts, maxts]" #: src/labels.h:166 msgid "Hosts" msgstr "Host" #: src/labels.h:169 msgid "Operating Systems" msgstr "Sistemi Operativi" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" "Principali Sistemi Operativi ordinati per accessi [, avgts, cumts, maxts]" #: src/labels.h:173 msgid "OS" msgstr "SO" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "Browser" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "Principali Browser ordinati per accessi [, avgts, cumts, maxts]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "URL Referrer" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" "Principali Referrer Richiesti ordinati per accessi [, avgts, cumts, maxts]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "Siti Referrer" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "Principali Siti Referrer ordinati per accessi [, avgts, cumts, maxts]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "Frasi chiave dal motore di ricerca di Google" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "Principali Frasi Chiave ordinate per accessi [, avgts, cumts, maxts]" #: src/labels.h:201 msgid "Keyphrases" msgstr "Frasi Chiave" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "Posizione Geografica" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "Continente > Paese ordinati per accessi unici [, avgts, cumts, maxts]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "Codici Di Stato HTTP" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" "Principali Codici Di Stato HTTP ordinati per accessi [, avgts, cumts, maxts]" #: src/labels.h:222 msgid "Status Codes" msgstr "Codici Di Stato" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "Tipi MIME" #: src/labels.h:227 msgid "File types shipped out" msgstr "Tipi di file spediti" #: src/labels.h:232 msgid "Encryption settings" msgstr "Impostazioni di crittografia" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "Versione TLS e algoritmo scelto" #: src/labels.h:236 msgid "TLS Settings" msgstr "Impostazioni TLS" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] case sensitive" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] case sensitive" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "Regex permesse - ^g per annullare - TAB cambia case" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "Trova pattern in tutte le viste" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "Configurazione Formato Log" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[SPAZIO] per alternare - [INVIO] per procedere - [q] per uscire" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "Formato Log - [c] per aggiungere/modificare formato" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "Formato Data - [d] per aggiungere/modificare formato" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "Formato Ora - [t] per aggiungere/modificare formato" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[SU/GIU] per scorrere - [q] per chiudere la finestra" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "User Agent per %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "Configurazione Schema" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[INVIO] per usare lo schema - [q] esci" #: src/labels.h:276 msgid "Sort active module by" msgstr "Ordina moduli attivi per" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[INVIO] seleziona - [TAB] ordina - [q] esci" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "Aiuto Rapido di GoAccess" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[SU/GIU] per scorrere - [q] per uscire" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "In Memoria con Archiviazione Persistente Su Disco." #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "Errori Formato - Verifica il tuo formato di log/data/ora" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "Nessun formato di data trovato nel tuo file di configurazione." #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "Nessun formato di log trovato nel tuo file di configurazione." #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "Nessun formato di ora trovato nel tuo file di configurazione." #: src/labels.h:300 msgid "No default config file found." msgstr "Nessuna file di configurazione predefinito trovato." #: src/labels.h:302 msgid "You may specify one with" msgstr "Puoi specificarne uno con" #: src/labels.h:304 msgid "producing the following errors" msgstr "producendo i seguenti errori" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "Analizzate %1$d righe" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "Per favore segnalalo aprendo un issue su GitHub" #: src/labels.h:310 msgid "Select a time format." msgstr "Seleziona un formato di ora." #: src/labels.h:312 msgid "Select a date format." msgstr "Seleziona un formato di data." #: src/labels.h:314 msgid "Select a log format." msgstr "Seleziona un formato di log." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "il pannello '%1$s' è disattivato" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "Non sono stati forniti dati in input né ci sono dati da ripristinare." #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "Per maggiori dettagli visita" #: src/labels.h:328 msgid "Last Updated" msgstr "Ultimo Aggiornamento" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "Server WebSocket pronto ad accettare nuove connessioni dai client" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "Le seguenti opzioni possono anche essere fornite al comando" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "Esempi possono trovati eseguendo" #: src/labels.h:338 msgid "Server Statistics" msgstr "Statistiche Server" #: src/labels.h:340 msgid "Theme" msgstr "Tema" #: src/labels.h:342 msgid "Dark Gray" msgstr "Grigio Scuro" #: src/labels.h:344 msgid "Bright" msgstr "Chiaro" #: src/labels.h:346 msgid "Dark Blue" msgstr "Blu Scuro" #: src/labels.h:348 msgid "Dark Purple" msgstr "Viola Scuro" #: src/labels.h:350 msgid "Panels" msgstr "Pannelli" #: src/labels.h:352 msgid "Items per Page" msgstr "Elementi per Pagina" #: src/labels.h:354 msgid "Tables" msgstr "Tabelle" #: src/labels.h:356 msgid "Display Tables" msgstr "Mostra Tabelle" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "Nascondi su Schermi Piccoli" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "Nascondi automaticamente le tabelle su Schermi Piccoli" #: src/labels.h:362 msgid "Toggle Panel" msgstr "" #: src/labels.h:364 msgid "Layout" msgstr "Layout" #: src/labels.h:366 msgid "Horizontal" msgstr "Orizzontale" #: src/labels.h:368 msgid "Vertical" msgstr "Verticale" #: src/labels.h:370 msgid "WideScreen" msgstr "Panoramico" #: src/labels.h:372 msgid "File Options" msgstr "Opzioni File" #: src/labels.h:374 msgid "Export as JSON" msgstr "Esporta come JSON" #: src/labels.h:376 msgid "Panel Options" msgstr "Opzioni Pannello" #: src/labels.h:378 msgid "Previous" msgstr "Precedente" #: src/labels.h:380 msgid "Next" msgstr "Successivo" #: src/labels.h:382 msgid "First" msgstr "Primo" #: src/labels.h:384 msgid "Last" msgstr "Ultimo" #: src/labels.h:386 msgid "Chart Options" msgstr "Opzioni Grafico" #: src/labels.h:388 msgid "Chart" msgstr "Grafico" #: src/labels.h:390 msgid "Type" msgstr "Tipo" #: src/labels.h:392 msgid "Area Spline" msgstr "Area Spline" #: src/labels.h:394 msgid "Bar" msgstr "Barre" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "Metriche Grafico" #: src/labels.h:400 msgid "Table Columns" msgstr "Colonne Tabella" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx Informativo" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx Successo" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Reindirizzamento" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx Errori Client" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx Errori Server" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "" "100 - Continue: Il server ha ricevuto la parte iniziale della richiesta" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "" "101 - Switching Protocols: Il client ha richiesto di cambiare protocolli" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - OK: La richiesta inviata dal client ha avuto successo" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - Created: La richiesta è stata soddisfatta e creata" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - Accepted: La richiesta è stata accettata per essere elaborata" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - Non-authoritative Information: Risposta da terzi" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - No Content: La richiesta non ha restituito nessun contenuto" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "" "205 - Reset Content: Il server ha richiesto al client di ripristinare il " "documento" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - Partial Content: La GET parziale ha avuto successo" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - Multi-Status: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - Already Reported: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - Multiple Choices: Opzioni multiple per la risorsa" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - Moved Permanently: La risorsa è stata spostata permanentemente" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - Moved Temporarily (redirect)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - See Other Document: La risposta si trova ad un URI diverso" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - Not Modified: La risorsa non è stata modificata" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - Use Proxy: Può essere acceduta solo tramite proxy" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - Temporary Redirect: Risorsa spostata temporaneamente" #: src/labels.h:457 msgid "308 - Permanent Redirect" msgstr "308 - Permanent Redirect" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - Bad Request: La sintassi della richiesta non è valida" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - Unauthorized: La richiesta richiede l'autenticazione dell'utente" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - Payment Required" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - Forbidden: Il server si sta rifiutando di rispondere" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - Not Found: La risorsa richiesta non è stata trovata" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - Method Not Allowed: Il metodo della richiesta non è supportato" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - Not Acceptable" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - Proxy Authentication Required" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "408 - Request Timeout: Il tempo per inviare la richiesta è scaduto" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - Conflict: Conflitto nella richiesta" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - Gone: La risorsa richiesta non è più disponibile" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - Length Required: Content-Length non valido" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "412 - Precondition Failed: Il server non soddisfa le precondizioni" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - Payload Too Large" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - Request-URI Too Long" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - Unsupported Media Type: Tipo media non supportato" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "" "416 - Requested Range Not Satisfiable: Impossibile fornire quel frammento" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - Expectation Failed" #: src/labels.h:495 #, fuzzy msgid "418 - I'm a teapot" msgstr "418 - I’m a teapot" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - Misdirected Request" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - Unprocessable Entity" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - Locked" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - Failed Dependency: WebDAV" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "" "426 - Upgrade Required: Il cliente dovrebbe utilizzare un protocollo diverso" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "402 - Precondition Required" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 - Too Many Requests: L'utente ha inviato troppe richieste" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 - Request Header Fields Too Large" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "408 - Request Timeout: Il tempo per inviare la richiesta è scaduto" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - Unavailable For Legal Reasons" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) Connection closed without sending any headers" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) Request Header Too Large" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) SSL client certificate error" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) Client didn't provide certificate" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) HTTP request sent to HTTPS port" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "499 - (Nginx) Connection closed by client while processing request" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - Internal Server Error" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - Not Implemented" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "502 - Bad Gateway: Risposta non valida dal server di upstream" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - Service Unavailable: Il server non è attualmente disponibile" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "" "504 - Gateway Timeout: Il server di upstream non è riuscito ad inviare la " "richiesta" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - HTTP Version Not Supported" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - Web server is returning an unknown error" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - Web server is down" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - Connection timed out" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - Origin is unreachable" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - A timeout occurred" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - Unauthorized: La richiesta richiede l'autenticazione dell'utente" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "Referrer" goaccess-1.9.3/po/stamp-po0000644000175000017300000000001214626466521011100 timestamp goaccess-1.9.3/po/ru.po0000644000175000017300000007373714626466521010433 msgid "" msgstr "" "Project-Id-Version: goaccess 1.5.6\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2022-04-21 10:17+0300\n" "Last-Translator: Artyom Karlov \n" "Language-Team: \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3.1\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" #: src/labels.h:45 msgid "en" msgstr "ru" #: src/labels.h:48 msgid "Exp. Panel" msgstr "Разв. панель" #: src/labels.h:49 msgid "Help" msgstr "Помощь" #: src/labels.h:50 msgid "Quit" msgstr "Выход" #: src/labels.h:51 msgid "Total" msgstr "Всего" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] ВОЗР [ ] УБЫВ" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] ВОЗР [x] УБЫВ" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[Активная панель: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q] Выйти из GoAccess" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] Помощь [Enter] Разв. панель" #: src/labels.h:61 msgid "Dashboard" msgstr "Дашборд" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "Дашборд - Проанализированные запросы" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "Проанализированные запросы" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "Исх. трафик" #: src/labels.h:66 msgid "Date/Time" msgstr "Дата/время" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "Хитов с искл. IP" #: src/labels.h:68 msgid "Failed Requests" msgstr "Неудачных запросов" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "Время парсинга лога" #: src/labels.h:70 msgid "Log Size" msgstr "Размер лога" #: src/labels.h:71 msgid "Log Source" msgstr "Источник лога" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "Ссыл. страниц" #: src/labels.h:73 msgid "Total Requests" msgstr "Всего запросов" #: src/labels.h:74 msgid "Static Files" msgstr "Статических файлов" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "Не найдено" #: src/labels.h:76 msgid "Requested Files" msgstr "Запрошенных файлов" #: src/labels.h:77 msgid "Unique Visitors" msgstr "Уникальных посетителей" #: src/labels.h:78 msgid "Valid Requests" msgstr "Валидных запросов" #: src/labels.h:81 msgid "Hits" msgstr "Хиты" #: src/labels.h:82 msgid "h%" msgstr "х%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "Посетители" #: src/labels.h:84 msgid "Vis." msgstr "Пос." #: src/labels.h:85 msgid "v%" msgstr "п%" #: src/labels.h:87 msgid "Avg. T.S." msgstr "Ср. в. о." #: src/labels.h:88 msgid "Cum. T.S." msgstr "Общ. в.о." #: src/labels.h:89 msgid "Max. T.S." msgstr "Макс. в.о." #: src/labels.h:90 msgid "Method" msgstr "Метод" #: src/labels.h:91 msgid "Mtd" msgstr "Мтд" #: src/labels.h:92 msgid "Protocol" msgstr "Протокол" #: src/labels.h:93 msgid "Proto" msgstr "Прот." #: src/labels.h:94 msgid "City" msgstr "Город" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "Страна" #: src/labels.h:97 msgid "Hostname" msgstr "Имя хоста" #: src/labels.h:98 msgid "Data" msgstr "Данные" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "Хиты/посетители" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "Уникальные посетители по дням" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "Уникальные посетители по дням - Включая пауков" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "" "Хиты, имеющие одинаковые IP, дату и юзер-агента, считаются уникальным " "посещением." #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "Запрошенные файлы (URL'ы)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Топ запросов, отсортированных по хитам [, ср., общ, макс. вр. обсл., методу, " "протоколу]" #: src/labels.h:117 msgid "Requests" msgstr "Запросы" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "Статические запросы" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Топ статических запросов, отсортированных по хитам [, ср., общ, макс. вр. " "обсл., методу, протоколу]" #: src/labels.h:127 msgid "Time Distribution" msgstr "Распределение по времени" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Данные, отсортированные по часам [, ср., общ, макс. вр. обсл.]" #: src/labels.h:131 msgid "Time" msgstr "Время" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "Виртуальные хосты" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Данные, отсортированные по хитам [, ср., общ, макс. вр. обсл.]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "Удалённый пользователь (HTTP-аутентификация)" #: src/labels.h:145 msgid "Remote User" msgstr "Удалённый пользователь" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "Статус кеша обслуживаемого объекта" #: src/labels.h:152 msgid "Cache Status" msgstr "Статус кеша" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "Ненайденные URL'ы (404-е)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Топ ненайденных URL'ов, отсортированных по хитам [, ср., общ, макс. вр. " "обсл., методу, протоколу]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "Имена хостов и IP посетителей" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ хостов посетителей, отсортированных по хитам [, ср., общ, макс. вр. " "обсл.]" #: src/labels.h:166 msgid "Hosts" msgstr "Хосты" #: src/labels.h:169 msgid "Operating Systems" msgstr "Операционные системы" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ операционных систем, отсортированных по хитам [, ср., общ, макс. вр. " "обсл.]" #: src/labels.h:173 msgid "OS" msgstr "ОС" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "Браузеры" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "Топ браузеров, отсортированных по хитам [, ср., общ, макс. вр. обсл.]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "Ссылающиеся страницы" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ ссылающихся страниц, отсортированных по хитам [, ср., общ, макс. вр. " "обсл.]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "Ссылающиеся сайты" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ ссылающихся сайтов, отсортированных по хитам [, ср., общ, макс. вр. " "обсл.]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "Ключевые слова из поисковой системы Google" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ ключевых слов, отсортированных по хитам [, ср., общ, макс. вр. обсл.]" #: src/labels.h:201 msgid "Keyphrases" msgstr "Ключевые слова" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "Географическое расположение" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "" "Континенты > страны, отсортированные по уникальным хитам [, ср., общ, макс. " "вр. обсл.]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "Коды ответов HTTP" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ кодов ответов HTTP, отсортированных по хитам [, ср., общ, макс. вр. " "обсл.]" #: src/labels.h:222 msgid "Status Codes" msgstr "Коды ответов" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "MIME-типы" #: src/labels.h:227 msgid "File types shipped out" msgstr "Типы отправленных файлов" #: src/labels.h:232 msgid "Encryption settings" msgstr "Настройки шифрования" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "Версия TLS и выбранный алгоритм" #: src/labels.h:236 msgid "TLS Settings" msgstr "Настройки TLS" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] учитывать регистр" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] учитывать регистр" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "Разрешены рег. выражения - ^g отмена - TAB учёт регистра" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "Поиск шаблона во всех панелях" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "Настройка формата лога" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[ПРОБЕЛ] переключение - [ENTER] обработать - [q] выйти" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "Формат лога - [c] добавить/изменить формат" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "Формат даты - [d] добавить/изменить формат" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "Формат времени - [t] добавить/изменить формат" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[ВВЕРХ/ВНИЗ] прокрутка - [q] закрыть окно" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "Юзер-агенты для %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "Настройка схемы" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[ENTER] использовать схему - [q] выйти" #: src/labels.h:276 msgid "Sort active module by" msgstr "Сортировка активного модуля" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[ENTER] выбрать - [TAB] порядок - [q] выйти" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "Быстрая помощь по GoAccess" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[ВВЕРХ/ВНИЗ] прокрутка - [q] выйти" #: src/labels.h:288 #, fuzzy msgid "In-Memory with On-Disk Persistent Storage." msgstr "В памяти с хранением на диске." #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "Ошибки формата - Проверьте ваш формат лога/даты/времени" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "Формат даты в вашей конфигурационном файле не найден." #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "Формат лога в вашем конфигурационном файле не найден." #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "Формат времени в вашем конфигурационном файле не найден." #: src/labels.h:300 msgid "No default config file found." msgstr "Стандартный конфигурационный файл не найден." #: src/labels.h:302 msgid "You may specify one with" msgstr "Вы можете задать его с помощью" #: src/labels.h:304 msgid "producing the following errors" msgstr "приводит к следующим ошибкам" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "Обработано %1$d строк" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "Пожалуйста, сообщите об этом, открыв issue на GitHub" #: src/labels.h:310 msgid "Select a time format." msgstr "Выберите формат времени." #: src/labels.h:312 msgid "Select a date format." msgstr "Выберите формат даты." #: src/labels.h:314 msgid "Select a log format." msgstr "Выберите формат лога." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "Панель '%1$s' отключена" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "Не предоставлено ни входных данных, ни данных для восстановления." #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "Подробности по ссылке" #: src/labels.h:328 msgid "Last Updated" msgstr "Последнее обновление" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "WebSocket-сервер готов к приёму новых соединений" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "Следующие опции также могут использоваться с командой" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "Примеры можно найти, запустив" #: src/labels.h:338 msgid "Server Statistics" msgstr "Статистика сервера" #: src/labels.h:340 msgid "Theme" msgstr "Тема" #: src/labels.h:342 msgid "Dark Gray" msgstr "Тёмно-серая" #: src/labels.h:344 msgid "Bright" msgstr "Светлая" #: src/labels.h:346 msgid "Dark Blue" msgstr "Тёмно-синяя" #: src/labels.h:348 msgid "Dark Purple" msgstr "Тёмно-фиолетовая" #: src/labels.h:350 msgid "Panels" msgstr "Панели" #: src/labels.h:352 msgid "Items per Page" msgstr "Элементов на странице" #: src/labels.h:354 msgid "Tables" msgstr "Таблицы" #: src/labels.h:356 msgid "Display Tables" msgstr "Показывать таблицы" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "Автоскрытие на маленьких устройствах" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "Автоматически скрывать таблицы на устройствах с маленькими экранами" #: src/labels.h:362 msgid "Toggle Panel" msgstr "Переключение панели" #: src/labels.h:364 msgid "Layout" msgstr "Расположение" #: src/labels.h:366 msgid "Horizontal" msgstr "Горизонтальное" #: src/labels.h:368 msgid "Vertical" msgstr "Вертикальное" #: src/labels.h:370 msgid "WideScreen" msgstr "Широкоэкранное" #: src/labels.h:372 msgid "File Options" msgstr "Файловые опции" #: src/labels.h:374 msgid "Export as JSON" msgstr "Экспорт в JSON" #: src/labels.h:376 msgid "Panel Options" msgstr "Настройки панели" #: src/labels.h:378 msgid "Previous" msgstr "Предыдущая" #: src/labels.h:380 msgid "Next" msgstr "Следующая" #: src/labels.h:382 msgid "First" msgstr "Первая" #: src/labels.h:384 msgid "Last" msgstr "Последняя" #: src/labels.h:386 msgid "Chart Options" msgstr "Настройки диаграммы" #: src/labels.h:388 msgid "Chart" msgstr "Диаграмма" #: src/labels.h:390 msgid "Type" msgstr "Тип" #: src/labels.h:392 msgid "Area Spline" msgstr "Сглаженные области" #: src/labels.h:394 msgid "Bar" msgstr "Столбцы" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "Единицы измерения" #: src/labels.h:400 msgid "Table Columns" msgstr "Колонки таблицы" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx Информационные" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx Успешные" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Перенаправления" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx Ошибки клиента" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx Ошибки сервера" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "100 - Continue: Сервер получил начальную часть запроса" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "101 - Switching Protocols: Клиент запросил переключение протокола" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - OK: Запрос клиента выполнен успешно" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - Created: Запрос клиента выполнен и создан новый ресурс" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - Accepted: Запрос принят на обработку" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - Non-authoritative Information: Ответ не из первичного источника" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - No Content: Запрос не вернул никакого контента" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "205 - Reset Content: Сервер попросил клиента сбросить документ" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - Partial Content: Частичный GET-запрос выполнен успешно" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - Multi-Status: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - Already Reported: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "" "300 - Multiple Choices: Ресурс имеет несколько вариантов предоставления" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - Moved Permanently: Ресурс перемещён на постоянной основе" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - Moved Temporarily (временный редирект)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - See Other Document: Ответ находится по другому URI" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - Not Modified: Ресурс не изменялся" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - Use Proxy: Доступ только через прокси" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - Temporary Redirect: Ресурс временно перемещён" #: src/labels.h:457 #, fuzzy msgid "308 - Permanent Redirect" msgstr "402 - Payment Required" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - Bad Request: Неверный синтаксис запроса" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - Unauthorized: Запрос требует аутентификации" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - Payment Required" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - Forbidden: Сервер отказался предоставить ответ" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - Not Found: Запрошенный ресурс не найден" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - Method Not Allowed: Метод запроса не поддерживается" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - Not Acceptable" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - Proxy Authentication Required" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "408 - Request Timeout: Сервер не дождался запроса" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - Conflict: Конфликтный запрос" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - Gone: Запрошенный ресурс больше недоступен" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - Length Required: Неверный Content-Length" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "412 - Precondition Failed: Сервер не выполнил предварительные условия" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - Payload Too Large" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - Request-URI Too Long" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - Unsupported Media Type: Тип медиа не поддерживается" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "416 - Requested Range Not Satisfiable: Часть не может быть доставлена" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - Expectation Failed" #: src/labels.h:495 #, fuzzy msgid "418 - I'm a teapot" msgstr "418 - I’m a teapot" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - Misdirected Request" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - Unprocessable Entity due to semantic errors: WebDAV" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - The resource that is being accessed is locked" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - Failed Dependency: WebDAV" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "426 - Upgrade Required: Клиент должен переключить протокол" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "428 - Precondition Required" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 - Too Many Requests: Клиент отправил слишком много запросов" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 - Request Header Fields Too Large" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "408 - Request Timeout: Сервер не дождался запроса" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - Unavailable For Legal Reasons" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) Connection closed without sending any headers" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) Request Header Too Large" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) SSL client certificate error" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) Client didn't provide certificate" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) HTTP request sent to HTTPS port" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "499 - (Nginx) Connection closed by client while processing request" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - Internal Server Error" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - Not Implemented" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "" "502 - Bad Gateway: Сервер, действующий как шлюз, получил недопустимый ответ" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - Service Unavailable: Сервер недоступен" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "" "504 - Gateway Timeout: Сервер, действующий как шлюз, не дождался ответа" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - HTTP Version Not Supported" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - Web server is returning an unknown error" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - Web server is down" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - Connection timed out" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - Origin is unreachable" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - A timeout occurred" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - Unauthorized: Запрос требует аутентификации" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "Ссыл. страниц" goaccess-1.9.3/po/uk.po0000644000175000017300000007377714626466521010430 msgid "" msgstr "" "Project-Id-Version: goaccess 1.5.6\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2022-04-21 10:17+0300\n" "Last-Translator: Artyom Karlov \n" "Language-Team: \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3.1\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" #: src/labels.h:45 msgid "en" msgstr "uk" #: src/labels.h:48 msgid "Exp. Panel" msgstr "Розг. панель" #: src/labels.h:49 msgid "Help" msgstr "Допомога" #: src/labels.h:50 msgid "Quit" msgstr "Вихід" #: src/labels.h:51 msgid "Total" msgstr "Всього" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] ЗБІЛ [ ] ЗМЕН" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] ЗБІЛ [x] ЗМЕН" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[Активна панель: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q] Вийти з GoAccess" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] Допомога [Enter] Розг. панель" #: src/labels.h:61 msgid "Dashboard" msgstr "Дашборд" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "Дашборд - Проаналізовані запити" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "Проаналізовані запити" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "Вих. трафік" #: src/labels.h:66 msgid "Date/Time" msgstr "Дата/час" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "Хітів з викл. IP" #: src/labels.h:68 msgid "Failed Requests" msgstr "Невдалих запитів" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "Час парсингу лога" #: src/labels.h:70 msgid "Log Size" msgstr "Розмір лога" #: src/labels.h:71 msgid "Log Source" msgstr "Джерело лога" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "Посил. сторінок" #: src/labels.h:73 msgid "Total Requests" msgstr "Всього запитів" #: src/labels.h:74 msgid "Static Files" msgstr "Статичних файлів" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "Не знайдено" #: src/labels.h:76 msgid "Requested Files" msgstr "Запитаних файлів" #: src/labels.h:77 msgid "Unique Visitors" msgstr "Унікальних відвідувачів" #: src/labels.h:78 msgid "Valid Requests" msgstr "Валідних запитів" #: src/labels.h:81 msgid "Hits" msgstr "Хіти" #: src/labels.h:82 msgid "h%" msgstr "х%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "Відвідувачі" #: src/labels.h:84 msgid "Vis." msgstr "Відв." #: src/labels.h:85 msgid "v%" msgstr "в%" #: src/labels.h:87 msgid "Avg. T.S." msgstr "Сер. ч. о." #: src/labels.h:88 msgid "Cum. T.S." msgstr "Заг. ч. о." #: src/labels.h:89 msgid "Max. T.S." msgstr "Макс. ч. о." #: src/labels.h:90 msgid "Method" msgstr "Метод" #: src/labels.h:91 msgid "Mtd" msgstr "Мтд" #: src/labels.h:92 msgid "Protocol" msgstr "Протокол" #: src/labels.h:93 msgid "Proto" msgstr "Прот." #: src/labels.h:94 msgid "City" msgstr "Місто" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "Країна" #: src/labels.h:97 msgid "Hostname" msgstr "Ім'я хоста" #: src/labels.h:98 msgid "Data" msgstr "Дані" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "Хіти/відвідувачі" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "Унікальні відвідувачі по днях" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "Унікальні відвідувачі по днях - Включаючи павуків" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "" "Хіти, що мають однакові IP, дату та юзер-агента, вважаються унікальним " "відвідуванням." #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "Запитані файли (URL'и)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Топ запитів, відсортованих за хітами [, сер., заг., макс. часом обсл., " "методом, протоколом]" #: src/labels.h:117 msgid "Requests" msgstr "Запити" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "Статичні запити" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Том статичних запитів, відсортованих за хітами [, сер., заг., макс. часом " "обсл., методом, протоколом]" #: src/labels.h:127 msgid "Time Distribution" msgstr "Розподіл за часом" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Дані, відсортовані за годинами [, сер., заг., макс. часом обсл.]" #: src/labels.h:131 msgid "Time" msgstr "Час" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "Віртуальні хости" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Дані, відсортовані за хітами [, сер., заг., макс. часом обсл.]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "Віддалений користувач (HTTP-аутентифікація)" #: src/labels.h:145 msgid "Remote User" msgstr "Віддалений користувач" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "Статус кеша об'єкта, що обслуговується" #: src/labels.h:152 msgid "Cache Status" msgstr "Статус кеша" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "Незнайдені URL'и (404-і)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Топ незнайдених URL'ів, відсортованих за хітами [, сер., заг., макс. часом " "обсл., методом, протоколом]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "Імена хостів та IP відвідувачів" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ хостів відвідувачів, відсортованих за хітами [, сер., заг., макс. часом " "обсл.]" #: src/labels.h:166 msgid "Hosts" msgstr "Хости" #: src/labels.h:169 msgid "Operating Systems" msgstr "Операційні системи" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ операційних систем, відсортованих за хітами [, сер., заг., макс. часом " "обсл.]" #: src/labels.h:173 msgid "OS" msgstr "ОС" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "Браузери" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ браузерів, відсортованих за хітами [, сер., заг., макс. часом обсл.]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "Сторінки, що посилаються" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ сторінок, що посилаються, відсортованих за хітами [, сер., заг., макс. " "часом обсл.]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "Сайти, що посилаються" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ сайтів, що посилаються, відсортованих за хітами [, сер., заг., макс. " "часом обсл.]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "Ключові слова з пошукової системи Google" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "" "Том ключових слів, відсортованих за хітами [, сер., заг., макс. часом обсл.]" #: src/labels.h:201 msgid "Keyphrases" msgstr "Ключові слова" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "Географічне розташування" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "" "Континенти > країни, відсортовані за унікальними хітами [, сер., заг., макс. " "часом обсл.]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "Коди відповідей HTTP" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "" "Топ кодів відповідей HTTP, відсортованих за хітами [, сер., заг., макс. " "часом обсл.]" #: src/labels.h:222 msgid "Status Codes" msgstr "Коди відповідей" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "MIME-типи" #: src/labels.h:227 msgid "File types shipped out" msgstr "Типи відправлених файлів" #: src/labels.h:232 msgid "Encryption settings" msgstr "Налаштування шифрування" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "Версія TLS та вибраний алгоритм" #: src/labels.h:236 msgid "TLS Settings" msgstr "Налаштування TLS" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] враховувати регістр" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] враховувати регістр" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "Дозволені рег. вирази - ^g відміна - TAB врах. регістру" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "Пошук шаблону в усіх панелях" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "Налаштування формату лога" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[SPACE] переключення - [ENTER] обробити - [q] вийти" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "Формат логу - [c] додати/змінити формат" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "Формат дати - [d] додати/змінити формат" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "Формат часу - [t] додати/змінити формат" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[ВГОРУ/ВНИЗ] прокрутка - [q] закрити вікно" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "Юзер-агенти для %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "Налаштування схеми" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[ENTER] використовувати схему - [q] вийти" #: src/labels.h:276 msgid "Sort active module by" msgstr "Сортування активного модуля" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[ENTER] обрати - [TAB] порядок - [q] вийти" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "Швидка допомога по GoAccess" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[ВГОРУ/ВНИЗ] прокрутка - [q] вийти" #: src/labels.h:288 #, fuzzy msgid "In-Memory with On-Disk Persistent Storage." msgstr "У пам'яті зі зберіганням на диску." #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "Помилки формату - Перевірте ваш формат лога/дати/часу" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "Формат дати у вашому конфігураційному файлі не знайдений." #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "Формат лога у вашому конфігураційному файлі не знайдений." #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "Формат часу у вашому конфігураційному файлі не знайдений." #: src/labels.h:300 msgid "No default config file found." msgstr "Стандартний конфігураційний файл не знайдений." #: src/labels.h:302 msgid "You may specify one with" msgstr "Ви можете задати його за допомогою" #: src/labels.h:304 msgid "producing the following errors" msgstr "призводить до наступних помилок" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "Оброблено %1$d рядків" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "Будь ласка, повідомте про це, відкривши issue на GitHub" #: src/labels.h:310 msgid "Select a time format." msgstr "Оберіть формат часу." #: src/labels.h:312 msgid "Select a date format." msgstr "Оберіть формат дати." #: src/labels.h:314 msgid "Select a log format." msgstr "Оберіть формат лога." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "Панель '%1$s' відключена" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "Не надано ні вхідних даних, ні даних для відновлення." #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "Подробиці за посиланням" #: src/labels.h:328 msgid "Last Updated" msgstr "Останнє оновлення" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "WebSocket-сервер готовий до прийому нових з'єднань" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "Наступні опції також можуть використовуватися з командою" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "Приклади можна знайти, запустивши" #: src/labels.h:338 msgid "Server Statistics" msgstr "Статистика сервера" #: src/labels.h:340 msgid "Theme" msgstr "Тема" #: src/labels.h:342 msgid "Dark Gray" msgstr "Темно-сіра" #: src/labels.h:344 msgid "Bright" msgstr "Світла" #: src/labels.h:346 msgid "Dark Blue" msgstr "Темно-синя" #: src/labels.h:348 msgid "Dark Purple" msgstr "Темно-фіолетова" #: src/labels.h:350 msgid "Panels" msgstr "Панелі" #: src/labels.h:352 msgid "Items per Page" msgstr "Елементів на сторінці" #: src/labels.h:354 msgid "Tables" msgstr "Таблиці" #: src/labels.h:356 msgid "Display Tables" msgstr "Показувати таблиці" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "Автоприховування на маленьких пристроях" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "Автоматично приховувати таблиці на пристроях з маленькими екранами" #: src/labels.h:362 msgid "Toggle Panel" msgstr "Перемикання панелі" #: src/labels.h:364 msgid "Layout" msgstr "Розташування" #: src/labels.h:366 msgid "Horizontal" msgstr "Горизонтальне" #: src/labels.h:368 msgid "Vertical" msgstr "Вертикальне" #: src/labels.h:370 msgid "WideScreen" msgstr "Широкоекранне" #: src/labels.h:372 msgid "File Options" msgstr "Файлові опції" #: src/labels.h:374 msgid "Export as JSON" msgstr "Експорт в JSON" #: src/labels.h:376 msgid "Panel Options" msgstr "Налаштування панелі" #: src/labels.h:378 msgid "Previous" msgstr "Попередня" #: src/labels.h:380 msgid "Next" msgstr "Наступна" #: src/labels.h:382 msgid "First" msgstr "Перша" #: src/labels.h:384 msgid "Last" msgstr "Остання" #: src/labels.h:386 msgid "Chart Options" msgstr "Налаштування діаграми" #: src/labels.h:388 msgid "Chart" msgstr "Диаграма" #: src/labels.h:390 msgid "Type" msgstr "Тип" #: src/labels.h:392 msgid "Area Spline" msgstr "Згладжені області" #: src/labels.h:394 msgid "Bar" msgstr "Стовпці" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "Одиниці виміру" #: src/labels.h:400 msgid "Table Columns" msgstr "Колонки таблиці" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx Інформаційні" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx Успішні" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Перенаправлення" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx Помилки клієнта" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx Помилки сервера" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "100 - Continue: Сервер отримав початкову частину запиту" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "101 - Switching Protocols: Клієнт запросив переключення протоколу" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - OK: Запит клієнта виконаний успішно" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - Created: Запит клієнта виконаний і створений новий ресурс" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - Accepted: Запит прийнятий на обробку" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - Non-authoritative Information: Відповідь не з первинного джерела" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - No Content: Запит не повернув ніякого контенту" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "205 - Reset Content: Сервер попросив клієнта скинути документ" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - Partial Content: Частковий GET-запит виконаний успішно" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - Multi-Status: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - Already Reported: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - Multiple Choices: Ресурс має кілька варіантів надання" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - Moved Permanently: Ресурс переміщений на постійній основі" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - Moved Temporarily (тимчасовий редирект)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - See Other Document: Відповідь знаходиться за іншим URI" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - Not Modified: Ресурс не змінювався" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - Use Proxy: Доступ тільки через проксі" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - Temporary Redirect: Ресурс тимчасово переміщений" #: src/labels.h:457 #, fuzzy msgid "308 - Permanent Redirect" msgstr "402 - Payment Required" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - Bad Request: Невірний синтаксис запиту" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - Unauthorized: Запит вимагає аутентифікації" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - Payment Required" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - Forbidden: Сервер відмовився надати відповідь" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - Not Found: Запитаний ресурс не знайдений" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - Method Not Allowed: Метод запиту не підтримується" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - Not Acceptable" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - Proxy Authentication Required" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "408 - Request Timeout: Сервер не дочекався запиту" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - Conflict: Конфліктний запит" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - Gone: Запитаний ресурс більше недоступний" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - Length Required: Невірний Content-Length" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "412 - Precondition Failed: Сервер не виконав попередні умови" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - Payload Too Large" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - Request-URI Too Long" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - Unsupported Media Type: Тип медіа не підтримується" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "416 - Requested Range Not Satisfiable: Частина не може бути доставлена" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - Expectation Failed" #: src/labels.h:495 #, fuzzy msgid "418 - I'm a teapot" msgstr "418 - I’m a teapot" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - Misdirected Request" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - Unprocessable Entity due to semantic errors: WebDAV" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - The resource that is being accessed is locked" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - Failed Dependency: WebDAV" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "426 - Upgrade Required: Клієнт повинен переключити протокол" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "428 - Precondition Required" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 - Too Many Requests: Клієнт відправив занадто багато запитів" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 - Request Header Fields Too Large" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "408 - Request Timeout: Сервер не дочекався запиту" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - Unavailable For Legal Reasons" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) Connection closed without sending any headers" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) Request Header Too Large" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) SSL client certificate error" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) Client didn't provide certificate" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) HTTP request sent to HTTPS port" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "499 - (Nginx) Connection closed by client while processing request" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - Internal Server Error" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - Not Implemented" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "" "502 - Bad Gateway: Сервер, який діє як шлюз, отримав недійсну відповідь" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - Service Unavailable: Сервер недоступний" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "" "504 - Gateway Timeout: Сервер, який діє як шлюз, не дочекався відповіді" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - HTTP Version Not Supported" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - Web server is returning an unknown error" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - Web server is down" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - Connection timed out" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - Origin is unreachable" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - A timeout occurred" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - Unauthorized: Запит вимагає аутентифікації" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "Посил. сторінок" goaccess-1.9.3/po/fr.gmo0000644000175000017300000004405714626466521010551 < ?;67H9<@48Bm:$( 99E7"<27J47554L66#?('h5-=2J9eA93ND<%@;f#&*/-HBvA>?A~ ;%'C(k% 1 %/3: CP VdAi    %++2$^       " 09 j w    ;    !&!>! C!P!#W!{!! ! !!!!+!!* "+7" c"m"""" """." #####,# 1#;#.K# z#!######$$0$ F$S$ c$ p$~$%$9$$$$$%3'%<[%5%<%: &FF&@&G&8'O'U' d'o't''+'''' '(("(7+( c(n((((($()4 ))U)!))))))))Q)O+Dj+I++7 ,5D,@z,5,9,[+-/-(-'- .:.RO.*.G.8/>N/A//8/L0e0/{0D0B031'H1Op1'1<14%2DZ2"22E2K'3s33E3.3#4SA4"4B4248.5,g5-5-5456%6Q\6666<6D27]w7!7<7'480\8/8:88 99K>9 999 9 9 999>9!: &: 0: <:H:6X::1:2:6: 4;?;9U; ; ;;;;,;<"<DA<<< <<<L< = ='=.= >='H=p=x= =4== = = >>>>>$>3c>A>A> ?'?A?D?$]????@?? @@ @!@)@1@6A@x@+@@ @@ @A!4AVAnAAA AAA!AFAABHBNB4fB:B:B8CGJC>CNCG DOhD8DDD EEE,E'GEoEE EEE#E ECE (F 5FVFgFFF0F/FBG<YG1GGGGHH H,HsKo8bJ4 56}#$ t%1-GC&3wz"FxuN UPv|+m/kAIhD~7YEW2!X*_H{TOg rl q,y;VfLc\>(<d^Z]0R QB`)M=ae:?9p[i'jSn.@'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAvg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.HorizontalHostnameHostsItems per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog SizeLog SourceMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: goaccess 1.4 Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2020-07-10 11:44+0200 Last-Translator: Coban L. Language-Team: français Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); '%1$s' panneau désactivé100 - Continue: Le serveur a reçu la partie initiale de la requête101 - Echange de Protocoles: Le client a demandé à changer de protocole1xx Informationnel200 - OK: La requête envoyée par le client a réussie201 - Created: La requête a été aboutie et créée202 - Accepté: La requête a été acceptée pour être traité203 - Information sans autorité: Réponse d'un tiers204 - Aucun contenu: La requête ne renvoie aucun contenu205 - Contenu réinitialisé: Le serveur a demandé au client de réinitialiser le document206 - Contenu partiel: Le GET partiel a réussi207 - Status-multiples: WebDAV; RFC 4918208 - Déjà signalé: WebDAV; RFC 58422xx Succès300 - Choix multiples: Options multiples pour la ressource301 - Déplacement permanent: La ressource a été déplacée de façon permanente302 - Temporairement déplacé (redirigé)303 - Voir autre document: La réponse se situe sur une URI différente304 - Non modifié: La ressource n'a pas été modifiée305 - Utiliser un Proxy : Accessible seulement depuis le proxy307 - Redirection temporaire: Ressource temporairement déplacée3xx Redirection400 - Mauvaise requête: Syntaxe de la requête invalide401 - Non autorisé: La requête nécessite une authentification utilisateur402 - Paiement requis403 - Interdit: Le serveur refuse d'y répondre404 - Non trouvé: La ressource demandée ne peut pas être trouvée405 - Méthode non autorisée: Méthode de requête non supportée406 - Pas Acceptable407 - Authentification au proxy requise408 - Requête expirée: Délai d'attente du serveur dépassé pour la requête409 - Conflit: Conflit dans la requête410 - Disparue: La ressource demandée n'est plus disponible411 - Longueur requise: Longueur du contenu invalide412 - Pré-requis échoué: Le serveur ne rempli pas les pré-requis413 - Charge utile trop importante414 - URI requête trop longue415 - Type de média non supporté : Type de media non pris en charge416 - Plage de requête non satisfaisante: ne peut pas fournir cette partie417 - Attente échouée421 - Requête mal orientée422 - Entité non traitable à cause des erreurs sémantiques: WebDAV423 - L'accès à la ressource est verrouillé424 - Dépendance échouée: WebDAV426 - Amélioration requise: Le client devrait changer pour un protocole différent428 - Condition préalable requise429 : Trop de requêtes: L'utilisateur a envoyé trop de requêtes431 - Le champ en-tête de requête est trop large444 - (Nginx) Connexion fermée sans envoyer d'en-têtes451 - Indisponible pour des raisons légales494 - (Nginx) En-tête de requête trop large495 - (Nginx) Erreur de certificat SSL client496 - (Nginx) Le client ne fournit pas de certificat497 - (Nginx) Requête HTTP envoyée sur le port HTTPS499 - (Nginx) Connexion fermée par le client durant le traitement de la requête4xx Erreurs Client500 - Erreur serveur interne501 - Non implémenté502 - Mauvaise passerelle: Réponse invalide reçue en amont503 - Service indisponible: Le serveur est actuellement indisponible504 - Attente passerelle dépassé: l'envoi de la requête en amont par le serveur a échoué505 - Version HTTP non supportée520 - CloudFlare - Le serveur Web renvoi une erreur inconnue521 - CloudFlare - Serveur Web en panne522 - CloudFlare - Délai de connexion dépassé523 - CloudFlare - L'Origin n'est pas joignable524 - CloudFlare - Un dépassement du délai s'est produit5xx Erreurs ServeurCourbe vectorielleMasquage-auto/Petits appareilsMasquer automatiquement les tableaux sur les appareils avec un petit écranAvg. T.S.BarreBrillantNavigateursEtat du cacheGraphiqueOptions du graphiqueVilleContinent > Pays trié par hits unique [, avgts, cumts, maxts]PaysCum. T.S.Bleu foncéGris foncéTableau de bordTableau de bord - Requêtes analysées, vue d'ensembleDonnéesDonnées triées par hits [, avgts, cumts, maxts]Données triées par heure [, avgts, cumts, maxts]Format de la date - [d] pour ajouter/éditer le formatDate/HeureAfficher les tableauxDes exemples peuvent être trouvés en cours d'exécutionExcl. IP HitsDév. PanneauExporter en tant que JSONRequêtes échouéesOptions de fichierTrouver tous les motifs dans toutes les vuesPremierPour plus de détails, visitezErreurs de format - Vérifiez votre format de journal / date / heureGéo LocalisationGoAccess aide rapideStatus HTTPAideHitsLes hits depuis la même IP, date et user-agent comptent comme visite uniqueHorizontalNom d'hôteHôtesObjets par pageMot-clésMot-clés du moteur de recherche GoogleDernierDernière mise à jourDispositionFormat des logs - [c] pour ajouter/éditer le formatConfiguration format des logsTaille logFichier logMax. T.S.MéthodeMtdSuivantAucun format de date n'a été trouvé sur votre fichier conf.Aucun fichier de configuration par défaut trouvé.Aucun format de journal n'a été trouvé sur votre fichier conf.Aucun format de journal n'a été trouvé sur votre fichier conf.Non TrouvéURLs Non trouvées (404s)SESystèmes d'exploitationRequêtes analysées, vue d'ensembleOptions du panneauPanneauxAnalysé %1$d lignesSi vous plaît, rapporter cela en ouvrant un probleme sur GitHubTracé métriquePrécédentProtoProtocoleQuitterOrigineSites d'origineRegex OK - ^g pour annuler - TAB pour changer la casseRemote UtilisateurUtilisateur distant (authentification HTTP)Fichiers demandés (URLs)RequêtesConfiguration programmeSélectionner un format de date.Sélectionner un format de log.Sélectionner un format temporel.Statistiques du serveurTrier le module actif parFichiers statiquesRequêtes statiquesStatus HTTPColonnes de tableauTableauxL'état du cache de l'objet serviLes options suivantes peuvent également être fournies à la commandeThèmeTempsDistribution temporelleFormat temporel - [t] pour ajouter/éditer le formatTop des Navigateurs trié par hits [, avgts, cumts, maxts]Top des status HTTP trié par hits [, avgts, cumts, maxts]Top des Mot-clés trié par hits [, avgts, cumts, maxts]Top des systèmes d'exploitation trié par hits [, avgts, cumts, maxts]Top des sites d'origine trié par hits [, avgts, cumts, maxts]Top des URLs non trouvées trié par hits [, avgts, cumts, maxts, mthd, proto]Top des requêtes triées par hits [, avgts, cumts, maxts, mthd, proto]Top des requêtes statiques trié par hits [, avgts, cumts, maxts, mthd, proto]Top des visiteurs trié par hits [, avgts, cumts, maxts]TotalRequêtes totalesTx. MontantTypeVisiteurs uniquesVisiteurs uniques par jourVisiteurs uniques/jour - Y compris botsUser Agents pour %1$sRequêtes validesVerticaleHôtes virtuelsVis.Nom de machine et IPs des visiteursVisiteursWebSocket serveur prêt à accepter les nouvelles connexions clientGrand écranVous pouvez en préciser un avec[ ] ASC [x] DESC[ ] sensible à la casse[?] Aide [Enter] Dév. Panneau[Panneau Actif: %1$s][ENTREE] sélectionner - [TAB] trier - [q]uitter[ENTREE] pour utiliser le programme - [q]uitter[SPACE] pour basculer - [ENTREE] pour procéder - [q] pour quitter[HAUT/BAS] pour faire défiler - [q] pour fermer la fenêtre[HAUT/BAS] pour faire défiler - [q] pour quitter[q]uitter GoAccess[x] ASC [ ] DESC[x] sensible à la cassefrh%produisant les erreurs suivantesv%goaccess-1.9.3/po/LINGUAS0000644000175000017300000000005014613301666010436 de es fr ja ko sv zh_CN pt_BR ru uk it goaccess-1.9.3/po/POTFILES.in0000644000175000017300000000011014613301666011163 # List of source files which contain translatable strings. src/labels.h goaccess-1.9.3/po/zh_CN.po0000644000175000017300000006226114626466521010774 msgid "" msgstr "" "Project-Id-Version: goaccess 1.5.6\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2017-04-03 09:43+0200\n" "Last-Translator: Ai\n" "Language-Team: Ai\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Gtranslator 2.91.7\n" #: src/labels.h:45 msgid "en" msgstr "zh-CN" #: src/labels.h:48 msgid "Exp. Panel" msgstr "展开面板" #: src/labels.h:49 msgid "Help" msgstr "帮助" #: src/labels.h:50 msgid "Quit" msgstr "退出" #: src/labels.h:51 msgid "Total" msgstr "总共" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] 递增 [ ] 递减" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] 递增 [x] 递减" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[当前面板: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q]退出GoAccess" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?]帮助 [回车]展开面板" #: src/labels.h:61 msgid "Dashboard" msgstr "概览" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "概览-所有已分析的请求" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "所有已分析的请求" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "数据传输量" #: src/labels.h:66 msgid "Date/Time" msgstr "时期/时间" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "过滤来自此IP的请求" #: src/labels.h:68 msgid "Failed Requests" msgstr "失败的请求" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "日志解析耗时" #: src/labels.h:70 msgid "Log Size" msgstr "日志大小" #: src/labels.h:71 msgid "Log Source" msgstr "日志文件夹地址" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "来源地址" #: src/labels.h:73 msgid "Total Requests" msgstr "所有请求" #: src/labels.h:74 msgid "Static Files" msgstr "静态文件" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "未找到(404)" #: src/labels.h:76 msgid "Requested Files" msgstr "请求的文件" #: src/labels.h:77 msgid "Unique Visitors" msgstr "独立访客" #: src/labels.h:78 msgid "Valid Requests" msgstr "有效的请求" #: src/labels.h:81 msgid "Hits" msgstr "点击量" #: src/labels.h:82 msgid "h%" msgstr "" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "访客" #: src/labels.h:84 msgid "Vis." msgstr "访客" #: src/labels.h:85 msgid "v%" msgstr "" #: src/labels.h:87 msgid "Avg. T.S." msgstr "平均响应时" #: src/labels.h:88 msgid "Cum. T.S." msgstr "总共响应时" #: src/labels.h:89 msgid "Max. T.S." msgstr "最高响应时" #: src/labels.h:90 msgid "Method" msgstr "请求方法" #: src/labels.h:91 msgid "Mtd" msgstr "请求方法" #: src/labels.h:92 msgid "Protocol" msgstr "协议" #: src/labels.h:93 msgid "Proto" msgstr "协议" #: src/labels.h:94 msgid "City" msgstr "城市" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "国家" #: src/labels.h:97 msgid "Hostname" msgstr "主机名" #: src/labels.h:98 msgid "Data" msgstr "数据" #: src/labels.h:100 msgid "Hits/Visitors" msgstr "点击量/访客" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "每日独立访客" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "每日独立访客 - 包括网络机器人" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "来自同一IP、时间和Http用户代理的多次点击被视作一次访问" #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "请求的文件" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "请求排序按 [点击量, 平均响应时, 总共响应时, 最高响应时, 请求方法, 协议]" #: src/labels.h:117 msgid "Requests" msgstr "请求" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "静态请求" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "静态请求排序按 [点击量, 平均响应时, 总共响应时, 最高响应时, 请求方法, 协议]" #: src/labels.h:127 msgid "Time Distribution" msgstr "时间分配" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "数据列排序按 [小时, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:131 msgid "Time" msgstr "时间" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "虚拟主机" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "数据列排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "已认证用户(HTTP authentication)" #: src/labels.h:145 msgid "Remote User" msgstr "已认证用户" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "服务对象的缓存状态" #: src/labels.h:152 msgid "Cache Status" msgstr "缓存状态" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "未找到的URLs" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "未找到的URLs排序按 [点击量, 平均响应时, 总共响应时, 最高响应时, 请求方法, 协" "议]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "访客主机名和IP地址" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "访客主机排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:166 msgid "Hosts" msgstr "主机" #: src/labels.h:169 msgid "Operating Systems" msgstr "操作系统" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "操作系统排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:173 msgid "OS" msgstr "操作系统" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "浏览器" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "浏览器排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "来源地址URLs" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "来源地址排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "推荐网站" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "推荐网站排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "谷歌搜索关键字" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "关键字排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:201 msgid "Keyphrases" msgstr "关键字" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "地理位置" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "大陆 > 国家排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "HTTP状态码" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "HTTP状态码排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]" #: src/labels.h:222 msgid "Status Codes" msgstr "状态码" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "MIME 类型" #: src/labels.h:227 msgid "File types shipped out" msgstr "发出的文件类型" #: src/labels.h:232 msgid "Encryption settings" msgstr "加密设置" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "TLS 版本和挑选算法" #: src/labels.h:236 msgid "TLS Settings" msgstr "TLS 设置" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] 区分大小写" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] 区分大小写" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "允许正则表达式 - ^g退出 - TAB改变大小写" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "在所有界面中查找匹配模式" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "日志格式设置" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[空格]切换 - [回车]继续 - [q]退出" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "日志格式 - [c]新建/修改格式" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "日期格式 - [d]新建/修改格式" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "时间格式 - [t]新建/修改格式" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[UP/DOWN]上下滚动 - [q]退出" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "用户代理 %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "颜色方案设置" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[回车]选取方案 - [q]退出" #: src/labels.h:276 msgid "Sort active module by" msgstr "当前选择栏目排序" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[回车]选择 - [TAB]排序 - [q]退出" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "GoAccess快速帮助" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[UP/DOWN]上下滚动 - [q]退出" #: src/labels.h:288 msgid "In-Memory with On-Disk Persistent Storage." msgstr "具有磁盘持久存储的内存中" #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "格式错误 - 请检查你的日志/日期/时间格式" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "未在配置文件中设置日期格式" #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "未在配置文件中设置日志格式" #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "未在配置文件中设置时间格式" #: src/labels.h:300 msgid "No default config file found." msgstr "未找到默认的配置文件" #: src/labels.h:302 msgid "You may specify one with" msgstr "你可以指定配置文件" #: src/labels.h:304 msgid "producing the following errors" msgstr "出现以下错误" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "已解析 %1$d 行" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "请在GitHub中添加一个issue来给我们反馈信息" #: src/labels.h:310 msgid "Select a time format." msgstr "选择时间格式" #: src/labels.h:312 msgid "Select a date format." msgstr "选择日期格式" #: src/labels.h:314 msgid "Select a log format." msgstr "选择日志格式" #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "'%1$s' 面板已禁用" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "没有提供输入数据,也没有要恢复的数据" #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "更多信息请访问" #: src/labels.h:328 msgid "Last Updated" msgstr "最近更新" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "WebSocket服务器已准备接收来自客户的连接" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "你也可以在command中选择以下选项" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "运行一下指令查看更多示例" #: src/labels.h:338 msgid "Server Statistics" msgstr "服务器统计信息" #: src/labels.h:340 msgid "Theme" msgstr "主题" #: src/labels.h:342 msgid "Dark Gray" msgstr "深黑" #: src/labels.h:344 msgid "Bright" msgstr "明亮" #: src/labels.h:346 msgid "Dark Blue" msgstr "深蓝" #: src/labels.h:348 #, fuzzy msgid "Dark Purple" msgstr "深紫色" #: src/labels.h:350 msgid "Panels" msgstr "面板" #: src/labels.h:352 msgid "Items per Page" msgstr "每页项目" #: src/labels.h:354 msgid "Tables" msgstr "表格" #: src/labels.h:356 msgid "Display Tables" msgstr "显示表格" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "屏幕过小时自动隐藏" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "屏幕过小时自动隐藏表格" #: src/labels.h:362 msgid "Toggle Panel" msgstr "切换面板" #: src/labels.h:364 msgid "Layout" msgstr "布局" #: src/labels.h:366 msgid "Horizontal" msgstr "横向" #: src/labels.h:368 msgid "Vertical" msgstr "纵向" #: src/labels.h:370 msgid "WideScreen" msgstr "宽屏" #: src/labels.h:372 msgid "File Options" msgstr "文件选项" #: src/labels.h:374 msgid "Export as JSON" msgstr "导出为JSON文件" #: src/labels.h:376 msgid "Panel Options" msgstr "面板选项" #: src/labels.h:378 msgid "Previous" msgstr "后退" #: src/labels.h:380 msgid "Next" msgstr "前进" #: src/labels.h:382 msgid "First" msgstr "" #: src/labels.h:384 msgid "Last" msgstr "" #: src/labels.h:386 msgid "Chart Options" msgstr "图表选项" #: src/labels.h:388 msgid "Chart" msgstr "图表" #: src/labels.h:390 msgid "Type" msgstr "类型" #: src/labels.h:392 msgid "Area Spline" msgstr "AreaSpline图表" #: src/labels.h:394 msgid "Bar" msgstr "条形图" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "绘制度量" # change #: src/labels.h:400 msgid "Table Columns" msgstr "表格列" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx 消息" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx 成功" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Url重定向" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx 客户端错" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx 服务器错" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "100 - 继续: 服务器已经接收到请求头" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "101 - 更改协议: 客户端被通知变更协议来完成请求" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - 成功: 请求成功" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - 已创建: 请求成功并且服务器创建了新的资源" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - 已接收: 服务器已接受请求,但尚未处理" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - 非授权信息: 服务器已成功处理请求 但返回的信息可能来自另一来源" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - 无内容: 没有返回任何内容" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "205 - 重置内容: 服务器已成功处理请求 但没有返回任何内容" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - 部分内容: 服务器成功处理了部分GET请求" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - 多状态: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - 已报告: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - 多重选择: 资源提供多种选项让客户端选择" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "301 - 永久移除: 资源已被永久移动到新位置" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - 临时移动" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - 查看其他位置: 当前请求的响应在另一个URI上被找到" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - 未修改: 资源未被修改" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - 使用代理: 只能通过代理访问资源" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - 临时重定向: 临时从另外的URI响应" #: src/labels.h:457 #, fuzzy msgid "308 - Permanent Redirect" msgstr "402 - 需要支付" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - 错误请求: 客户端语法错误" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "401 - 未授权: 当前请求需要用户授权" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - 需要支付" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - 禁止: 服务器拒绝响应请求" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - 未找到: 找不到请求的资源" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - 方法禁用: 不支持请求中指定的方法" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - 无法接收" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - 需要代理授权" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "408 - 请求超时: 服务器在等候请求时超时" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - 冲突: 服务器在完成请求时发生冲突" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - 已删除: 请求的资源已永久删除" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - 需要有效长度: Content-Length无效" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "412 - 未满足前提条件: 服务器未满足请求中的前提条件" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - 请求实体过大" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - 请求的URI过长" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - 不支持的媒体类型" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "416 - 请求范围不符合要求" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - 未满足期望值" #: src/labels.h:495 msgid "418 - I'm a teapot" msgstr "418 - 我是一个茶壶" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - 被误导的请求" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - 请求格式正确但因存在语法错而无法响应" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - 当前资源被锁定" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - 失败的依赖" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "426 - 需要升级: 客户端应该切换到其他的协议" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "428 - 需要前提条件" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 - 请求过多: 客户端发送了太多请求" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 - 请求头字段太长" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "408 - 请求超时: 服务器在等候请求时超时" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - 因法律原因不可用" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) 未发送响应头且连接已关闭" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) 请求头太大" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) SSL客户端证书错" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) 客户端未提供证书" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) HTTP请求被发送到了HTTPS端口" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "499 - (Nginx) 处理请求时连接被客户端关闭" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - 服务器内部错" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - 尚未实施" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "502 - 错误网关: 服务器作为网关或代理, 从上游服务器收到无效响应" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - 服务不可用: 服务器无法使用" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "504 - 网关超时: 服务器作为网关或代理, 未从上游服务器收到请求" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - HTTP版本不受支持" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - 服务器返回一个未知错误" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - 服务器挂了" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - 连接超时" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - 服务器无法访问" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - 服务器响应超时" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "401 - 未授权: 当前请求需要用户授权" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "来源地址" goaccess-1.9.3/po/ru.gmo0000644000175000017300000005454314626466521010571 3 ?;N7`9<@4PB:$(( Q9]7"<2/7b475M4d66#?@'5-= Jb9}A9,3fD<%X;~#&*/0-`BA>WA ;%5'[(% 1  =GKR [h n|A     %% +* +V $   !!! -!:!Q!k!q!0! !!!!!;! 2" @"K"T"Z" i"&t"" ""#"""# # # !#+#2#6#+;#g#7#*#+# $$4$7$I$ c$q$x$.$ $$$$$ $$.$ +%!7%Y%i%%%%%%%% && $& 1& >& _&m&%t&9&&&&$& '3#'<W'5'<':(FB(@(G(8)K)Q) `)k)p))+)))) ))**7'* _*j*****$**4+)Q+!{+++++++++&-X-d+. .E.c.A[/a/R/cR0Z0$1(61_1rt1_1=G2O282B3JQ3"3E3L4R4Ti4F4U5[5#p5H535Q66c6k677Q97_778983X88Y89a"9%9;9#9& :*1:/\:-:B::;9;{O;<;o< x<;<%<'<(#=%L=r=#=E== |>>>>>>%> ?? ?????@D @ e@ir@i@JFAA#A'A6A(BCBZB#qBB.B6B C($CeMC5C)CD 0D=DFDDDE &E(1EZEIvEE'EEJF*_F$FFF FF F GGb#GSGxGbSHhHI&3IZI'_I3II I$IT J!bJJ JJ JJ!J_J+ZKOK#K*K%L4L'RL'zL-L#L4L#)M%MMsMM7MMMANdINN N.NPN%BOvhOO}bPPjQQR/SS eTpTTT+T7TU U!bU!UU!UU4UVQ3VV7VV%V/W%JW>pW<WWWFDX9XXX%X"Y%Y5)Y_Ycv9sGF1%ow-`[IKZd7xXf"\Wt#PkA ;6S0eN{|@,JB8l$Y(R~UT4zq Oi&}r^ 'gp3 uE5): yMb=n]/H!h< aL?CQD+j>_V*2m.'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAvg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDark PurpleDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesEncryption settingsExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFile types shipped outFind pattern in all viewsFirstFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsItems per PageKeyphrasesKeyphrases from Google's search engineLastLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog Parsing TimeLog SizeLog SourceMIME TypesMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No input data was provided nor there's data to restore.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTLS SettingsTLS version and picked algorithmTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatToggle PanelTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenh%producing the following errorsv%Project-Id-Version: goaccess 1.5.6 Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2022-04-21 10:17+0300 Last-Translator: Artyom Karlov Language-Team: Language: ru MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 2.3.1 Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2); Панель '%1$s' отключена100 - Continue: Сервер получил начальную часть запроса101 - Switching Protocols: Клиент запросил переключение протокола1xx Информационные200 - OK: Запрос клиента выполнен успешно201 - Created: Запрос клиента выполнен и создан новый ресурс202 - Accepted: Запрос принят на обработку203 - Non-authoritative Information: Ответ не из первичного источника204 - No Content: Запрос не вернул никакого контента205 - Reset Content: Сервер попросил клиента сбросить документ206 - Partial Content: Частичный GET-запрос выполнен успешно207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Успешные300 - Multiple Choices: Ресурс имеет несколько вариантов предоставления301 - Moved Permanently: Ресурс перемещён на постоянной основе302 - Moved Temporarily (временный редирект)303 - See Other Document: Ответ находится по другому URI304 - Not Modified: Ресурс не изменялся305 - Use Proxy: Доступ только через прокси307 - Temporary Redirect: Ресурс временно перемещён3xx Перенаправления400 - Bad Request: Неверный синтаксис запроса401 - Unauthorized: Запрос требует аутентификации402 - Payment Required403 - Forbidden: Сервер отказался предоставить ответ404 - Not Found: Запрошенный ресурс не найден405 - Method Not Allowed: Метод запроса не поддерживается406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Сервер не дождался запроса409 - Conflict: Конфликтный запрос410 - Gone: Запрошенный ресурс больше недоступен411 - Length Required: Неверный Content-Length412 - Precondition Failed: Сервер не выполнил предварительные условия413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Тип медиа не поддерживается416 - Requested Range Not Satisfiable: Часть не может быть доставлена417 - Expectation Failed421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Клиент должен переключить протокол428 - Precondition Required429 - Too Many Requests: Клиент отправил слишком много запросов431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Ошибки клиента500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Сервер, действующий как шлюз, получил недопустимый ответ503 - Service Unavailable: Сервер недоступен504 - Gateway Timeout: Сервер, действующий как шлюз, не дождался ответа505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Ошибки сервераСглаженные областиАвтоскрытие на маленьких устройствахАвтоматически скрывать таблицы на устройствах с маленькими экранамиСр. в. о.СтолбцыСветлаяБраузерыСтатус кешаДиаграммаНастройки диаграммыГородКонтиненты > страны, отсортированные по уникальным хитам [, ср., общ, макс. вр. обсл.]СтранаОбщ. в.о.Тёмно-синяяТёмно-сераяТёмно-фиолетоваяДашбордДашборд - Проанализированные запросыДанныеДанные, отсортированные по хитам [, ср., общ, макс. вр. обсл.]Данные, отсортированные по часам [, ср., общ, макс. вр. обсл.]Формат даты - [d] добавить/изменить форматДата/времяПоказывать таблицыНастройки шифрованияПримеры можно найти, запустивХитов с искл. IPРазв. панельЭкспорт в JSONНеудачных запросовФайловые опцииТипы отправленных файловПоиск шаблона во всех панеляхПерваяПодробности по ссылкеОшибки формата - Проверьте ваш формат лога/даты/времениГеографическое расположениеБыстрая помощь по GoAccessКоды ответов HTTPПомощьХитыХиты, имеющие одинаковые IP, дату и юзер-агента, считаются уникальным посещением.Хиты/посетителиГоризонтальноеИмя хостаХостыЭлементов на страницеКлючевые словаКлючевые слова из поисковой системы GoogleПоследняяПоследнее обновлениеРасположениеФормат лога - [c] добавить/изменить форматНастройка формата логаВремя парсинга логаРазмер логаИсточник логаMIME-типыМакс. в.о.МетодМтдСледующаяФормат даты в вашей конфигурационном файле не найден.Стандартный конфигурационный файл не найден.Не предоставлено ни входных данных, ни данных для восстановления.Формат лога в вашем конфигурационном файле не найден.Формат времени в вашем конфигурационном файле не найден.Не найденоНенайденные URL'ы (404-е)ОСОперационные системыПроанализированные запросыНастройки панелиПанелиОбработано %1$d строкПожалуйста, сообщите об этом, открыв issue на GitHubЕдиницы измеренияПредыдущаяПрот.ПротоколВыходСсыл. страницСсылающиеся сайтыРазрешены рег. выражения - ^g отмена - TAB учёт регистраУдалённый пользовательУдалённый пользователь (HTTP-аутентификация)Запрошенных файловЗапрошенные файлы (URL'ы)ЗапросыНастройка схемыВыберите формат даты.Выберите формат лога.Выберите формат времени.Статистика сервераСортировка активного модуляСтатических файловСтатические запросыКоды ответовНастройки TLSВерсия TLS и выбранный алгоритмКолонки таблицыТаблицыСтатус кеша обслуживаемого объектаСледующие опции также могут использоваться с командойТемаВремяРаспределение по времениФормат времени - [t] добавить/изменить форматПереключение панелиТоп браузеров, отсортированных по хитам [, ср., общ, макс. вр. обсл.]Топ кодов ответов HTTP, отсортированных по хитам [, ср., общ, макс. вр. обсл.]Топ ключевых слов, отсортированных по хитам [, ср., общ, макс. вр. обсл.]Топ операционных систем, отсортированных по хитам [, ср., общ, макс. вр. обсл.]Топ ссылающихся сайтов, отсортированных по хитам [, ср., общ, макс. вр. обсл.]Топ ненайденных URL'ов, отсортированных по хитам [, ср., общ, макс. вр. обсл., методу, протоколу]Топ запросов, отсортированных по хитам [, ср., общ, макс. вр. обсл., методу, протоколу]Топ статических запросов, отсортированных по хитам [, ср., общ, макс. вр. обсл., методу, протоколу]Топ хостов посетителей, отсортированных по хитам [, ср., общ, макс. вр. обсл.]ВсегоВсего запросовИсх. трафикТипУникальных посетителейУникальные посетители по днямУникальные посетители по дням - Включая пауковЮзер-агенты для %1$sВалидных запросовВертикальноеВиртуальные хостыПос.Имена хостов и IP посетителейПосетителиWebSocket-сервер готов к приёму новых соединенийШирокоэкранноеВы можете задать его с помощью[ ] ВОЗР [x] УБЫВ[ ] учитывать регистр[?] Помощь [Enter] Разв. панель[Активная панель: %1$s][ENTER] выбрать - [TAB] порядок - [q] выйти[ENTER] использовать схему - [q] выйти[ПРОБЕЛ] переключение - [ENTER] обработать - [q] выйти[ВВЕРХ/ВНИЗ] прокрутка - [q] закрыть окно[ВВЕРХ/ВНИЗ] прокрутка - [q] выйти[q] Выйти из GoAccess[x] ВОЗР [ ] УБЫВ[x] учитывать регистрruх%приводит к следующим ошибкамп%goaccess-1.9.3/po/fr.po0000644000175000017300000006417114626466520010403 msgid "" msgstr "" "Project-Id-Version: goaccess 1.4\n" "Report-Msgid-Bugs-To: hello@goaccess.io\n" "POT-Creation-Date: 2024-05-31 19:37-0500\n" "PO-Revision-Date: 2020-07-10 11:44+0200\n" "Last-Translator: Coban L. \n" "Language-Team: français\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/labels.h:45 msgid "en" msgstr "fr" #: src/labels.h:48 msgid "Exp. Panel" msgstr "Dév. Panneau" #: src/labels.h:49 msgid "Help" msgstr "Aide" #: src/labels.h:50 msgid "Quit" msgstr "Quitter" #: src/labels.h:51 msgid "Total" msgstr "Total" #: src/labels.h:54 msgid "[x] ASC [ ] DESC" msgstr "[x] ASC [ ] DESC" #: src/labels.h:55 msgid "[ ] ASC [x] DESC" msgstr "[ ] ASC [x] DESC" #: src/labels.h:58 #, c-format msgid "[Active Panel: %1$s]" msgstr "[Panneau Actif: %1$s]" #: src/labels.h:59 msgid "[q]uit GoAccess" msgstr "[q]uitter GoAccess" #: src/labels.h:60 msgid "[?] Help [Enter] Exp. Panel" msgstr "[?] Aide [Enter] Dév. Panneau" #: src/labels.h:61 msgid "Dashboard" msgstr "Tableau de bord" #: src/labels.h:62 msgid "Dashboard - Overall Analyzed Requests" msgstr "Tableau de bord - Requêtes analysées, vue d'ensemble" #: src/labels.h:63 msgid "Overall Analyzed Requests" msgstr "Requêtes analysées, vue d'ensemble" #: src/labels.h:65 src/labels.h:86 msgid "Tx. Amount" msgstr "Tx. Montant" #: src/labels.h:66 msgid "Date/Time" msgstr "Date/Heure" #: src/labels.h:67 msgid "Excl. IP Hits" msgstr "Excl. IP Hits" #: src/labels.h:68 msgid "Failed Requests" msgstr "Requêtes échouées" #: src/labels.h:69 msgid "Log Parsing Time" msgstr "" #: src/labels.h:70 msgid "Log Size" msgstr "Taille log" #: src/labels.h:71 msgid "Log Source" msgstr "Fichier log" #: src/labels.h:72 src/labels.h:187 msgid "Referrers" msgstr "Origine" #: src/labels.h:73 msgid "Total Requests" msgstr "Requêtes totales" #: src/labels.h:74 msgid "Static Files" msgstr "Fichiers statiques" #: src/labels.h:75 src/labels.h:159 msgid "Not Found" msgstr "Non Trouvé" #: src/labels.h:76 #, fuzzy msgid "Requested Files" msgstr "Fichiers demandés (URLs)" #: src/labels.h:77 msgid "Unique Visitors" msgstr "Visiteurs uniques" #: src/labels.h:78 msgid "Valid Requests" msgstr "Requêtes valides" #: src/labels.h:81 msgid "Hits" msgstr "Hits" #: src/labels.h:82 msgid "h%" msgstr "h%" #: src/labels.h:83 src/labels.h:110 msgid "Visitors" msgstr "Visiteurs" #: src/labels.h:84 msgid "Vis." msgstr "Vis." #: src/labels.h:85 msgid "v%" msgstr "v%" #: src/labels.h:87 msgid "Avg. T.S." msgstr "Avg. T.S." #: src/labels.h:88 msgid "Cum. T.S." msgstr "Cum. T.S." #: src/labels.h:89 msgid "Max. T.S." msgstr "Max. T.S." #: src/labels.h:90 msgid "Method" msgstr "Méthode" #: src/labels.h:91 msgid "Mtd" msgstr "Mtd" #: src/labels.h:92 msgid "Protocol" msgstr "Protocole" #: src/labels.h:93 msgid "Proto" msgstr "Proto" #: src/labels.h:94 msgid "City" msgstr "Ville" #: src/labels.h:95 src/labels.h:211 src/labels.h:215 msgid "ASN" msgstr "" #: src/labels.h:96 msgid "Country" msgstr "Pays" #: src/labels.h:97 msgid "Hostname" msgstr "Nom d'hôte" #: src/labels.h:98 msgid "Data" msgstr "Données" #: src/labels.h:100 #, fuzzy msgid "Hits/Visitors" msgstr "Visiteurs" #: src/labels.h:104 msgid "Unique visitors per day" msgstr "Visiteurs uniques par jour" #: src/labels.h:106 msgid "Unique visitors per day - Including spiders" msgstr "Visiteurs uniques/jour - Y compris bots" #: src/labels.h:108 msgid "Hits having the same IP, date and agent are a unique visit." msgstr "" "Les hits depuis la même IP, date et user-agent comptent comme visite unique" #: src/labels.h:113 msgid "Requested Files (URLs)" msgstr "Fichiers demandés (URLs)" #: src/labels.h:115 msgid "Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "Top des requêtes triées par hits [, avgts, cumts, maxts, mthd, proto]" #: src/labels.h:117 msgid "Requests" msgstr "Requêtes" #: src/labels.h:120 src/labels.h:124 msgid "Static Requests" msgstr "Requêtes statiques" #: src/labels.h:122 msgid "Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Top des requêtes statiques trié par hits [, avgts, cumts, maxts, mthd, proto]" #: src/labels.h:127 msgid "Time Distribution" msgstr "Distribution temporelle" #: src/labels.h:129 msgid "Data sorted by hour [, avgts, cumts, maxts]" msgstr "Données triées par heure [, avgts, cumts, maxts]" #: src/labels.h:131 msgid "Time" msgstr "Temps" #: src/labels.h:134 src/labels.h:138 msgid "Virtual Hosts" msgstr "Hôtes virtuels" #: src/labels.h:136 src/labels.h:143 src/labels.h:150 msgid "Data sorted by hits [, avgts, cumts, maxts]" msgstr "Données triées par hits [, avgts, cumts, maxts]" #: src/labels.h:141 msgid "Remote User (HTTP authentication)" msgstr "Utilisateur distant (authentification HTTP)" #: src/labels.h:145 msgid "Remote User" msgstr "Remote Utilisateur" #: src/labels.h:148 msgid "The cache status of the object served" msgstr "L'état du cache de l'objet servi" #: src/labels.h:152 msgid "Cache Status" msgstr "Etat du cache" #: src/labels.h:155 msgid "Not Found URLs (404s)" msgstr "URLs Non trouvées (404s)" #: src/labels.h:157 msgid "Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]" msgstr "" "Top des URLs non trouvées trié par hits [, avgts, cumts, maxts, mthd, proto]" #: src/labels.h:162 msgid "Visitor Hostnames and IPs" msgstr "Nom de machine et IPs des visiteurs" #: src/labels.h:164 msgid "Top visitor hosts sorted by hits [, avgts, cumts, maxts]" msgstr "Top des visiteurs trié par hits [, avgts, cumts, maxts]" #: src/labels.h:166 msgid "Hosts" msgstr "Hôtes" #: src/labels.h:169 msgid "Operating Systems" msgstr "Systèmes d'exploitation" #: src/labels.h:171 msgid "Top Operating Systems sorted by hits [, avgts, cumts, maxts]" msgstr "Top des systèmes d'exploitation trié par hits [, avgts, cumts, maxts]" #: src/labels.h:173 msgid "OS" msgstr "SE" #: src/labels.h:176 src/labels.h:180 msgid "Browsers" msgstr "Navigateurs" #: src/labels.h:178 msgid "Top Browsers sorted by hits [, avgts, cumts, maxts]" msgstr "Top des Navigateurs trié par hits [, avgts, cumts, maxts]" #: src/labels.h:183 #, fuzzy msgid "Referrer URLs" msgstr "URLs d'origine" #: src/labels.h:185 #, fuzzy msgid "Top Requested Referrers sorted by hits [, avgts, cumts, maxts]" msgstr "Top des URLs d'origine trié par hits [, avgts, cumts, maxts]" #: src/labels.h:190 src/labels.h:194 msgid "Referring Sites" msgstr "Sites d'origine" #: src/labels.h:192 msgid "Top Referring Sites sorted by hits [, avgts, cumts, maxts]" msgstr "Top des sites d'origine trié par hits [, avgts, cumts, maxts]" #: src/labels.h:197 msgid "Keyphrases from Google's search engine" msgstr "Mot-clés du moteur de recherche Google" #: src/labels.h:199 msgid "Top Keyphrases sorted by hits [, avgts, cumts, maxts]" msgstr "Top des Mot-clés trié par hits [, avgts, cumts, maxts]" #: src/labels.h:201 msgid "Keyphrases" msgstr "Mot-clés" #: src/labels.h:204 src/labels.h:208 msgid "Geo Location" msgstr "Géo Localisation" #: src/labels.h:206 msgid "Continent > Country sorted by unique hits [, avgts, cumts, maxts]" msgstr "Continent > Pays trié par hits unique [, avgts, cumts, maxts]" #: src/labels.h:213 msgid "Autonomous System Numbers/Organizations (ASNs)" msgstr "" #: src/labels.h:218 msgid "HTTP Status Codes" msgstr "Status HTTP" #: src/labels.h:220 msgid "Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]" msgstr "Top des status HTTP trié par hits [, avgts, cumts, maxts]" #: src/labels.h:222 msgid "Status Codes" msgstr "Status HTTP" #: src/labels.h:225 src/labels.h:229 msgid "MIME Types" msgstr "" #: src/labels.h:227 msgid "File types shipped out" msgstr "" #: src/labels.h:232 msgid "Encryption settings" msgstr "" #: src/labels.h:234 msgid "TLS version and picked algorithm" msgstr "" #: src/labels.h:236 msgid "TLS Settings" msgstr "" #: src/labels.h:240 msgid "[ ] case sensitive" msgstr "[ ] sensible à la casse" #: src/labels.h:242 msgid "[x] case sensitive" msgstr "[x] sensible à la casse" #: src/labels.h:244 msgid "Regex allowed - ^g to cancel - TAB switch case" msgstr "Regex OK - ^g pour annuler - TAB pour changer la casse" #: src/labels.h:246 msgid "Find pattern in all views" msgstr "Trouver tous les motifs dans toutes les vues" #: src/labels.h:250 msgid "Log Format Configuration" msgstr "Configuration format des logs" #: src/labels.h:252 msgid "[SPACE] to toggle - [ENTER] to proceed - [q] to quit" msgstr "[SPACE] pour basculer - [ENTREE] pour procéder - [q] pour quitter" #: src/labels.h:254 msgid "Log Format - [c] to add/edit format" msgstr "Format des logs - [c] pour ajouter/éditer le format" #: src/labels.h:256 msgid "Date Format - [d] to add/edit format" msgstr "Format de la date - [d] pour ajouter/éditer le format" #: src/labels.h:258 msgid "Time Format - [t] to add/edit format" msgstr "Format temporel - [t] pour ajouter/éditer le format" #: src/labels.h:260 src/labels.h:264 msgid "[UP/DOWN] to scroll - [q] to close window" msgstr "[HAUT/BAS] pour faire défiler - [q] pour fermer la fenêtre" #: src/labels.h:266 #, c-format msgid "User Agents for %1$s" msgstr "User Agents pour %1$s" #: src/labels.h:270 msgid "Scheme Configuration" msgstr "Configuration programme" #: src/labels.h:272 msgid "[ENTER] to use scheme - [q]uit" msgstr "[ENTREE] pour utiliser le programme - [q]uitter" #: src/labels.h:276 msgid "Sort active module by" msgstr "Trier le module actif par" #: src/labels.h:278 msgid "[ENTER] select - [TAB] sort - [q]uit" msgstr "[ENTREE] sélectionner - [TAB] trier - [q]uitter" #: src/labels.h:282 msgid "GoAccess Quick Help" msgstr "GoAccess aide rapide" #: src/labels.h:284 msgid "[UP/DOWN] to scroll - [q] to quit" msgstr "[HAUT/BAS] pour faire défiler - [q] pour quitter" #: src/labels.h:288 #, fuzzy msgid "In-Memory with On-Disk Persistent Storage." msgstr "En mémoire avec le stockage de disque persistant." #: src/labels.h:292 msgid "Format Errors - Verify your log/date/time format" msgstr "Erreurs de format - Vérifiez votre format de journal / date / heure" #: src/labels.h:294 msgid "No date format was found on your conf file." msgstr "Aucun format de date n'a été trouvé sur votre fichier conf." #: src/labels.h:296 msgid "No log format was found on your conf file." msgstr "Aucun format de journal n'a été trouvé sur votre fichier conf." #: src/labels.h:298 msgid "No time format was found on your conf file." msgstr "Aucun format de journal n'a été trouvé sur votre fichier conf." #: src/labels.h:300 msgid "No default config file found." msgstr "Aucun fichier de configuration par défaut trouvé." #: src/labels.h:302 msgid "You may specify one with" msgstr "Vous pouvez en préciser un avec" #: src/labels.h:304 msgid "producing the following errors" msgstr "produisant les erreurs suivantes" #: src/labels.h:306 #, c-format msgid "Parsed %1$d lines" msgstr "Analysé %1$d lignes" #: src/labels.h:308 msgid "Please report it by opening an issue on GitHub" msgstr "Si vous plaît, rapporter cela en ouvrant un probleme sur GitHub" #: src/labels.h:310 msgid "Select a time format." msgstr "Sélectionner un format temporel." #: src/labels.h:312 msgid "Select a date format." msgstr "Sélectionner un format de date." #: src/labels.h:314 msgid "Select a log format." msgstr "Sélectionner un format de log." #: src/labels.h:316 #, c-format msgid "'%1$s' panel is disabled" msgstr "'%1$s' panneau désactivé" #: src/labels.h:318 msgid "No input data was provided nor there's data to restore." msgstr "" #: src/labels.h:320 msgid "Unable to allocate memory for a log instance." msgstr "" #: src/labels.h:322 msgid "Unable to find the given log." msgstr "" #: src/labels.h:326 msgid "For more details visit" msgstr "Pour plus de détails, visitez" #: src/labels.h:328 msgid "Last Updated" msgstr "Dernière mise à jour" #: src/labels.h:330 msgid "WebSocket server ready to accept new client connections" msgstr "WebSocket serveur prêt à accepter les nouvelles connexions client" #: src/labels.h:333 msgid "The following options can also be supplied to the command" msgstr "Les options suivantes peuvent également être fournies à la commande" #: src/labels.h:335 msgid "Examples can be found by running" msgstr "Des exemples peuvent être trouvés en cours d'exécution" #: src/labels.h:338 msgid "Server Statistics" msgstr "Statistiques du serveur" #: src/labels.h:340 msgid "Theme" msgstr "Thème" #: src/labels.h:342 msgid "Dark Gray" msgstr "Gris foncé" #: src/labels.h:344 msgid "Bright" msgstr "Brillant" #: src/labels.h:346 msgid "Dark Blue" msgstr "Bleu foncé" #: src/labels.h:348 #, fuzzy msgid "Dark Purple" msgstr "Violet foncé" #: src/labels.h:350 msgid "Panels" msgstr "Panneaux" #: src/labels.h:352 msgid "Items per Page" msgstr "Objets par page" #: src/labels.h:354 msgid "Tables" msgstr "Tableaux" #: src/labels.h:356 msgid "Display Tables" msgstr "Afficher les tableaux" #: src/labels.h:358 msgid "Auto-Hide on Small Devices" msgstr "Masquage-auto/Petits appareils" #: src/labels.h:360 msgid "Automatically hide tables on small screen devices" msgstr "" "Masquer automatiquement les tableaux sur les appareils avec un petit écran" #: src/labels.h:362 msgid "Toggle Panel" msgstr "" #: src/labels.h:364 msgid "Layout" msgstr "Disposition" #: src/labels.h:366 msgid "Horizontal" msgstr "Horizontal" #: src/labels.h:368 msgid "Vertical" msgstr "Verticale" #: src/labels.h:370 msgid "WideScreen" msgstr "Grand écran" #: src/labels.h:372 msgid "File Options" msgstr "Options de fichier" #: src/labels.h:374 msgid "Export as JSON" msgstr "Exporter en tant que JSON" #: src/labels.h:376 msgid "Panel Options" msgstr "Options du panneau" #: src/labels.h:378 msgid "Previous" msgstr "Précédent" #: src/labels.h:380 msgid "Next" msgstr "Suivant" #: src/labels.h:382 msgid "First" msgstr "Premier" #: src/labels.h:384 msgid "Last" msgstr "Dernier" #: src/labels.h:386 msgid "Chart Options" msgstr "Options du graphique" #: src/labels.h:388 msgid "Chart" msgstr "Graphique" #: src/labels.h:390 msgid "Type" msgstr "Type" #: src/labels.h:392 msgid "Area Spline" msgstr "Courbe vectorielle" #: src/labels.h:394 msgid "Bar" msgstr "Barre" #: src/labels.h:396 msgid "World Map" msgstr "" #: src/labels.h:398 msgid "Plot Metric" msgstr "Tracé métrique" #: src/labels.h:400 msgid "Table Columns" msgstr "Colonnes de tableau" #: src/labels.h:404 msgid "0xx Unofficial Codes" msgstr "" #: src/labels.h:406 msgid "1xx Informational" msgstr "1xx Informationnel" #: src/labels.h:408 msgid "2xx Success" msgstr "2xx Succès" #: src/labels.h:410 msgid "3xx Redirection" msgstr "3xx Redirection" #: src/labels.h:412 msgid "4xx Client Errors" msgstr "4xx Erreurs Client" #: src/labels.h:414 msgid "5xx Server Errors" msgstr "5xx Erreurs Serveur" #: src/labels.h:417 msgid "0 - Caddy: Unhandled - No configured routes" msgstr "" #: src/labels.h:419 msgid "100 - Continue: Server received the initial part of the request" msgstr "100 - Continue: Le serveur a reçu la partie initiale de la requête" #: src/labels.h:421 msgid "101 - Switching Protocols: Client asked to switch protocols" msgstr "" "101 - Echange de Protocoles: Le client a demandé à changer de protocole" #: src/labels.h:423 msgid "200 - OK: The request sent by the client was successful" msgstr "200 - OK: La requête envoyée par le client a réussie" #: src/labels.h:425 msgid "201 - Created: The request has been fulfilled and created" msgstr "201 - Created: La requête a été aboutie et créée" #: src/labels.h:427 msgid "202 - Accepted: The request has been accepted for processing" msgstr "202 - Accepté: La requête a été acceptée pour être traité" #: src/labels.h:429 msgid "203 - Non-authoritative Information: Response from a third party" msgstr "203 - Information sans autorité: Réponse d'un tiers" #: src/labels.h:431 msgid "204 - No Content: Request did not return any content" msgstr "204 - Aucun contenu: La requête ne renvoie aucun contenu" #: src/labels.h:433 msgid "205 - Reset Content: Server asked the client to reset the document" msgstr "" "205 - Contenu réinitialisé: Le serveur a demandé au client de réinitialiser " "le document" #: src/labels.h:435 msgid "206 - Partial Content: The partial GET has been successful" msgstr "206 - Contenu partiel: Le GET partiel a réussi" #: src/labels.h:437 msgid "207 - Multi-Status: WebDAV; RFC 4918" msgstr "207 - Status-multiples: WebDAV; RFC 4918" #: src/labels.h:439 msgid "208 - Already Reported: WebDAV; RFC 5842" msgstr "208 - Déjà signalé: WebDAV; RFC 5842" #: src/labels.h:441 msgid "218 - This is fine: Apache servers. A catch-all error condition" msgstr "" #: src/labels.h:443 msgid "300 - Multiple Choices: Multiple options for the resource" msgstr "300 - Choix multiples: Options multiples pour la ressource" #: src/labels.h:445 msgid "301 - Moved Permanently: Resource has permanently moved" msgstr "" "301 - Déplacement permanent: La ressource a été déplacée de façon permanente" #: src/labels.h:447 msgid "302 - Moved Temporarily (redirect)" msgstr "302 - Temporairement déplacé (redirigé)" #: src/labels.h:449 msgid "303 - See Other Document: The response is at a different URI" msgstr "303 - Voir autre document: La réponse se situe sur une URI différente" #: src/labels.h:451 msgid "304 - Not Modified: Resource has not been modified" msgstr "304 - Non modifié: La ressource n'a pas été modifiée" #: src/labels.h:453 msgid "305 - Use Proxy: Can only be accessed through the proxy" msgstr "305 - Utiliser un Proxy : Accessible seulement depuis le proxy" #: src/labels.h:455 msgid "307 - Temporary Redirect: Resource temporarily moved" msgstr "307 - Redirection temporaire: Ressource temporairement déplacée" #: src/labels.h:457 #, fuzzy msgid "308 - Permanent Redirect" msgstr "402 - Paiement requis" #: src/labels.h:459 msgid "400 - Bad Request: The syntax of the request is invalid" msgstr "400 - Mauvaise requête: Syntaxe de la requête invalide" #: src/labels.h:461 msgid "401 - Unauthorized: Request needs user authentication" msgstr "" "401 - Non autorisé: La requête nécessite une authentification utilisateur" #: src/labels.h:463 msgid "402 - Payment Required" msgstr "402 - Paiement requis" #: src/labels.h:465 msgid "403 - Forbidden: Server is refusing to respond to it" msgstr "403 - Interdit: Le serveur refuse d'y répondre" #: src/labels.h:467 msgid "404 - Not Found: Requested resource could not be found" msgstr "404 - Non trouvé: La ressource demandée ne peut pas être trouvée" #: src/labels.h:469 msgid "405 - Method Not Allowed: Request method not supported" msgstr "405 - Méthode non autorisée: Méthode de requête non supportée" #: src/labels.h:471 msgid "406 - Not Acceptable" msgstr "406 - Pas Acceptable" #: src/labels.h:473 msgid "407 - Proxy Authentication Required" msgstr "407 - Authentification au proxy requise" #: src/labels.h:475 msgid "408 - Request Timeout: Server timed out waiting for the request" msgstr "" "408 - Requête expirée: Délai d'attente du serveur dépassé pour la requête" #: src/labels.h:477 msgid "409 - Conflict: Conflict in the request" msgstr "409 - Conflit: Conflit dans la requête" #: src/labels.h:479 msgid "410 - Gone: Resource requested is no longer available" msgstr "410 - Disparue: La ressource demandée n'est plus disponible" #: src/labels.h:481 msgid "411 - Length Required: Invalid Content-Length" msgstr "411 - Longueur requise: Longueur du contenu invalide" #: src/labels.h:483 msgid "412 - Precondition Failed: Server does not meet preconditions" msgstr "412 - Pré-requis échoué: Le serveur ne rempli pas les pré-requis" #: src/labels.h:485 msgid "413 - Payload Too Large" msgstr "413 - Charge utile trop importante" #: src/labels.h:487 msgid "414 - Request-URI Too Long" msgstr "414 - URI requête trop longue" #: src/labels.h:489 msgid "415 - Unsupported Media Type: Media type is not supported" msgstr "415 - Type de média non supporté : Type de media non pris en charge" #: src/labels.h:491 msgid "416 - Requested Range Not Satisfiable: Cannot supply that portion" msgstr "" "416 - Plage de requête non satisfaisante: ne peut pas fournir cette partie" #: src/labels.h:493 msgid "417 - Expectation Failed" msgstr "417 - Attente échouée" #: src/labels.h:495 #, fuzzy msgid "418 - I'm a teapot" msgstr "418 - Je suis une théière" #: src/labels.h:497 msgid "419 - Page Expired: Laravel Framework when a CSRF Token is missing" msgstr "" #: src/labels.h:499 msgid "420 - Method Failure: Spring Framework when a method has failed" msgstr "" #: src/labels.h:501 msgid "421 - Misdirected Request" msgstr "421 - Requête mal orientée" #: src/labels.h:503 msgid "422 - Unprocessable Entity due to semantic errors: WebDAV" msgstr "422 - Entité non traitable à cause des erreurs sémantiques: WebDAV" #: src/labels.h:505 msgid "423 - The resource that is being accessed is locked" msgstr "423 - L'accès à la ressource est verrouillé" #: src/labels.h:507 msgid "424 - Failed Dependency: WebDAV" msgstr "424 - Dépendance échouée: WebDAV" #: src/labels.h:509 msgid "426 - Upgrade Required: Client should switch to a different protocol" msgstr "" "426 - Amélioration requise: Le client devrait changer pour un protocole " "différent" #: src/labels.h:511 msgid "428 - Precondition Required" msgstr "428 - Condition préalable requise" #: src/labels.h:513 msgid "429 - Too Many Requests: The user has sent too many requests" msgstr "429 : Trop de requêtes: L'utilisateur a envoyé trop de requêtes" #: src/labels.h:515 msgid "" "430 - Request Header Fields Too Large: Too many URLs are requested within a " "certain time frame" msgstr "" #: src/labels.h:517 msgid "431 - Request Header Fields Too Large" msgstr "431 - Le champ en-tête de requête est trop large" #: src/labels.h:519 msgid "440 - Login Time-out: The client's session has expired" msgstr "" #: src/labels.h:521 #, fuzzy msgid "449 - Retry With: The server cannot honour the request" msgstr "" "408 - Requête expirée: Délai d'attente du serveur dépassé pour la requête" #: src/labels.h:523 msgid "" "450 - Blocked by Windows Parental Controls: The Microsoft extension code " "indicated" msgstr "" #: src/labels.h:525 msgid "451 - Unavailable For Legal Reasons" msgstr "451 - Indisponible pour des raisons légales" #: src/labels.h:527 msgid "444 - (Nginx) Connection closed without sending any headers" msgstr "444 - (Nginx) Connexion fermée sans envoyer d'en-têtes" #: src/labels.h:529 msgid "460 - AWS Elastic Load Balancing: Client closed the connection " msgstr "" #: src/labels.h:531 msgid "" "463 - AWS Elastic Load Balancing: The load balancer received more than 30 IP " "addresses" msgstr "" #: src/labels.h:533 msgid "464 - AWS Elastic Load Balancing: Incompatible protocol versions" msgstr "" #: src/labels.h:535 msgid "494 - (Nginx) Request Header Too Large" msgstr "494 - (Nginx) En-tête de requête trop large" #: src/labels.h:537 msgid "495 - (Nginx) SSL client certificate error" msgstr "495 - (Nginx) Erreur de certificat SSL client" #: src/labels.h:539 msgid "496 - (Nginx) Client didn't provide certificate" msgstr "496 - (Nginx) Le client ne fournit pas de certificat" #: src/labels.h:541 msgid "497 - (Nginx) HTTP request sent to HTTPS port" msgstr "497 - (Nginx) Requête HTTP envoyée sur le port HTTPS" #: src/labels.h:543 msgid "498 - Invalid Token: an expired or otherwise invalid token" msgstr "" #: src/labels.h:545 msgid "499 - (Nginx) Connection closed by client while processing request" msgstr "" "499 - (Nginx) Connexion fermée par le client durant le traitement de la " "requête" #: src/labels.h:547 msgid "500 - Internal Server Error" msgstr "500 - Erreur serveur interne" #: src/labels.h:549 msgid "501 - Not Implemented" msgstr "501 - Non implémenté" #: src/labels.h:551 msgid "502 - Bad Gateway: Received an invalid response from the upstream" msgstr "502 - Mauvaise passerelle: Réponse invalide reçue en amont" #: src/labels.h:553 msgid "503 - Service Unavailable: The server is currently unavailable" msgstr "503 - Service indisponible: Le serveur est actuellement indisponible" #: src/labels.h:555 msgid "504 - Gateway Timeout: The upstream server failed to send request" msgstr "" "504 - Attente passerelle dépassé: l'envoi de la requête en amont par le " "serveur a échoué" #: src/labels.h:557 msgid "505 - HTTP Version Not Supported" msgstr "505 - Version HTTP non supportée" #: src/labels.h:559 msgid "509 - Bandwidth Limit Exceeded: The server has exceeded the bandwidth" msgstr "" #: src/labels.h:561 msgid "520 - CloudFlare - Web server is returning an unknown error" msgstr "520 - CloudFlare - Le serveur Web renvoi une erreur inconnue" #: src/labels.h:563 msgid "521 - CloudFlare - Web server is down" msgstr "521 - CloudFlare - Serveur Web en panne" #: src/labels.h:565 msgid "522 - CloudFlare - Connection timed out" msgstr "522 - CloudFlare - Délai de connexion dépassé" #: src/labels.h:567 msgid "523 - CloudFlare - Origin is unreachable" msgstr "523 - CloudFlare - L'Origin n'est pas joignable" #: src/labels.h:569 msgid "524 - CloudFlare - A timeout occurred" msgstr "524 - CloudFlare - Un dépassement du délai s'est produit" #: src/labels.h:571 msgid "" "525 - SSL Handshake Failed: Cloudflare could not negotiate a SSL/TLS " "handshake" msgstr "" #: src/labels.h:573 msgid "" "526 - Invalid SSL Certificate: Cloudflare could not validate the SSL " "certificate" msgstr "" #: src/labels.h:575 msgid "527 - Railgun Error: An interrupted connection" msgstr "" #: src/labels.h:577 msgid "529 - Site is overloaded: A site can not process the request" msgstr "" #: src/labels.h:579 msgid "530 - Site is frozen: A site has been frozen due to inactivity" msgstr "" #: src/labels.h:581 msgid "" "540 - Temporarily Disabled: The requested endpoint has been temporarily " "disabled" msgstr "" #: src/labels.h:583 #, fuzzy msgid "561 - Unauthorized: An error around authentication" msgstr "" "401 - Non autorisé: La requête nécessite une authentification utilisateur" #: src/labels.h:585 msgid "" "598 - Network read timeout error: some HTTP proxies to signal a network read " "timeout" msgstr "" #: src/labels.h:587 msgid "599 - Network Connect Timeout Error: An error used by some HTTP proxies" msgstr "" #: src/labels.h:589 msgid "783 - Unexpected Token: The request includes a JSON syntax error" msgstr "" #, fuzzy #~ msgid "Referers" #~ msgstr "Origine" goaccess-1.9.3/po/zh_CN.gmo0000644000175000017300000004336714626466521011146 % PQ?j;790<j@4B:`$( 97/"g<2742g7w54616h#?'5@-v=9AO93EDe<%;)#e&*/- B9|A>AA ;%'(.%W} 1   'A,n v   %++$! F P _ s      !0!! R!_!s!!!;! ! !!!*!" -"&8" _"l"#s"""" " " """"+"&#7D#*|#+# ####$ "$0$7$.I$ x$$$$$ $$.$ $!$%(%?%H%]%s%%%% %% % % % &,&%3&9Y&&&&$& &3&<'5S'<':'F(@H(G(8( )) )*)/)?)+W)))) ))))7) *)*B*S*f**$**4*)+!:+\+l+}+++a+-/+-A[- --A-9.`?.).N.;/!U/!w/ />/8/0J/0#z020201)1/?1o1)1)151 225825n2/2.2G3K3d3}3!3333< 4F4b4;x4424525O5n5#5&5255 6@6Q6j6X}6,6U7Y74v7"77(7(8@8Q8b8!~88 88 8 88 88W8K9R9b9i9p9w99Q9N9%?: e: s: :$:: ::: : ;$!;F;8\; ;; ;; ;N;%<6< =<G<$N< s< << <<%<<< = = #=/= ?= L=Y='`==6='='>.>=> N> [>h> >>>8> >>>>? ? ?5$?Z?$j????????@@ 1@ >@ K@ U@`@ z@@@+@@@ @%@ AQ!AUsAQATBTpBnBd4CjCTDYD `DmD}D DD*DDDD DE E'E6.EeElEEEEE(E F+2F!^F!FFFFFF}Y2)SNtQrzU FW51@!%6$`~^O07A?q( &-K8"VHuI_+ cX>L: ]w BPx|j,k94[amJgli#TR/{<sCE=*vfGZhoMe\ ;py3b.'Dnd'%1$s' panel is disabled100 - Continue: Server received the initial part of the request101 - Switching Protocols: Client asked to switch protocols1xx Informational200 - OK: The request sent by the client was successful201 - Created: The request has been fulfilled and created202 - Accepted: The request has been accepted for processing203 - Non-authoritative Information: Response from a third party204 - No Content: Request did not return any content205 - Reset Content: Server asked the client to reset the document206 - Partial Content: The partial GET has been successful207 - Multi-Status: WebDAV; RFC 4918208 - Already Reported: WebDAV; RFC 58422xx Success300 - Multiple Choices: Multiple options for the resource301 - Moved Permanently: Resource has permanently moved302 - Moved Temporarily (redirect)303 - See Other Document: The response is at a different URI304 - Not Modified: Resource has not been modified305 - Use Proxy: Can only be accessed through the proxy307 - Temporary Redirect: Resource temporarily moved3xx Redirection400 - Bad Request: The syntax of the request is invalid401 - Unauthorized: Request needs user authentication402 - Payment Required403 - Forbidden: Server is refusing to respond to it404 - Not Found: Requested resource could not be found405 - Method Not Allowed: Request method not supported406 - Not Acceptable407 - Proxy Authentication Required408 - Request Timeout: Server timed out waiting for the request409 - Conflict: Conflict in the request410 - Gone: Resource requested is no longer available411 - Length Required: Invalid Content-Length412 - Precondition Failed: Server does not meet preconditions413 - Payload Too Large414 - Request-URI Too Long415 - Unsupported Media Type: Media type is not supported416 - Requested Range Not Satisfiable: Cannot supply that portion417 - Expectation Failed418 - I'm a teapot421 - Misdirected Request422 - Unprocessable Entity due to semantic errors: WebDAV423 - The resource that is being accessed is locked424 - Failed Dependency: WebDAV426 - Upgrade Required: Client should switch to a different protocol428 - Precondition Required429 - Too Many Requests: The user has sent too many requests431 - Request Header Fields Too Large444 - (Nginx) Connection closed without sending any headers451 - Unavailable For Legal Reasons494 - (Nginx) Request Header Too Large495 - (Nginx) SSL client certificate error496 - (Nginx) Client didn't provide certificate497 - (Nginx) HTTP request sent to HTTPS port499 - (Nginx) Connection closed by client while processing request4xx Client Errors500 - Internal Server Error501 - Not Implemented502 - Bad Gateway: Received an invalid response from the upstream503 - Service Unavailable: The server is currently unavailable504 - Gateway Timeout: The upstream server failed to send request505 - HTTP Version Not Supported520 - CloudFlare - Web server is returning an unknown error521 - CloudFlare - Web server is down522 - CloudFlare - Connection timed out523 - CloudFlare - Origin is unreachable524 - CloudFlare - A timeout occurred5xx Server ErrorsArea SplineAuto-Hide on Small DevicesAutomatically hide tables on small screen devicesAvg. T.S.BarBrightBrowsersCache StatusChartChart OptionsCityContinent > Country sorted by unique hits [, avgts, cumts, maxts]CountryCum. T.S.Dark BlueDark GrayDashboardDashboard - Overall Analyzed RequestsDataData sorted by hits [, avgts, cumts, maxts]Data sorted by hour [, avgts, cumts, maxts]Date Format - [d] to add/edit formatDate/TimeDisplay TablesEncryption settingsExamples can be found by runningExcl. IP HitsExp. PanelExport as JSONFailed RequestsFile OptionsFile types shipped outFind pattern in all viewsFor more details visitFormat Errors - Verify your log/date/time formatGeo LocationGoAccess Quick HelpHTTP Status CodesHelpHitsHits having the same IP, date and agent are a unique visit.Hits/VisitorsHorizontalHostnameHostsIn-Memory with On-Disk Persistent Storage.Items per PageKeyphrasesKeyphrases from Google's search engineLast UpdatedLayoutLog Format - [c] to add/edit formatLog Format ConfigurationLog Parsing TimeLog SizeLog SourceMIME TypesMax. T.S.MethodMtdNextNo date format was found on your conf file.No default config file found.No input data was provided nor there's data to restore.No log format was found on your conf file.No time format was found on your conf file.Not FoundNot Found URLs (404s)OSOperating SystemsOverall Analyzed RequestsPanel OptionsPanelsParsed %1$d linesPlease report it by opening an issue on GitHubPlot MetricPreviousProtoProtocolQuitReferrersReferring SitesRegex allowed - ^g to cancel - TAB switch caseRemote UserRemote User (HTTP authentication)Requested FilesRequested Files (URLs)RequestsScheme ConfigurationSelect a date format.Select a log format.Select a time format.Server StatisticsSort active module byStatic FilesStatic RequestsStatus CodesTLS SettingsTLS version and picked algorithmTable ColumnsTablesThe cache status of the object servedThe following options can also be supplied to the commandThemeTimeTime DistributionTime Format - [t] to add/edit formatToggle PanelTop Browsers sorted by hits [, avgts, cumts, maxts]Top HTTP Status Codes sorted by hits [, avgts, cumts, maxts]Top Keyphrases sorted by hits [, avgts, cumts, maxts]Top Operating Systems sorted by hits [, avgts, cumts, maxts]Top Referring Sites sorted by hits [, avgts, cumts, maxts]Top not found URLs sorted by hits [, avgts, cumts, maxts, mthd, proto]Top requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top static requests sorted by hits [, avgts, cumts, maxts, mthd, proto]Top visitor hosts sorted by hits [, avgts, cumts, maxts]TotalTotal RequestsTx. AmountTypeUnique VisitorsUnique visitors per dayUnique visitors per day - Including spidersUser Agents for %1$sValid RequestsVerticalVirtual HostsVis.Visitor Hostnames and IPsVisitorsWebSocket server ready to accept new client connectionsWideScreenYou may specify one with[ ] ASC [x] DESC[ ] case sensitive[?] Help [Enter] Exp. Panel[Active Panel: %1$s][ENTER] select - [TAB] sort - [q]uit[ENTER] to use scheme - [q]uit[SPACE] to toggle - [ENTER] to proceed - [q] to quit[UP/DOWN] to scroll - [q] to close window[UP/DOWN] to scroll - [q] to quit[q]uit GoAccess[x] ASC [ ] DESC[x] case sensitiveenproducing the following errorsProject-Id-Version: goaccess 1.5.6 Report-Msgid-Bugs-To: hello@goaccess.io PO-Revision-Date: 2017-04-03 09:43+0200 Last-Translator: Ai Language-Team: Ai Language: zh_CN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Generator: Gtranslator 2.91.7 '%1$s' 面板已禁用100 - 继续: 服务器已经接收到请求头101 - 更改协议: 客户端被通知变更协议来完成请求1xx 消息200 - 成功: 请求成功201 - 已创建: 请求成功并且服务器创建了新的资源202 - 已接收: 服务器已接受请求,但尚未处理203 - 非授权信息: 服务器已成功处理请求 但返回的信息可能来自另一来源204 - 无内容: 没有返回任何内容205 - 重置内容: 服务器已成功处理请求 但没有返回任何内容206 - 部分内容: 服务器成功处理了部分GET请求207 - 多状态: WebDAV; RFC 4918208 - 已报告: WebDAV; RFC 58422xx 成功300 - 多重选择: 资源提供多种选项让客户端选择301 - 永久移除: 资源已被永久移动到新位置302 - 临时移动303 - 查看其他位置: 当前请求的响应在另一个URI上被找到304 - 未修改: 资源未被修改305 - 使用代理: 只能通过代理访问资源307 - 临时重定向: 临时从另外的URI响应3xx Url重定向400 - 错误请求: 客户端语法错误401 - 未授权: 当前请求需要用户授权402 - 需要支付403 - 禁止: 服务器拒绝响应请求404 - 未找到: 找不到请求的资源405 - 方法禁用: 不支持请求中指定的方法406 - 无法接收407 - 需要代理授权408 - 请求超时: 服务器在等候请求时超时409 - 冲突: 服务器在完成请求时发生冲突410 - 已删除: 请求的资源已永久删除411 - 需要有效长度: Content-Length无效412 - 未满足前提条件: 服务器未满足请求中的前提条件413 - 请求实体过大414 - 请求的URI过长415 - 不支持的媒体类型416 - 请求范围不符合要求417 - 未满足期望值418 - 我是一个茶壶421 - 被误导的请求422 - 请求格式正确但因存在语法错而无法响应423 - 当前资源被锁定424 - 失败的依赖426 - 需要升级: 客户端应该切换到其他的协议428 - 需要前提条件429 - 请求过多: 客户端发送了太多请求431 - 请求头字段太长444 - (Nginx) 未发送响应头且连接已关闭451 - 因法律原因不可用494 - (Nginx) 请求头太大495 - (Nginx) SSL客户端证书错496 - (Nginx) 客户端未提供证书497 - (Nginx) HTTP请求被发送到了HTTPS端口499 - (Nginx) 处理请求时连接被客户端关闭4xx 客户端错500 - 服务器内部错501 - 尚未实施502 - 错误网关: 服务器作为网关或代理, 从上游服务器收到无效响应503 - 服务不可用: 服务器无法使用504 - 网关超时: 服务器作为网关或代理, 未从上游服务器收到请求505 - HTTP版本不受支持520 - CloudFlare - 服务器返回一个未知错误521 - CloudFlare - 服务器挂了522 - CloudFlare - 连接超时523 - CloudFlare - 服务器无法访问524 - CloudFlare - 服务器响应超时5xx 服务器错AreaSpline图表屏幕过小时自动隐藏屏幕过小时自动隐藏表格平均响应时条形图明亮浏览器缓存状态图表图表选项城市大陆 > 国家排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]国家总共响应时深蓝深黑概览概览-所有已分析的请求数据数据列排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]数据列排序按 [小时, 平均响应时, 总共响应时, 最高响应时]日期格式 - [d]新建/修改格式时期/时间显示表格加密设置运行一下指令查看更多示例过滤来自此IP的请求展开面板导出为JSON文件失败的请求文件选项发出的文件类型在所有界面中查找匹配模式更多信息请访问格式错误 - 请检查你的日志/日期/时间格式地理位置GoAccess快速帮助HTTP状态码帮助点击量来自同一IP、时间和Http用户代理的多次点击被视作一次访问点击量/访客横向主机名主机具有磁盘持久存储的内存中每页项目关键字谷歌搜索关键字最近更新布局日志格式 - [c]新建/修改格式日志格式设置日志解析耗时日志大小日志文件夹地址MIME 类型最高响应时请求方法请求方法前进未在配置文件中设置日期格式未找到默认的配置文件没有提供输入数据,也没有要恢复的数据未在配置文件中设置日志格式未在配置文件中设置时间格式未找到(404)未找到的URLs操作系统操作系统所有已分析的请求面板选项面板已解析 %1$d 行请在GitHub中添加一个issue来给我们反馈信息绘制度量后退协议协议退出来源地址推荐网站允许正则表达式 - ^g退出 - TAB改变大小写已认证用户已认证用户(HTTP authentication)请求的文件请求的文件请求颜色方案设置选择日期格式选择日志格式选择时间格式服务器统计信息当前选择栏目排序静态文件静态请求状态码TLS 设置TLS 版本和挑选算法表格列表格服务对象的缓存状态你也可以在command中选择以下选项主题时间时间分配时间格式 - [t]新建/修改格式切换面板浏览器排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]HTTP状态码排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]关键字排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]操作系统排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]推荐网站排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]未找到的URLs排序按 [点击量, 平均响应时, 总共响应时, 最高响应时, 请求方法, 协议]请求排序按 [点击量, 平均响应时, 总共响应时, 最高响应时, 请求方法, 协议]静态请求排序按 [点击量, 平均响应时, 总共响应时, 最高响应时, 请求方法, 协议]访客主机排序按 [点击量, 平均响应时, 总共响应时, 最高响应时]总共所有请求数据传输量类型独立访客每日独立访客每日独立访客 - 包括网络机器人用户代理 %1$s有效的请求纵向虚拟主机访客访客主机名和IP地址访客WebSocket服务器已准备接收来自客户的连接宽屏你可以指定配置文件[ ] 递增 [x] 递减[ ] 区分大小写[?]帮助 [回车]展开面板[当前面板: %1$s][回车]选择 - [TAB]排序 - [q]退出[回车]选取方案 - [q]退出[空格]切换 - [回车]继续 - [q]退出[UP/DOWN]上下滚动 - [q]退出[UP/DOWN]上下滚动 - [q]退出[q]退出GoAccess[x] 递增 [ ] 递减[x] 区分大小写zh-CN出现以下错误goaccess-1.9.3/po/en@boldquot.header0000644000175000017300000000247114613301666013050 # All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # goaccess-1.9.3/m4/0000755000175000017300000000000014626467007007406 5goaccess-1.9.3/m4/po.m40000644000175000017300000004503714613301752010205 # po.m4 serial 22 (gettext-0.19) dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.60]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_SED])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1995-2000. dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ]])], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ]])], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) goaccess-1.9.3/m4/progtest.m40000644000175000017300000000604014613301751011424 # progtest.m4 serial 7 (gettext-0.18.2) dnl Copyright (C) 1996-2003, 2005, 2008-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. AC_PREREQ([2.50]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) goaccess-1.9.3/m4/intlmacosx.m40000644000175000017300000000475314613301752011750 # intlmacosx.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2004-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in Mac OS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in Mac OS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyCurrent();]])], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) goaccess-1.9.3/m4/lib-ld.m40000644000175000017300000000714314613301752010726 # lib-ld.m4 serial 6 dnl Copyright (C) 1996-2003, 2009-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) goaccess-1.9.3/m4/nls.m40000644000175000017300000000231514613301752010353 # nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) goaccess-1.9.3/m4/lib-prefix.m40000644000175000017300000002042214613301751011616 # lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) goaccess-1.9.3/m4/iconv.m40000644000175000017300000002162014613301751010674 # iconv.m4 serial 18 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; const char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; }]])], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [ changequote(,)dnl case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac changequote([,])dnl ]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) fi ]) goaccess-1.9.3/compile0000755000175000017300000001635014620766657010400 #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: goaccess-1.9.3/TODO0000644000175000017300000000055314614317512007471 1Copyright (C) 2009-2024 6erardo Orellana For a more comprehensive list of to-do items, please refer to the GitHub site. https://github.com/allinurl/goaccess/issues or visit https://goaccess.io/faq#todo If you are interested in working on any of the items listed in there, email goaccess@prosoftcorp.com or better, open a new issue: goaccess-1.9.3/NEWS0000644000175000017300000001736514626464641007522 Copyright (C) 2009-2024 Gerardo Orellana * Version history: - 1.9.3 [Friday, May 31, 2024] . GoAccess 1.9.3 Released. See ChangeLog for new features/bug-fixes. - 1.9.2 [Friday, April 12, 2024] . GoAccess 1.9.2 Released. See ChangeLog for new features/bug-fixes. - 1.9.1 [Tuesday, February 05, 2024] . GoAccess 1.9.1 Released. See ChangeLog for new features/bug-fixes. - 1.9 [Tuesday, January 30, 2024] . GoAccess 1.9 Released. See ChangeLog for new features/bug-fixes. - 1.8.1 [Tuesday, October 31, 2023] . GoAccess 1.8.1 Released. See ChangeLog for new features/bug-fixes. - 1.8 [Saturday, September 30, 2023] . GoAccess 1.8 Released. See ChangeLog for new features/bug-fixes. - 1.7.2 [Friday, March 31, 2023] . GoAccess 1.7.2 Released. See ChangeLog for new features/bug-fixes. - 1.7.1 [Tuesday, February 28, 2023] . GoAccess 1.7.1 Released. See ChangeLog for new features/bug-fixes. - 1.7 [Saturday, December 31 , 2022] . GoAccess 1.7 Released. See ChangeLog for new features/bug-fixes. - 1.6.5 [Monday, October 31 , 2022] . GoAccess 1.6.5 Released. See ChangeLog for new features/bug-fixes. - 1.6.4 [Friday, September 30 , 2022] . GoAccess 1.6.4 Released. See ChangeLog for new features/bug-fixes. - 1.6.3 [Thursday, August 31 , 2022] . GoAccess 1.6.3 Released. See ChangeLog for new features/bug-fixes. - 1.6.2 [Thursday, July 14 , 2022] . GoAccess 1.6.2 Released. See ChangeLog for new features/bug-fixes. - 1.6.1 [Thursday, June 30 , 2022] . GoAccess 1.6.1 Released. See ChangeLog for new features/bug-fixes. - 1.6 [Tuesday, May 31 , 2022] . GoAccess 1.6 Released. See ChangeLog for new features/bug-fixes. - 1.5.7 [Thursday, April 28 , 2022] . GoAccess 1.5.7 Released. See ChangeLog for new features/bug-fixes. - 1.5.6 [Wednesday, March 30, 2022] . GoAccess 1.5.6 Released. See ChangeLog for new features/bug-fixes. - 1.5.5 [Monday, January 31, 2022] . GoAccess 1.5.5 Released. See ChangeLog for new features/bug-fixes. - 1.5.4 [Saturday, December 25, 2021] . GoAccess 1.5.4 Released. See ChangeLog for new features/bug-fixes. - 1.5.3 [Thursday, November 25, 2021] . GoAccess 1.5.3 Released. See ChangeLog for new features/bug-fixes. - 1.5.2 [Tuesday, Sep 28, 2021] . GoAccess 1.5.2 Released. See ChangeLog for new features/bug-fixes. - 1.5.1 [Wednesday, Jun 30, 2021] . GoAccess 1.5.1 Released. See ChangeLog for new features/bug-fixes. - 1.5 [Wednesday, May 26, 2021] . GoAccess 1.5 Released. See ChangeLog for new features/bug-fixes. - 1.4.6 [Sunday, February 28, 2021] . GoAccess 1.4.6 Released. See ChangeLog for new features/bug-fixes. - 1.4.5 [Tuesday, January 26, 2021] . GoAccess 1.4.5 Released. See ChangeLog for new features/bug-fixes. - 1.4.4 [Monday, January 25, 2021] . GoAccess 1.4.4 Released. See ChangeLog for new features/bug-fixes. - 1.4.3 [Friday, December 04, 2020] . GoAccess 1.4.3 Released. See ChangeLog for new features/bug-fixes. - 1.4.2 [Monday, November 16, 2020] . GoAccess 1.4.2 Released. See ChangeLog for new features/bug-fixes. - 1.4.1 [Monday, November 09, 2020] . GoAccess 1.4.1 Released. See ChangeLog for new features/bug-fixes. - 1.4 [Monday, May 18, 2020] . GoAccess 1.4 Released. See ChangeLog for new features/bug-fixes. - 1.3 [Friday, November 23, 2018] . GoAccess 1.3 Released. See ChangeLog for new features/bug-fixes. - 1.2 [Tuesday, March 07, 2017] . GoAccess 1.2 Released. See ChangeLog for new features/bug-fixes. - 1.1.1 [Wednesday, November 23, 2016] . GoAccess 1.1.1 Released. See ChangeLog for new features/bug-fixes. - 1.1 [Tuesday, November 08, 2016] . GoAccess 1.1 Released. See ChangeLog for new features/bug-fixes. - 1.0.2 [Tuesday, July 05, 2016] . GoAccess 1.0.2 Released. See ChangeLog for new features/bug-fixes. - 1.0.1 [Friday, June 17, 2016] . GoAccess 1.0.1 Released. See ChangeLog for new features/bug-fixes. - 1.0 [Thursday, June 09, 2016] . GoAccess 1.0 Released. See ChangeLog for new features/bug-fixes. - 0.9.8 [Monday, February 29, 2016] . GoAccess 0.9.8 Released. See ChangeLog for new features/bug-fixes. - 0.9.7 [Monday, December 21, 2015] . GoAccess 0.9.7 Released. See ChangeLog for new features/bug-fixes. - 0.9.6 [Tuesday, October 27, 2015] . GoAccess 0.9.6 Released. See ChangeLog for new features/bug-fixes. - 0.9.5 [Thursday, October 22, 2015] . GoAccess 0.9.5 Released. See ChangeLog for new features/bug-fixes. - 0.9.4 [Tuesday, September 08 , 2015] . GoAccess 0.9.4 Released. See ChangeLog for new features/bug-fixes. - 0.9.3 [Wednesday, August 28, 2015] . GoAccess 0.9.3 Released. See ChangeLog for new features/bug-fixes. - 0.9.2 [Monday, July 06, 2015] . GoAccess 0.9.2 Released. See ChangeLog for new features/bug-fixes. - 0.9.1 [Tuesday, May 26, 2015] . GoAccess 0.9.1 Released. See ChangeLog for new features/bug-fixes. - 0.9 [Thursday, March 19, 2015] . GoAccess 0.9 Released. See ChangeLog for new features/bug-fixes. - 0.8.5 [Sunday, September 14, 2014] . GoAccess 0.8.5 Released. See ChangeLog for new features/bug-fixes. - 0.8.4 [Monday, September 08, 2014] . GoAccess 0.8.4 Released. See ChangeLog for new features/bug-fixes. - 0.8.3 [Monday, July 28, 2014] . GoAccess 0.8.3 Released. See ChangeLog for new features/bug-fixes. - 0.8.2 [Monday, July 21, 2014] . GoAccess 0.8.2 Released. See ChangeLog for new features/bug-fixes. - 0.8.1 [Monday, June 16, 2014] . GoAccess 0.8.1 Released. See ChangeLog for new features/bug-fixes. - 0.8 [Monday, May 20, 2013] . GoAccess 0.8 Released. See ChangeLog for new features/bug-fixes. - 0.7.1 [Monday, February 17, 2014] . GoAccess 0.7.1 Released. See ChangeLog for new features/bug-fixes. - 0.7 [Monday, December 16, 2013] . GoAccess 0.7 Released. See ChangeLog for new features/bug-fixes. - 0.6.1 [Monday, October 07, 2013] . GoAccess 0.6.1 Released. See ChangeLog for new features/bug-fixes. - 0.6 [Monday, July 15, 2013] . GoAccess 0.6 Released. See ChangeLog for new features/bug-fixes. - 0.5 [Monday, June 04, 2012] . GoAccess 0.5 Released. See ChangeLog for new features/bug-fixes. - 0.4.2 [Monday, January 03, 2011] . GoAccess 0.4.2 Released. See ChangeLog for new features/bug-fixes. - 0.4.1 [Monday, December 13, 2010] . GoAccess 0.4.1 Released. See ChangeLog for new features/bug-fixes. - 0.4 [Tuesday, November 30, 2010] . GoAccess 0.4 Released. See ChangeLog for new features/bug-fixes. - 0.3.3 [Monday, September 27, 2010] . GoAccess 0.3.3 Released. See ChangeLog for new features/bug-fixes. - 0.3.2 [Thursday, September 09 2010] . GoAccess 0.3.2 Released. See ChangeLog for new features/bug-fixes. - 0.3.1 [Friday, September 03, 2010] . GoAccess 0.3.1 Released. See ChangeLog for new features/bug-fixes. - 0.3 [Sunday, August 29, 2010] . GoAccess 0.3 Released. See ChangeLog for new features/bug-fixes. - 0.2 [Sunday, July 25, 2010] . GoAccess 0.2 Released. See ChangeLog for new features/bug-fixes. - 0.1.2 [Tuesday, July 13, 2010] . GoAccess 0.1.2 Released. See ChangeLog for new features/bug-fixes. - 0.1.1 [Saturday, July 10, 2010] . GoAccess 0.1.1 Released. See ChangeLog for new features/bug-fixes. - 0.1 [Wednesday, July 07, 2010] . Welcome to the GoAccess 0.1 Released. goaccess-1.9.3/configure0000755000175000017300000120123714626466504010724 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.72 for goaccess 1.9.3. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case e in #( e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else case e in #( e) exitcode=1; echo positional parameters were not saved. ;; esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else case e in #( e) as_have_required=no ;; esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi ;; esac fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and hello@goaccess.io $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi ;; esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' t clear :clear s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='goaccess' PACKAGE_TARNAME='goaccess' PACKAGE_VERSION='1.9.3' PACKAGE_STRING='goaccess 1.9.3' PACKAGE_BUGREPORT='hello@goaccess.io' PACKAGE_URL='https://goaccess.io' ac_unique_file="src/goaccess.c" gt_needs= # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_func_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS POW_LIB LIBOBJS EGREP GREP USE_MMAP_FALSE USE_MMAP_TRUE HAS_SEDTR_FALSE HAS_SEDTR_TRUE TR_CHECK SED_CHECK GEOIP_MMDB_FALSE GEOIP_MMDB_TRUE GEOIP_LEGACY_FALSE GEOIP_LEGACY_TRUE USE_SHA1_FALSE USE_SHA1_TRUE WITH_ASAN_FALSE WITH_ASAN_TRUE WITH_RDYNAMIC_FALSE WITH_RDYNAMIC_TRUE DEBUG_FALSE DEBUG_TRUE POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS CPP host_os host_vendor host_cpu host build_os build_vendor build_cpu build XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_nls with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix enable_debug enable_asan with_openssl enable_geoip with_getline enable_utf8 ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: '$ac_option' Try '$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF 'configure' configures goaccess 1.9.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, 'make install' will install all the files in '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify an installation prefix other than '$ac_default_prefix' using '--prefix', for instance '--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/goaccess] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of goaccess 1.9.3:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --enable-debug Create a debug build. Default is disabled --enable-asan Enable address sanitizer --enable-geoip Enable GeoIP country lookup. Supported types: mmdb, legacy. Default is disabled --enable-utf8 Enable ncurses library that handles wide characters. Default is disabled Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-openssl Build with OpenSSL support. Default is disabled --with-getline Build using dynamic line buffer. Default is disabled Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . goaccess home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF goaccess configure 1.9.3 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status ;; esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (void); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) eval "$3=yes" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 printf %s "checking for int$2_t... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main (void) { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main (void) { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if eval test \"x\$"$3"\" = x"no" then : else case e in #( e) break ;; esac fi done ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 printf %s "checking for uint$2_t... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if eval test \"x\$"$3"\" = x"no" then : else case e in #( e) break ;; esac fi done ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by goaccess $as_me 1.9.3, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See 'config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (char **p, int i) { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* C89 style stringification. */ #define noexpand_stringify(a) #a const char *stringified = noexpand_stringify(arbitrary+token=sequence); /* C89 style token pasting. Exercises some of the corner cases that e.g. old MSVC gets wrong, but not very hard. */ #define noexpand_concat(a,b) a##b #define expand_concat(a,b) noexpand_concat(a,b) extern int vA; extern int vbee; #define aye A #define bee B int *pvA = &expand_concat(v,aye); int *pvbee = &noexpand_concat(v,bee); /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' /* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif // See if C++-style comments work. #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Work around memory leak warnings. free (ia); // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' /* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " gt_needs="$gt_needs " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" as_fn_append ac_func_c_list " alarm HAVE_ALARM" # Auxiliary files required by this configure script. ac_aux_files="config.guess config.sub config.rpath compile missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; esac fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir ;; esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS ;; esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use plain mkdir -p, # in the hope it doesn't have the bugs of ancient mkdir. MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='goaccess' VERSION='1.9.3' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers src/config.h" # Use empty CFLAGS by default so autoconf does not add # CFLAGS="-O2 -g" # NOTE: Needs to go after AC_INIT and before AC_PROG_CC to select an # empty default instead. : ${CFLAGS=""} # Prefer host default compiler ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in cc gcc clang do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cc gcc clang do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else case e in #( e) ac_file='' ;; esac fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will # work properly (i.e., refer to 'conftest.exe'), while it won't with # 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); if (!f) return 1; return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use '--host'. See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext \ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Check for programs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 printf %s "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test ${enable_nls+y} then : enableval=$enable_nls; USE_NLS=$enableval else case e in #( e) USE_NLS=yes ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf "%s\n" "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.19 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGFMT+y} then : printf %s "(cached) " >&6 else case e in #( e) case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 printf "%s\n" "$MSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GMSGFMT+y} then : printf %s "(cached) " >&6 else case e in #( e) case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 printf "%s\n" "$GMSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XGETTEXT+y} then : printf %s "(cached) " >&6 else case e in #( e) case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 printf "%s\n" "$XGETTEXT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGMERGE+y} then : printf %s "(cached) " >&6 else case e in #( e) case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 printf "%s\n" "$MSGMERGE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else case e in #( e) with_gnu_ld=no ;; esac fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${acl_cv_path_LD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 &5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${acl_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else case e in #( e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 printf %s "checking for shared library run path origin... " >&6; } if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 else case e in #( e) CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 printf "%s\n" "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test ${enable_rpath+y} then : enableval=$enable_rpath; : else case e in #( e) enable_rpath=yes ;; esac fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else case e in #( e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_prog_CPP=$CPP ;; esac fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See 'config.log' for more details" "$LINENO" 5; } ;; esac fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 printf %s "checking for egrep -e... " >&6; } if test ${ac_cv_path_EGREP_TRADITIONAL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then : fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi if test "$ac_cv_path_EGREP_TRADITIONAL" then : ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 printf %s "checking for 64-bit host... " >&6; } if test ${gl_cv_solaris_64bit+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "sixtyfour bits" >/dev/null 2>&1 then : gl_cv_solaris_64bit=yes else case e in #( e) gl_cv_solaris_64bit=no ;; esac fi rm -rf conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 printf "%s\n" "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test ${with_libiconv_prefix+y} then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 printf %s "checking for CFPreferencesCopyAppValue... " >&6; } if test ${gt_cv_func_CFPreferencesCopyAppValue+y} then : printf %s "(cached) " >&6 else case e in #( e) gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFPreferencesCopyAppValue=yes else case e in #( e) gt_cv_func_CFPreferencesCopyAppValue=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 printf %s "checking for CFLocaleCopyCurrent... " >&6; } if test ${gt_cv_func_CFLocaleCopyCurrent+y} then : printf %s "(cached) " >&6 else case e in #( e) gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFLocaleCopyCurrent=yes else case e in #( e) gt_cv_func_CFLocaleCopyCurrent=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 printf %s "checking for GNU gettext in libc... " >&6; } if eval test \${$gt_func_gnugettext_libc+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libc=yes" else case e in #( e) eval "$gt_func_gnugettext_libc=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi eval ac_res=\$$gt_func_gnugettext_libc { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else case e in #( e) am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else case e in #( e) am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; const char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes else case e in #( e) am_cv_func_iconv_works=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi LIBS="$am_save_LIBS" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf "%s\n" "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test ${with_libintl_prefix+y} then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 printf %s "checking for GNU gettext in libintl... " >&6; } if eval test \${$gt_func_gnugettext_libintl+y} then : printf %s "(cached) " >&6 else case e in #( e) gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libintl=yes" else case e in #( e) eval "$gt_func_gnugettext_libintl=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" ;; esac fi eval ac_res=\$$gt_func_gnugettext_libintl { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 printf %s "checking whether to use NLS... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf "%s\n" "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 printf %s "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 printf "%s\n" "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 printf %s "checking how to link with libintl... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 printf "%s\n" "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" # Fix `undefined reference to `libintl_gettext'` on docker: { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libintl_dgettext in -lintl" >&5 printf %s "checking for libintl_dgettext in -lintl... " >&6; } if test ${ac_cv_lib_intl_libintl_dgettext+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char libintl_dgettext (void); int main (void) { return libintl_dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_intl_libintl_dgettext=yes else case e in #( e) ac_cv_lib_intl_libintl_dgettext=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_libintl_dgettext" >&5 printf "%s\n" "$ac_cv_lib_intl_libintl_dgettext" >&6; } if test "x$ac_cv_lib_intl_libintl_dgettext" = xyes then : printf "%s\n" "#define HAVE_LIBINTL 1" >>confdefs.h LIBS="-lintl $LIBS" fi # Fix undefined reference to dgettext on NetBSD { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 printf %s "checking for dgettext in -lintl... " >&6; } if test ${ac_cv_lib_intl_dgettext+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dgettext (void); int main (void) { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_intl_dgettext=yes else case e in #( e) ac_cv_lib_intl_dgettext=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 printf "%s\n" "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = xyes then : printf "%s\n" "#define HAVE_LIBINTL 1" >>confdefs.h LIBS="-lintl $LIBS" fi # pthread { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 printf %s "checking for pthread_create in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_create+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char pthread_create (void); int main (void) { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_create=yes else case e in #( e) ac_cv_lib_pthread_pthread_create=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes then : printf "%s\n" "#define HAVE_LIBPTHREAD 1" >>confdefs.h LIBS="-lpthread $LIBS" else case e in #( e) as_fn_error $? "pthread is missing" "$LINENO" 5 ;; esac fi CFLAGS="$CFLAGS -pthread" # DEBUG # Check whether --enable-debug was given. if test ${enable_debug+y} then : enableval=$enable_debug; debug="$enableval" else case e in #( e) debug=no ;; esac fi if test "$debug" = "yes"; then printf "%s\n" "#define _DEBUG 1" >>confdefs.h fi if test "x$debug" = "xyes"; then DEBUG_TRUE= DEBUG_FALSE='#' else DEBUG_TRUE='#' DEBUG_FALSE= fi # Handle rdynamic only on systems using GNU ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with rdynamic for GNU ld" >&5 printf %s "checking whether to build with rdynamic for GNU ld... " >&6; } with_rdyanimc=yes case "$host_os" in *darwin*|*cygwin*|*aix*|*mingw*) with_rdyanimc=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_rdyanimc" >&5 printf "%s\n" "$with_rdyanimc" >&6; } if test "x$with_rdyanimc" = "xyes"; then WITH_RDYNAMIC_TRUE= WITH_RDYNAMIC_FALSE='#' else WITH_RDYNAMIC_TRUE='#' WITH_RDYNAMIC_FALSE= fi # Add ASAN # Check whether --enable-asan was given. if test ${enable_asan+y} then : enableval=$enable_asan; with_asan=$enableval else case e in #( e) with_asan=no ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with address sanitizer" >&5 printf %s "checking whether to build with address sanitizer... " >&6; } case "$host_os" in *cygwin*|*aix*|*mingw*) with_asan=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_asan" >&5 printf "%s\n" "$with_asan" >&6; } if test "x$with_asan" = "xyes"; then WITH_ASAN_TRUE= WITH_ASAN_FALSE='#' else WITH_ASAN_TRUE='#' WITH_ASAN_FALSE= fi # Check for libc implementation on NetBSD ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sha.h" "ac_cv_header_sha_h" "$ac_includes_default" if test "x$ac_cv_header_sha_h" = xyes then : printf "%s\n" "#define HAVE_SHA_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sha1.h" "ac_cv_header_sha1_h" "$ac_includes_default" if test "x$ac_cv_header_sha1_h" = xyes then : printf "%s\n" "#define HAVE_SHA1_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "SHA1Init" "ac_cv_func_SHA1Init" if test "x$ac_cv_func_SHA1Init" = xyes then : printf "%s\n" "#define HAVE_SHA1INIT 1" >>confdefs.h fi if test "x$ac_cv_func_SHA1Init" != "xyes"; then USE_SHA1_TRUE= USE_SHA1_FALSE='#' else USE_SHA1_TRUE='#' USE_SHA1_FALSE= fi # Build with OpenSSL # Check whether --with-openssl was given. if test ${with_openssl+y} then : withval=$with_openssl; openssl="$withval" else case e in #( e) openssl="no" ;; esac fi if test "$openssl" = 'yes'; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 printf %s "checking for SSL_CTX_new in -lssl... " >&6; } if test ${ac_cv_lib_ssl_SSL_CTX_new+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char SSL_CTX_new (void); int main (void) { return SSL_CTX_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ssl_SSL_CTX_new=yes else case e in #( e) ac_cv_lib_ssl_SSL_CTX_new=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5 printf "%s\n" "$ac_cv_lib_ssl_SSL_CTX_new" >&6; } if test "x$ac_cv_lib_ssl_SSL_CTX_new" = xyes then : printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h LIBS="-lssl $LIBS" else case e in #( e) as_fn_error $? "ssl library missing" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_free in -lcrypto" >&5 printf %s "checking for CRYPTO_free in -lcrypto... " >&6; } if test ${ac_cv_lib_crypto_CRYPTO_free+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char CRYPTO_free (void); int main (void) { return CRYPTO_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_crypto_CRYPTO_free=yes else case e in #( e) ac_cv_lib_crypto_CRYPTO_free=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_free" >&5 printf "%s\n" "$ac_cv_lib_crypto_CRYPTO_free" >&6; } if test "x$ac_cv_lib_crypto_CRYPTO_free" = xyes then : printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h LIBS="-lcrypto $LIBS" else case e in #( e) as_fn_error $? "crypto library missing" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_CIPHER_standard_name in -lssl" >&5 printf %s "checking for SSL_CIPHER_standard_name in -lssl... " >&6; } if test ${ac_cv_lib_ssl_SSL_CIPHER_standard_name+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char SSL_CIPHER_standard_name (void); int main (void) { return SSL_CIPHER_standard_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ssl_SSL_CIPHER_standard_name=yes else case e in #( e) ac_cv_lib_ssl_SSL_CIPHER_standard_name=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CIPHER_standard_name" >&5 printf "%s\n" "$ac_cv_lib_ssl_SSL_CIPHER_standard_name" >&6; } if test "x$ac_cv_lib_ssl_SSL_CIPHER_standard_name" = xyes then : printf "%s\n" "#define HAVE_CIPHER_STD_NAME 1" >>confdefs.h fi fi # GeoIP # Check whether --enable-geoip was given. if test ${enable_geoip+y} then : enableval=$enable_geoip; geoip="$enableval" else case e in #( e) geoip=no ;; esac fi geolocation="N/A" if test "$geoip" = "mmdb"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MMDB_open in -lmaxminddb" >&5 printf %s "checking for MMDB_open in -lmaxminddb... " >&6; } if test ${ac_cv_lib_maxminddb_MMDB_open+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmaxminddb $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char MMDB_open (void); int main (void) { return MMDB_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_maxminddb_MMDB_open=yes else case e in #( e) ac_cv_lib_maxminddb_MMDB_open=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_maxminddb_MMDB_open" >&5 printf "%s\n" "$ac_cv_lib_maxminddb_MMDB_open" >&6; } if test "x$ac_cv_lib_maxminddb_MMDB_open" = xyes then : printf "%s\n" "#define HAVE_LIBMAXMINDDB 1" >>confdefs.h LIBS="-lmaxminddb $LIBS" else case e in #( e) as_fn_error $? " *** Missing development files for libmaxminddb library. " "$LINENO" 5 ;; esac fi geolocation="GeoIP2" printf "%s\n" "#define HAVE_GEOLOCATION 1" >>confdefs.h elif test "$geoip" = "legacy"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GeoIP_new in -lGeoIP" >&5 printf %s "checking for GeoIP_new in -lGeoIP... " >&6; } if test ${ac_cv_lib_GeoIP_GeoIP_new+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lGeoIP $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char GeoIP_new (void); int main (void) { return GeoIP_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_GeoIP_GeoIP_new=yes else case e in #( e) ac_cv_lib_GeoIP_GeoIP_new=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GeoIP_GeoIP_new" >&5 printf "%s\n" "$ac_cv_lib_GeoIP_GeoIP_new" >&6; } if test "x$ac_cv_lib_GeoIP_GeoIP_new" = xyes then : printf "%s\n" "#define HAVE_LIBGEOIP 1" >>confdefs.h LIBS="-lGeoIP $LIBS" else case e in #( e) as_fn_error $? " *** Missing development files for the GeoIP library " "$LINENO" 5 ;; esac fi geolocation="GeoIP Legacy" printf "%s\n" "#define HAVE_GEOLOCATION 1" >>confdefs.h elif test "$geoip" != "no"; then as_fn_error $? "*** Invalid argument for GeoIP: $geoip" "$LINENO" 5 fi if test "x$geoip" = "xlegacy"; then GEOIP_LEGACY_TRUE= GEOIP_LEGACY_FALSE='#' else GEOIP_LEGACY_TRUE='#' GEOIP_LEGACY_FALSE= fi if test "x$geoip" = "xmmdb"; then GEOIP_MMDB_TRUE= GEOIP_MMDB_FALSE='#' else GEOIP_MMDB_TRUE='#' GEOIP_MMDB_FALSE= fi # GNU getline / POSIX.1-2008 # Check whether --with-getline was given. if test ${with_getline+y} then : withval=$with_getline; with_getline=$withval else case e in #( e) with_getline=no ;; esac fi if test "$with_getline" = "yes"; then printf "%s\n" "#define WITH_GETLINE 1" >>confdefs.h fi # UTF8 # Check whether --enable-utf8 was given. if test ${enable_utf8+y} then : enableval=$enable_utf8; utf8="$enableval" else case e in #( e) utf8=no ;; esac fi if test "$utf8" = "yes"; then libncursesw=ncursesw # Simply called libncurses on OS X case "$host_os" in *darwin*) libncursesw=ncurses ;; esac as_ac_Lib=`printf "%s\n" "ac_cv_lib_$libncursesw""_mvaddwstr" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mvaddwstr in -l$libncursesw" >&5 printf %s "checking for mvaddwstr in -l$libncursesw... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-l$libncursesw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char mvaddwstr (void); int main (void) { return mvaddwstr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else case e in #( e) eval "$as_ac_Lib=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf "%s\n" "HAVE_LIB$libncursesw" | sed "$as_sed_cpp"` 1 _ACEOF LIBS="-l$libncursesw $LIBS" else case e in #( e) as_fn_error $? "*** Missing development libraries for ncursesw" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 printf %s "checking for library containing tputs... " >&6; } if test ${ac_cv_search_tputs+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char tputs (void); int main (void) { return tputs (); ; return 0; } _ACEOF for ac_lib in '' tinfow do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_tputs=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_tputs+y} then : break fi done if test ${ac_cv_search_tputs+y} then : else case e in #( e) ac_cv_search_tputs=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 printf "%s\n" "$ac_cv_search_tputs" >&6; } ac_res=$ac_cv_search_tputs if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else case e in #( e) as_fn_error $? "Cannot find a library providing tputs" "$LINENO" 5 ;; esac fi printf "%s\n" "#define HAVE_LIBNCURSESW 1" >>confdefs.h have_ncurses="yes" for ac_header in ncursesw/ncurses.h do : ac_fn_c_check_header_compile "$LINENO" "ncursesw/ncurses.h" "ac_cv_header_ncursesw_ncurses_h" " #ifdef HAVE_NCURSESW_NCURSES_H #include #endif " if test "x$ac_cv_header_ncursesw_ncurses_h" = xyes then : printf "%s\n" "#define HAVE_NCURSESW_NCURSES_H 1" >>confdefs.h have_ncurses=yes fi done for ac_header in ncurses.h do : ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" " #ifdef HAVE_NCURSES_H #include #endif " if test "x$ac_cv_header_ncurses_h" = xyes then : printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h have_ncurses=yes fi done if test "$have_ncurses" != "yes"; then as_fn_error $? "Missing ncursesw header file" "$LINENO" 5 fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for refresh in -lncurses" >&5 printf %s "checking for refresh in -lncurses... " >&6; } if test ${ac_cv_lib_ncurses_refresh+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char refresh (void); int main (void) { return refresh (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ncurses_refresh=yes else case e in #( e) ac_cv_lib_ncurses_refresh=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_refresh" >&5 printf "%s\n" "$ac_cv_lib_ncurses_refresh" >&6; } if test "x$ac_cv_lib_ncurses_refresh" = xyes then : printf "%s\n" "#define HAVE_LIBNCURSES 1" >>confdefs.h LIBS="-lncurses $LIBS" else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for refresh in -lcurses" >&5 printf %s "checking for refresh in -lcurses... " >&6; } if test ${ac_cv_lib_curses_refresh+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char refresh (void); int main (void) { return refresh (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_curses_refresh=yes else case e in #( e) ac_cv_lib_curses_refresh=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_refresh" >&5 printf "%s\n" "$ac_cv_lib_curses_refresh" >&6; } if test "x$ac_cv_lib_curses_refresh" = xyes then : printf "%s\n" "#define HAVE_LIBCURSES 1" >>confdefs.h LIBS="-lcurses $LIBS" else case e in #( e) as_fn_error $? "*** Missing development libraries for ncurses" "$LINENO" 5 ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 printf %s "checking for library containing tputs... " >&6; } if test ${ac_cv_search_tputs+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char tputs (void); int main (void) { return tputs (); ; return 0; } _ACEOF for ac_lib in '' tinfo do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_tputs=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_tputs+y} then : break fi done if test ${ac_cv_search_tputs+y} then : else case e in #( e) ac_cv_search_tputs=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 printf "%s\n" "$ac_cv_search_tputs" >&6; } ac_res=$ac_cv_search_tputs if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else case e in #( e) as_fn_error $? "Cannot find a library providing tputs" "$LINENO" 5 ;; esac fi have_ncurses="yes" for ac_header in ncurses/ncurses.h do : ac_fn_c_check_header_compile "$LINENO" "ncurses/ncurses.h" "ac_cv_header_ncurses_ncurses_h" " #ifdef HAVE_NCURSES_NCURSES_H #include #endif " if test "x$ac_cv_header_ncurses_ncurses_h" = xyes then : printf "%s\n" "#define HAVE_NCURSES_NCURSES_H 1" >>confdefs.h have_ncurses=yes fi done for ac_header in ncurses.h do : ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" " #ifdef HAVE_NCURSES_H #include #endif " if test "x$ac_cv_header_ncurses_h" = xyes then : printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h have_ncurses=yes fi done for ac_header in curses.h do : ac_fn_c_check_header_compile "$LINENO" "curses.h" "ac_cv_header_curses_h" " #ifdef HAVE_CURSES_H #include #endif " if test "x$ac_cv_header_curses_h" = xyes then : printf "%s\n" "#define HAVE_CURSES_H 1" >>confdefs.h have_ncurses=yes fi done if test "$have_ncurses" != "yes"; then as_fn_error $? "Missing ncurses header file" "$LINENO" 5 fi fi # Default Hash storage="In-Memory with On-Disk Persistent Storage" HAS_SEDTR=no # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_SED_CHECK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$SED_CHECK"; then ac_cv_prog_SED_CHECK="$SED_CHECK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_SED_CHECK="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_SED_CHECK" && ac_cv_prog_SED_CHECK="no" fi ;; esac fi SED_CHECK=$ac_cv_prog_SED_CHECK if test -n "$SED_CHECK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SED_CHECK" >&5 printf "%s\n" "$SED_CHECK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test x"$SED_CHECK" = x"yes" ; then # Extract the first word of "tr", so it can be a program name with args. set dummy tr; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_TR_CHECK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$TR_CHECK"; then ac_cv_prog_TR_CHECK="$TR_CHECK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_TR_CHECK="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_TR_CHECK" && ac_cv_prog_TR_CHECK="no" fi ;; esac fi TR_CHECK=$ac_cv_prog_TR_CHECK if test -n "$TR_CHECK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TR_CHECK" >&5 printf "%s\n" "$TR_CHECK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test x"$TR_CHECK" = x"yes" ; then HAS_SEDTR=yes fi fi if test "x$HAS_SEDTR" = xyes; then HAS_SEDTR_TRUE= HAS_SEDTR_FALSE='#' else HAS_SEDTR_TRUE='#' HAS_SEDTR_FALSE= fi # detect Cygwin or MinGW and use mmap family replacements USE_MMAP=no case $host in *-*-mingw32* | *-*-cygwin* | *-*-windows*) USE_MMAP=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using custom mmap for Cygwin/MinGW" >&5 printf "%s\n" "$as_me: using custom mmap for Cygwin/MinGW" >&6;} ;; esac if test "x$USE_MMAP" = xyes; then USE_MMAP_TRUE= USE_MMAP_FALSE='#' else USE_MMAP_TRUE='#' USE_MMAP_FALSE= fi # Solaris { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 printf %s "checking for gethostbyname in -lnsl... " >&6; } if test ${ac_cv_lib_nsl_gethostbyname+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char gethostbyname (void); int main (void) { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_nsl_gethostbyname=yes else case e in #( e) ac_cv_lib_nsl_gethostbyname=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes then : printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h LIBS="-lnsl $LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 printf %s "checking for socket in -lsocket... " >&6; } if test ${ac_cv_lib_socket_socket+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char socket (void); int main (void) { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_socket=yes else case e in #( e) ac_cv_lib_socket_socket=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes then : printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h LIBS="-lsocket $LIBS" fi # Checks for header files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in #( *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" # Autoupdate added the next two lines to ensure that your configure # script's behavior did not change. They are probably safe to remove. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" EGREP_TRADITIONAL=$EGREP ac_cv_path_EGREP_TRADITIONAL=$EGREP ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" if test "x$ac_cv_header_arpa_inet_h" = xyes then : printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = xyes then : printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes then : printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes then : printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" if test "x$ac_cv_header_netdb_h" = xyes then : printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes then : printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" if test "x$ac_cv_header_stddef_h" = xyes then : printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" if test "x$ac_cv_header_stdint_h" = xyes then : printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes then : printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" if test "x$ac_cv_header_strings_h" = xyes then : printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi # Checks for typedefs, structures, and compiler characteristics. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes else case e in #( e) ac_cv_c_const=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf "%s\n" "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" if test "x$ac_cv_type_ptrdiff_t" = xyes then : printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_tm=time.h else case e in #( e) ac_cv_struct_tm=sys/time.h ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" case $ac_cv_c_int64_t in #( no|yes) ;; #( *) printf "%s\n" "#define int64_t $ac_cv_c_int64_t" >>confdefs.h ;; esac ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" case $ac_cv_c_int8_t in #( no|yes) ;; #( *) printf "%s\n" "#define int8_t $ac_cv_c_int8_t" >>confdefs.h ;; esac ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes then : else case e in #( e) printf "%s\n" "#define off_t long int" >>confdefs.h ;; esac fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : else case e in #( e) printf "%s\n" "#define size_t unsigned int" >>confdefs.h ;; esac fi ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) printf "%s\n" "#define _UINT32_T 1" >>confdefs.h printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h ;; esac ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" case $ac_cv_c_uint64_t in #( no|yes) ;; #( *) printf "%s\n" "#define _UINT64_T 1" >>confdefs.h printf "%s\n" "#define uint64_t $ac_cv_c_uint64_t" >>confdefs.h ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) printf "%s\n" "#define _UINT8_T 1" >>confdefs.h printf "%s\n" "#define uint8_t $ac_cv_c_uint8_t" >>confdefs.h ;; esac # Checks for library functions. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declarations of fseeko and ftello" >&5 printf %s "checking for declarations of fseeko and ftello... " >&6; } if test ${ac_cv_func_fseeko_ftello+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __hpux && !defined _LARGEFILE_SOURCE # include # if LONG_MAX >> 31 == 0 # error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++" # endif #endif #include /* for off_t */ #include int main (void) { int (*fp1) (FILE *, off_t, int) = fseeko; off_t (*fp2) (FILE *) = ftello; return fseeko (stdin, 0, 0) && fp1 (stdin, 0, 0) && ftello (stdin) >= 0 && fp2 (stdin) >= 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_fseeko_ftello=yes else case e in #( e) ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE=1" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __hpux && !defined _LARGEFILE_SOURCE # include # if LONG_MAX >> 31 == 0 # error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++" # endif #endif #include /* for off_t */ #include int main (void) { int (*fp1) (FILE *, off_t, int) = fseeko; off_t (*fp2) (FILE *) = ftello; return fseeko (stdin, 0, 0) && fp1 (stdin, 0, 0) && ftello (stdin) >= 0 && fp2 (stdin) >= 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_fseeko_ftello="need _LARGEFILE_SOURCE" else case e in #( e) ac_cv_func_fseeko_ftello=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fseeko_ftello" >&5 printf "%s\n" "$ac_cv_func_fseeko_ftello" >&6; } if test "$ac_cv_func_fseeko_ftello" != no then : printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h fi if test "$ac_cv_func_fseeko_ftello" = "need _LARGEFILE_SOURCE" then : printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 printf %s "checking for working memcmp... " >&6; } if test ${ac_cv_func_memcmp_working+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : ac_cv_func_memcmp_working=no else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_memcmp_working=yes else case e in #( e) ac_cv_func_memcmp_working=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 printf "%s\n" "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac ac_func= for ac_item in $ac_func_c_list do if test $ac_func; then ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then echo "#define $ac_item 1" >> confdefs.h fi ac_func= else ac_func=$ac_item fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 printf %s "checking for working mktime... " >&6; } if test ${ac_cv_func_working_mktime+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : ac_cv_func_working_mktime=no else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Test program from Paul Eggert and Tony Leneis. */ #include #ifdef HAVE_SYS_TIME_H # include #endif #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef HAVE_ALARM # define alarm(X) /* empty */ #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ static const char *tz_strings[] = { (const char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) /* Return 0 if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static int spring_forward_gap (void) { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; return mktime (&tm) != (time_t) -1; } static int mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) && mktime_test1 ((time_t) (time_t_min + now))); } static int irix_6_4_bug (void) { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); return tm.tm_mon == 2 && tm.tm_mday == 31; } static int bigtime_test (int j) { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) return 0; } return 1; } static int year_2050_test (void) { /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ignoring leap seconds. */ unsigned long int answer = 2527315200UL; struct tm tm; time_t t; tm.tm_year = 2050 - 1900; tm.tm_mon = 2 - 1; tm.tm_mday = 1; tm.tm_hour = tm.tm_min = tm.tm_sec = 0; tm.tm_isdst = -1; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); /* Check that the result is either a failure, or close enough to the correct answer that we can assume the discrepancy is due to leap seconds. */ return (t == (time_t) -1 || (0 < t && answer - 120 <= t && t <= answer + 120)); } int main (void) { time_t t, delta; int i, j; /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ alarm (60); for (;;) { t = (time_t_max << 1) + 1; if (t <= time_t_max) break; time_t_max = t; } time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv ((char*) tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) return 1; if (! (mktime_test ((time_t) 1) && mktime_test ((time_t) (60 * 60)) && mktime_test ((time_t) (60 * 60 * 24)))) return 1; for (j = 1; ; j <<= 1) if (! bigtime_test (j)) return 1; else if (INT_MAX / 2 < j) break; if (! bigtime_test (INT_MAX)) return 1; } return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_working_mktime=yes else case e in #( e) ac_cv_func_working_mktime=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 printf "%s\n" "$ac_cv_func_working_mktime" >&6; } if test $ac_cv_func_working_mktime = no; then case " $LIBOBJS " in *" mktime.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 printf %s "checking whether lstat correctly handles trailing slash... " >&6; } if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} then : printf %s "(cached) " >&6 else case e in #( e) rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on glibc systems. *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; # If we don't know, assume the worst. *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; esac else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else case e in #( e) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi else # If the 'ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 printf %s "checking whether stat accepts an empty string... " >&6; } if test ${ac_cv_func_stat_empty_string_bug+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : ac_cv_func_stat_empty_string_bug=yes else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_stat_empty_string_bug=no else case e in #( e) ac_cv_func_stat_empty_string_bug=yes ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h fi for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes then : printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h else case e in #( e) # strftime is in -lintl on SCO UNIX. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 printf %s "checking for strftime in -lintl... " >&6; } if test ${ac_cv_lib_intl_strftime+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char strftime (void); int main (void) { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_intl_strftime=yes else case e in #( e) ac_cv_lib_intl_strftime=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 printf "%s\n" "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes then : printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi ;; esac fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 printf %s "checking for working strtod... " >&6; } if test ${ac_cv_func_strtod+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : ac_cv_func_strtod=no else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { { /* Some versions of Linux strtod mis-parse strings with leading '+'. */ char *string = " +69"; char *term; double value; value = strtod (string, &term); if (value != 69 || term != (string + 4)) return 1; } { /* Under Solaris 2.4, strtod returns the wrong value for the terminating character under some conditions. */ char *string = "NaN"; char *term; strtod (string, &term); if (term != string && *(term - 1) == 0) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_strtod=yes else case e in #( e) ac_cv_func_strtod=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 printf "%s\n" "$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = no; then case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" if test "x$ac_cv_func_pow" = xyes then : fi if test $ac_cv_func_pow = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 printf %s "checking for pow in -lm... " >&6; } if test ${ac_cv_lib_m_pow+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char pow (void); int main (void) { return pow (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_pow=yes else case e in #( e) ac_cv_lib_m_pow=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 printf "%s\n" "$ac_cv_lib_m_pow" >&6; } if test "x$ac_cv_lib_m_pow" = xyes then : POW_LIB=-lm else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 printf "%s\n" "$as_me: WARNING: cannot find library containing definition of pow" >&2;} ;; esac fi fi fi ac_fn_c_check_func "$LINENO" "floor" "ac_cv_func_floor" if test "x$ac_cv_func_floor" = xyes then : printf "%s\n" "#define HAVE_FLOOR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethostbyaddr" "ac_cv_func_gethostbyaddr" if test "x$ac_cv_func_gethostbyaddr" = xyes then : printf "%s\n" "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes then : printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes then : printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "malloc" "ac_cv_func_malloc" if test "x$ac_cv_func_malloc" = xyes then : printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" if test "x$ac_cv_func_memmove" = xyes then : printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" if test "x$ac_cv_func_memset" = xyes then : printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" if test "x$ac_cv_func_mkfifo" = xyes then : printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" if test "x$ac_cv_func_poll" = xyes then : printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "realloc" "ac_cv_func_realloc" if test "x$ac_cv_func_realloc" = xyes then : printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath" if test "x$ac_cv_func_realpath" = xyes then : printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp" if test "x$ac_cv_func_regcomp" = xyes then : printf "%s\n" "#define HAVE_REGCOMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes then : printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" if test "x$ac_cv_func_socket" = xyes then : printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes then : printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" if test "x$ac_cv_func_strchr" = xyes then : printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn" if test "x$ac_cv_func_strcspn" = xyes then : printf "%s\n" "#define HAVE_STRCSPN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" if test "x$ac_cv_func_strdup" = xyes then : printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes then : printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" if test "x$ac_cv_func_strncasecmp" = xyes then : printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk" if test "x$ac_cv_func_strpbrk" = xyes then : printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr" if test "x$ac_cv_func_strrchr" = xyes then : printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strspn" "ac_cv_func_strspn" if test "x$ac_cv_func_strspn" = xyes then : printf "%s\n" "#define HAVE_STRSPN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" if test "x$ac_cv_func_strstr" = xyes then : printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" if test "x$ac_cv_func_strtol" = xyes then : printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" if test "x$ac_cv_func_strtoull" = xyes then : printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm" if test "x$ac_cv_func_timegm" = xyes then : printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h fi ac_config_files="$ac_config_files Makefile po/Makefile.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # 'ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then as_fn_error $? "conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_RDYNAMIC_TRUE}" && test -z "${WITH_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"WITH_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_ASAN_TRUE}" && test -z "${WITH_ASAN_FALSE}"; then as_fn_error $? "conditional \"WITH_ASAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SHA1_TRUE}" && test -z "${USE_SHA1_FALSE}"; then as_fn_error $? "conditional \"USE_SHA1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GEOIP_LEGACY_TRUE}" && test -z "${GEOIP_LEGACY_FALSE}"; then as_fn_error $? "conditional \"GEOIP_LEGACY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GEOIP_MMDB_TRUE}" && test -z "${GEOIP_MMDB_FALSE}"; then as_fn_error $? "conditional \"GEOIP_MMDB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SEDTR_TRUE}" && test -z "${HAS_SEDTR_FALSE}"; then as_fn_error $? "conditional \"HAS_SEDTR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_MMAP_TRUE}" && test -z "${USE_MMAP_FALSE}"; then as_fn_error $? "conditional \"USE_MMAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by goaccess $as_me 1.9.3, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ '$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to . goaccess home page: ." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ goaccess config.status 1.9.3 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: '$1' Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: '$1' Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See 'config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi cat << EOF Your build configuration: Prefix : $prefix Package : $PACKAGE_NAME Version : $VERSION Compiler flags : $CFLAGS Linker flags : $LIBS $LDFLAGS UTF-8 support : $utf8 Dynamic buffer : $with_getline ASan : $with_asan Geolocation : $geolocation Storage method : $storage TLS/SSL : $openssl Bugs : $PACKAGE_BUGREPORT EOF goaccess-1.9.3/install-sh0000744000175000017300000003610114620766657011020 #!/bin/sh # install - install a program, script, or datafile scriptversion=2023-11-23.18; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Report bugs to . GNU Automake home page: . General help using GNU software: ." while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: goaccess-1.9.3/ABOUT-NLS0000644000175000017300000026713314613301667010244 1 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls will _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl' library and will decide to use it. If not, you may have to to use the `--with-libintl-prefix' option to tell `configure' where to look for it. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of June 2010. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca +--------------------------------------------------+ a2ps | [] [] | aegis | | ant-phone | | anubis | | aspell | [] [] | bash | | bfd | | bibshelf | [] | binutils | | bison | | bison-runtime | [] | bluez-pin | [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | | dfarc | | dialog | [] [] | dico | | diffutils | [] | dink | | doodle | | e2fsprogs | [] | enscript | [] | exif | | fetchmail | [] | findutils | [] | flex | [] | freedink | | gas | | gawk | [] [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] [] | gettext-tools | [] [] | gip | [] | gjay | | gliv | [] | glunarclock | [] [] | gnubiff | | gnucash | [] | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | | gold | | gpe-aerial | | gpe-beam | | gpe-bluetooth | | gpe-calendar | | gpe-clock | [] | gpe-conf | | gpe-contacts | | gpe-edit | | gpe-filemanager | | gpe-go | | gpe-login | | gpe-ownerinfo | [] | gpe-package | | gpe-sketchbook | | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | [] [] | gsasl | | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] [] [] | gtick | | gtkam | [] | gtkorphan | [] | gtkspell | [] [] [] | gutenprint | | hello | [] | help2man | | hylafax | | idutils | | indent | [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | | iso_639 | [] [] [] [] | iso_639_3 | | jwhois | | kbd | | keytouch | [] | keytouch-editor | | keytouch-keyboa... | [] | klavaro | [] | latrine | | ld | [] | leafpad | [] [] | libc | [] [] | libexif | () | libextractor | | libgnutls | | libgpewidget | | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | [] | libidn | | lifelines | | liferea | [] [] | lilypond | | linkdr | [] | lordsawar | | lprng | | lynx | [] | m4 | | mailfromd | | mailutils | | make | | man-db | | man-db-manpages | | minicom | | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | | psmisc | | pspp | [] | pwdutils | | radius | [] | recode | [] [] | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] [] | sed | [] [] | sharutils | [] [] | shishi | | skencil | | solfege | | solfege-manual | | soundtracker | | sp | | sysstat | | tar | [] | texinfo | | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] [] | wyslij-po | | xchat | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] | +--------------------------------------------------+ af am an ar as ast az be be@latin bg bn_IN bs ca 6 0 1 2 3 19 1 10 3 28 3 1 38 crh cs da de el en en_GB en_ZA eo es et eu fa +-------------------------------------------------+ a2ps | [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] () | anubis | [] [] | aspell | [] [] [] [] [] | bash | [] [] [] | bfd | [] | bibshelf | [] [] [] | binutils | [] | bison | [] [] | bison-runtime | [] [] [] [] | bluez-pin | [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] [] [] | cflow | [] [] | clisp | [] [] [] [] | coreutils | [] [] [] [] | cpio | | cppi | | cpplib | [] [] [] | cryptsetup | [] | dfarc | [] [] [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] | dink | [] [] [] | doodle | [] | e2fsprogs | [] [] [] | enscript | [] [] [] | exif | () [] [] | fetchmail | [] [] () [] [] [] | findutils | [] [] [] | flex | [] [] | freedink | [] [] [] | gas | [] | gawk | [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] [] | gip | [] [] [] [] | gjay | [] | gliv | [] [] [] | glunarclock | [] [] | gnubiff | () | gnucash | [] () () () () | gnuedu | [] [] | gnulib | [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] [] [] | gpe-edit | [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] () [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] | grub | [] [] | gsasl | [] | gss | | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] () [] | gtkam | [] [] () [] [] | gtkorphan | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] [] [] | hello | [] [] [] [] | help2man | [] | hylafax | [] [] | idutils | [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] [] [] [] () [] [] [] () | iso_3166_2 | () | iso_4217 | [] [] [] () [] [] | iso_639 | [] [] [] [] () [] [] | iso_639_3 | [] | jwhois | [] | kbd | [] [] [] [] [] | keytouch | [] [] | keytouch-editor | [] [] | keytouch-keyboa... | [] | klavaro | [] [] [] [] | latrine | [] () | ld | [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | [] [] | libgphoto2 | [] () | libgphoto2_port | [] () [] | libgsasl | | libiconv | [] [] [] [] [] | libidn | [] [] [] | lifelines | [] () | liferea | [] [] [] [] [] | lilypond | [] [] [] | linkdr | [] [] [] | lordsawar | [] | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] [] | man-db | | man-db-manpages | | minicom | [] [] [] [] | mkisofs | | myserver | | nano | [] [] [] | opcodes | [] [] | parted | [] [] | pies | | popt | [] [] [] [] [] | psmisc | [] [] [] | pspp | [] | pwdutils | [] | radius | [] | recode | [] [] [] [] [] [] | rosegarden | () () () | rpm | [] [] [] | rush | | sarg | | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | | skencil | [] () [] | solfege | [] [] [] | solfege-manual | [] [] | soundtracker | [] [] [] | sp | [] | sysstat | [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] | tin | [] [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] | vice | () () | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] | wyslij-po | | xchat | [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ crh cs da de el en en_GB en_ZA eo es et eu fa 5 64 105 117 18 1 8 0 28 89 18 19 0 fi fr ga gl gu he hi hr hu hy id is it ja ka kn +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | [] [] | ant-phone | [] [] | anubis | [] [] [] [] | aspell | [] [] [] [] | bash | [] [] [] [] | bfd | [] [] [] | bibshelf | [] [] [] [] [] | binutils | [] [] [] | bison | [] [] [] [] | bison-runtime | [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] | cflow | [] [] [] | clisp | [] | coreutils | [] [] [] [] [] | cpio | [] [] [] [] | cppi | [] [] | cpplib | [] [] [] | cryptsetup | [] [] [] | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] [] [] | dink | [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] | freedink | [] [] [] | gas | [] [] | gawk | [] [] [] [] () [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] [] [] | gjay | [] | gliv | [] () | glunarclock | [] [] [] [] | gnubiff | () [] () | gnucash | () () () () () [] | gnuedu | [] [] | gnulib | [] [] [] [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] [] | gpe-aerial | [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] [] [] | gpe-calendar | [] [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] [] | gpe-go | [] [] [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] [] | grub | [] [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] | gtkorphan | [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] | gutenprint | [] [] [] [] | hello | [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | () [] [] [] | iso_4217 | [] () [] [] [] [] | iso_639 | [] () [] [] [] [] [] [] [] | iso_639_3 | () [] [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] [] [] [] | keytouch-editor | [] [] [] [] [] | keytouch-keyboa... | [] [] [] [] [] | klavaro | [] [] | latrine | [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] () | libc | [] [] [] [] [] | libexif | [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] [] | libidn | [] [] [] [] | lifelines | () | liferea | [] [] [] [] | lilypond | [] [] | linkdr | [] [] [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] [] [] | m4 | [] [] [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] [] | man-db | [] [] | man-db-manpages | [] | minicom | [] [] [] [] [] | mkisofs | [] [] [] [] | myserver | | nano | [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] [] | pies | | popt | [] [] [] [] [] [] [] [] [] | psmisc | [] [] [] | pspp | | pwdutils | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () () () () | rpm | [] [] | rush | | sarg | [] | screem | [] [] | scrollkeeper | [] [] [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] | shishi | [] | skencil | [] | solfege | [] [] [] [] | solfege-manual | [] [] | soundtracker | [] [] | sp | [] () | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux-ng | [] [] [] [] [] [] | vice | () () () | vmm | [] | vorbis-tools | [] | wastesedge | () () | wdiff | [] | wget | [] [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] | +----------------------------------------------------+ fi fr ga gl gu he hi hr hu hy id is it ja ka kn 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne +-----------------------------------------------+ a2ps | [] | aegis | | ant-phone | | anubis | [] [] | aspell | [] | bash | | bfd | | bibshelf | [] [] | binutils | | bison | [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] | cpio | | cppi | | cpplib | | cryptsetup | | dfarc | [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] | dink | | doodle | | e2fsprogs | | enscript | | exif | [] | fetchmail | | findutils | | flex | | freedink | [] | gas | | gawk | | gcal | | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] | gettext-tools | [] | gip | [] [] | gjay | | gliv | | glunarclock | [] | gnubiff | | gnucash | () () () () | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | [] | gold | | gpe-aerial | [] | gpe-beam | [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] | gpe-timesheet | [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | | gsasl | | gss | | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | | gtick | | gtkam | [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | | hello | [] [] [] | help2man | | hylafax | | idutils | | indent | | iso_15924 | [] [] | iso_3166 | [] [] () [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] | iso_639 | [] [] | iso_639_3 | [] | jwhois | [] | kbd | | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | klavaro | [] | latrine | [] | ld | | leafpad | [] [] [] | libc | [] | libexif | | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | | libidn | | lifelines | | liferea | | lilypond | | linkdr | | lordsawar | | lprng | | lynx | | m4 | | mailfromd | | mailutils | | make | [] | man-db | | man-db-manpages | | minicom | [] | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | [] [] [] | psmisc | | pspp | | pwdutils | | radius | | recode | | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] | sed | | sharutils | | shishi | | skencil | | solfege | [] | solfege-manual | | soundtracker | | sp | | sysstat | [] | tar | [] | texinfo | [] | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] | wyslij-po | | xchat | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +-----------------------------------------------+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +---------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] | bfd | [] | bibshelf | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] () | buzztard | [] [] | cflow | [] | clisp | [] [] | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] | cryptsetup | [] | dfarc | [] | dialog | [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] [] | dink | () | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | exif | [] [] [] () [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] | gas | | gawk | [] [] [] [] | gcal | | gcc | [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | [] () | gnucash | [] () () () | gnuedu | [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gnutls | [] [] | gold | | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] [] | gphoto2 | [] [] [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | gutenprint | [] [] | hello | [] [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] [] [] [] | iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] [] | klavaro | [] [] | latrine | [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] | libgphoto2_port | [] [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] | lifelines | [] [] | liferea | [] [] [] [] [] () () [] | lilypond | [] | linkdr | [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | pies | [] | popt | [] [] [] [] | psmisc | [] [] [] | pspp | [] [] | pwdutils | [] | radius | [] [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () | rpm | [] [] [] | rush | [] [] | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] [] [] [] | solfege-manual | [] [] [] | soundtracker | [] | sp | | sysstat | [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | [] | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ a2ps | [] [] [] [] [] | 27 aegis | [] | 9 ant-phone | [] [] [] [] | 9 anubis | [] [] [] [] | 15 aspell | [] [] [] | 20 bash | [] [] [] | 12 bfd | [] | 6 bibshelf | [] [] [] | 16 binutils | [] [] | 8 bison | [] [] | 12 bison-runtime | [] [] [] [] [] [] | 29 bluez-pin | [] [] [] [] [] [] [] [] | 37 bombono-dvd | [] | 4 buzztard | [] | 7 cflow | [] [] [] | 9 clisp | | 10 coreutils | [] [] [] [] | 22 cpio | [] [] [] [] [] [] | 13 cppi | [] [] | 5 cpplib | [] [] [] [] [] [] | 14 cryptsetup | [] [] | 7 dfarc | [] | 9 dialog | [] [] [] [] [] [] [] | 30 dico | [] | 2 diffutils | [] [] [] [] [] [] | 30 dink | | 4 doodle | [] [] | 7 e2fsprogs | [] [] [] | 11 enscript | [] [] [] [] | 17 exif | [] [] [] | 16 fetchmail | [] [] [] | 17 findutils | [] [] [] [] [] | 20 flex | [] [] [] [] | 15 freedink | [] | 10 gas | [] | 4 gawk | [] [] [] [] | 18 gcal | [] [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] [] | 34 gettext-runtime | [] [] [] [] [] [] [] | 29 gettext-tools | [] [] [] [] [] [] | 22 gip | [] [] [] [] | 22 gjay | [] | 3 gliv | [] [] [] | 14 glunarclock | [] [] [] [] [] | 19 gnubiff | [] [] | 4 gnucash | () [] () [] () | 10 gnuedu | [] [] | 7 gnulib | [] [] [] [] | 16 gnunet | [] | 1 gnunet-gtk | [] [] [] | 5 gnutls | [] [] [] | 10 gold | [] | 4 gpe-aerial | [] [] [] | 18 gpe-beam | [] [] [] | 19 gpe-bluetooth | [] [] [] | 13 gpe-calendar | [] [] [] [] | 12 gpe-clock | [] [] [] [] [] | 28 gpe-conf | [] [] [] [] | 20 gpe-contacts | [] [] [] | 17 gpe-edit | [] [] [] | 12 gpe-filemanager | [] [] [] [] | 16 gpe-go | [] [] [] [] [] | 25 gpe-login | [] [] [] | 11 gpe-ownerinfo | [] [] [] [] [] | 25 gpe-package | [] [] [] | 13 gpe-sketchbook | [] [] [] | 20 gpe-su | [] [] [] [] [] | 30 gpe-taskmanager | [] [] [] [] [] | 29 gpe-timesheet | [] [] [] [] [] | 25 gpe-today | [] [] [] [] [] [] | 30 gpe-todo | [] [] [] [] | 17 gphoto2 | [] [] [] [] [] | 24 gprof | [] [] [] | 15 gpsdrive | [] [] [] | 11 gramadoir | [] [] [] | 11 grep | [] [] [] | 10 grub | [] [] [] | 14 gsasl | [] [] [] [] | 14 gss | [] [] [] | 11 gst-plugins-bad | [] [] [] [] | 26 gst-plugins-base | [] [] [] [] [] | 24 gst-plugins-good | [] [] [] [] | 24 gst-plugins-ugly | [] [] [] [] [] | 29 gstreamer | [] [] [] [] | 22 gtick | [] [] [] | 13 gtkam | [] [] [] | 20 gtkorphan | [] [] [] | 14 gtkspell | [] [] [] [] [] [] [] [] [] | 45 gutenprint | [] | 10 hello | [] [] [] [] [] [] | 21 help2man | [] [] | 7 hylafax | [] | 5 idutils | [] [] [] [] | 17 indent | [] [] [] [] [] [] | 30 iso_15924 | () [] () [] [] | 16 iso_3166 | [] [] () [] [] () [] [] [] () | 53 iso_3166_2 | () [] () [] | 9 iso_4217 | [] () [] [] () [] [] | 26 iso_639 | [] [] [] () [] () [] [] [] [] | 38 iso_639_3 | [] () | 8 jwhois | [] [] [] [] [] | 16 kbd | [] [] [] [] [] | 15 keytouch | [] [] [] | 16 keytouch-editor | [] [] [] | 14 keytouch-keyboa... | [] [] [] | 14 klavaro | [] | 11 latrine | [] [] [] | 10 ld | [] [] [] [] | 11 leafpad | [] [] [] [] [] [] | 33 libc | [] [] [] [] [] | 21 libexif | [] () | 7 libextractor | [] | 1 libgnutls | [] [] [] | 9 libgpewidget | [] [] [] | 14 libgpg-error | [] [] [] | 9 libgphoto2 | [] [] | 8 libgphoto2_port | [] [] [] [] | 14 libgsasl | [] [] [] | 13 libiconv | [] [] [] [] | 21 libidn | () [] [] | 11 lifelines | [] | 4 liferea | [] [] [] | 21 lilypond | [] | 7 linkdr | [] [] [] [] [] | 17 lordsawar | | 1 lprng | [] | 3 lynx | [] [] [] [] | 17 m4 | [] [] [] [] | 19 mailfromd | [] [] | 3 mailutils | [] | 5 make | [] [] [] [] | 21 man-db | [] [] [] | 8 man-db-manpages | | 4 minicom | [] [] | 16 mkisofs | [] [] | 9 myserver | | 0 nano | [] [] [] [] | 21 opcodes | [] [] [] | 11 parted | [] [] [] [] [] | 15 pies | [] [] | 3 popt | [] [] [] [] [] [] | 27 psmisc | [] [] | 11 pspp | | 4 pwdutils | [] [] | 6 radius | [] [] | 9 recode | [] [] [] [] | 28 rosegarden | () | 0 rpm | [] [] [] | 11 rush | [] [] | 4 sarg | | 1 screem | [] | 3 scrollkeeper | [] [] [] [] [] | 27 sed | [] [] [] [] [] | 30 sharutils | [] [] [] [] [] | 22 shishi | [] | 3 skencil | [] [] | 7 solfege | [] [] [] [] | 16 solfege-manual | [] | 8 soundtracker | [] [] [] | 9 sp | [] | 3 sysstat | [] [] | 15 tar | [] [] [] [] [] [] | 23 texinfo | [] [] [] [] [] | 17 tin | | 4 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux-ng | [] [] [] [] | 20 vice | () () | 1 vmm | [] | 4 vorbis-tools | [] | 6 wastesedge | | 2 wdiff | [] [] | 7 wget | [] [] [] [] [] | 26 wyslij-po | [] [] | 8 xchat | [] [] [] [] [] [] | 36 xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 xkeyboard-config | [] [] [] | 22 +---------------------------------------------------+ 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If June 2010 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.5 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams.