1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

Merge branch 'master' into libdompart1

This commit is contained in:
Witold Filipczyk 2021-04-03 21:42:27 +02:00
commit ca8dac65ce
694 changed files with 38379 additions and 29022 deletions

View File

@ -69,7 +69,7 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
JW = @JW@
DBLATEX = @DBLATEX@
LIBDIR = @LIBDIR@
LIBDOM_CFLAGS = @LIBDOM_CFLAGS@
LIBDOM_LIBS = @LIBDOM_LIBS@
@ -139,7 +139,7 @@ CONFIG_HTML_HIGHLIGHT = @CONFIG_HTML_HIGHLIGHT@
CONFIG_IDN = @CONFIG_IDN@
CONFIG_INTERLINK = @CONFIG_INTERLINK@
CONFIG_IPV6 = @CONFIG_IPV6@
CONFIG_JW = @CONFIG_JW@
CONFIG_DBLATEX = @CONFIG_DBLATEX@
CONFIG_LEDS = @CONFIG_LEDS@
CONFIG_LIBDOM = @CONFIG_LIBDOM@
CONFIG_LZMA = @CONFIG_LZMA@

View File

@ -53,7 +53,7 @@ ecmd = @$(if $($(mquiet)cmd_$(1)),printf "%-38s " $(call quoteverbose,$($(mquiet
quiet_cmd_compile = ' [$(CC_COLOR)CC$(END_COLOR)] $(RELPATH)$@'
masq_cmd_compile = $(COMPILE) -o $(@) -c $< $(2)
cmd_compile = $(COMPILE) -o $(@) -Wp,-MD,.deps/$(*F).pp -c $< $(2)
cmd_compile = $(COMPILE) -o $(@) -MD -MF .deps/$(*F).pp -c $< $(2)
# Rule to compile a set of .o files into one .o file
quiet_cmd_ld_objs = " [$(LD_COLOR)LD$(END_COLOR)] $(RELPATH)$@"

62
NEWS
View File

@ -5,6 +5,68 @@ You can see the complete list of recent changes, bugfixes and new features
in the https://github.com/rkd77/felinks.git[gitweb interface]. See the ChangeLog
file for details.
ELinks 0.14.0
--------------------
Released on 2020-12-27
No changes since 0.14.0rc2.
ELinks 0.14.0rc2
--------------------
Released on 2020-12-13
* ~/.elinks/allow.txt - list of allowed url prefixes for js
ELinks 0.14.0rc1
--------------------
Released on 2020-12-06
* dblatex for pdf. PR #64
* fixes CTRL-Z. #65
* changes in mime handlers. PR #66
* fixes in data protocol. #67, #68, #71, #72, #73
* allow to wrap text in PRE. #69
* pass #fragment to external command. #75
* introduced "document.browse.search.reset". #76
* added meson as alternative build system
* in #77 I'm going to attach static binaries for released versions
* mozjs dependency updated to 52.*
Note that, to compile with javascript support you must compile by g++ with -fpermissive option.
There is a lot of warnings. Unfortunately JS often crashes. Without help from someone familiar
with SpiderMonkey, we won't go far.
As you might notice, I renamed repo to elinks.
Thanks to all involved in this release.
ELinks 0.13.5
--------------------
Released on 2020-08-30
* added clipboard selection using keyboard. #59
* fixed drawing menus over emoji characters. #60
* encoding to utf-8 and decoding back in python's pre_format_html_hook
This is likely the last release of 0.13.x series.
ELinks 0.13.4:
--------------------
Released on 2020-07-31.
* fixed segfault with gnutls. introduced in 0.13.3
* updated smart and dumb prefixes to https. Thanks Guido Cella. PR #54
* added the st terminal to config options. PR #55
* doc updates PR #57
* also pass the uri as %u to external handler. Thanks sgerwk. PR #58
* added the ui.clipboard_file config option
ELinks 0.13.3:
--------------------

5
README
View File

@ -66,9 +66,12 @@ Old ELinks team lost interest in ELinks development somehow. felinks is
continuation of elinks based on the master branch of the original elinks repo
with main releases (new features and other incompatible changes) no more often
than 1 yearly, and point releases (bugfixes) no more often than once a month.
Repository was renamed to elinks on 2020-12-01 with Petr's approval.
Main repo is at
https://github.com/rkd77/felinks.git
https://github.com/rkd77/elinks.git
vim: textwidth=80

2
SITES
View File

@ -11,7 +11,7 @@ RPMs:
http://rpmfind.net/linux/rpm2html/search.php?query=elinks
GIT root:
git://github.com/rkd77/felinks.git
git://github.com/rkd77/elinks.git
Original elinks git repo:
http://elinks.cz/elinks.git

949
config2.h.in Normal file
View File

@ -0,0 +1,949 @@
/* Directory containing default config */
#define CONFDIR "@CONFDIR@"
/* Define if you want: 256 colors support */
#mesondefine CONFIG_256_COLORS
/* Define if you want: 88 colors support */
#mesondefine CONFIG_88_COLORS
/* Define if you want: API Documentation support */
#mesondefine CONFIG_APIDOCS
/* Define if you want: AsciiDoc support */
#mesondefine CONFIG_ASCIIDOC
/* Define if you want: Backtrace support */
#mesondefine CONFIG_BACKTRACE
/* Define if you want: BitTorrent protocol support */
#mesondefine CONFIG_BITTORRENT
/* Define if you want: Bookmarks support */
#mesondefine CONFIG_BOOKMARKS
/* Define if you want: brotli support */
#mesondefine CONFIG_BROTLI
/* Define if you want: bzlib support */
#mesondefine CONFIG_BZIP2
/* Define if you want: Local CGI support */
#mesondefine CONFIG_CGI
/* Define if you want: Combining characters support */
#mesondefine CONFIG_COMBINE
/* Define if you want: Cookies support */
#mesondefine CONFIG_COOKIES
/* Define if you want: Cascading Style Sheets support */
#mesondefine CONFIG_CSS
/* Define if you want: Data protocol support */
#mesondefine CONFIG_DATA
/* Define if you want: Debug mode support */
#mesondefine CONFIG_DEBUG
/* Define if you want: Documentation Tools support */
#mesondefine CONFIG_DOC
/* Define if you want: DOM engine support */
#mesondefine CONFIG_DOM
/* Define if you want: Doxygen support */
#mesondefine CONFIG_DOXYGEN
/* Define if you want: ECMAScript (JavaScript) support */
#mesondefine CONFIG_ECMASCRIPT
/* Define if you want: SpiderMonkey document scripting support */
#mesondefine CONFIG_ECMASCRIPT_SMJS
/* Define if you want: ECMAScript heartbeat support support */
#mesondefine CONFIG_ECMASCRIPT_SMJS_HEARTBEAT
/* Define if you want: Exmode interface support */
#mesondefine CONFIG_EXMODE
/* Define if you want: Fast mode support */
#mesondefine CONFIG_FASTMEM
/* Define if you want: Finger protocol support */
#mesondefine CONFIG_FINGER
/* Define if you want: Form history support */
#mesondefine CONFIG_FORMHIST
/* Define if you want: FSP protocol support */
#mesondefine CONFIG_FSP
/* Define if you want: FTP protocol support */
#mesondefine CONFIG_FTP
/* Define if you want: Global history support */
#mesondefine CONFIG_GLOBHIST
/* Define if you want: GNUTLS support */
#mesondefine CONFIG_GNUTLS
/* Define if you want: Gopher protocol support */
#mesondefine CONFIG_GOPHER
/* Define if you want: gpm support */
#mesondefine CONFIG_GPM
/* Define if you want: GssApi support */
#mesondefine CONFIG_GSSAPI
/* Define if you want: zlib support */
#mesondefine CONFIG_GZIP
/* Define if you want: HTML highlighting support */
#mesondefine CONFIG_HTML_HIGHLIGHT
/* Define if you want: idn support */
#mesondefine CONFIG_IDN
/* Define if you want: interlinking support */
#mesondefine CONFIG_INTERLINK
/* Define if you want: IPv6 support */
#mesondefine CONFIG_IPV6
/* Define if you want: DBLATEX support */
#mesondefine CONFIG_DBLATEX
/* Define if you want: LEDs support */
#mesondefine CONFIG_LEDS
/* Define as 1 to use the libdom library. */
#mesondefine CONFIG_LIBDOM
/* Define if you want: libev support */
#mesondefine CONFIG_LIBEV
/* Define if you want: libevent support */
#mesondefine CONFIG_LIBEVENT
/* Define if you want: lzma support */
#mesondefine CONFIG_LZMA
/* Define if you want: Mailcap support */
#mesondefine CONFIG_MAILCAP
/* Define if you want: Man Page Formats support */
#mesondefine CONFIG_MANPAGE
/* Define if you want: Manual Formats support */
#mesondefine CONFIG_MANUAL
/* Define if you want: Marks support */
#mesondefine CONFIG_MARKS
/* Define if you want: Mimetypes files support */
#mesondefine CONFIG_MIMETYPES
/* Define if you want: Mouse handling support */
#mesondefine CONFIG_MOUSE
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#mesondefine CONFIG_NLS
/* Define if you want: NNTP protocol support */
#mesondefine CONFIG_NNTP
/* Define if you want: No root exec support */
#mesondefine CONFIG_NO_ROOT_EXEC
/* Define if you want: nss_compat_ossl support */
#mesondefine CONFIG_NSS_COMPAT_OSSL
/* Define if you want: OpenSSL support */
#mesondefine CONFIG_OPENSSL
/* Define if you want: BEOS support */
#mesondefine CONFIG_OS_BEOS
/* Define if you want: EMX support */
#mesondefine CONFIG_OS_OS2
/* Define if you want: RISCOS support */
#mesondefine CONFIG_OS_RISCOS
/* Define if you want: UNIX support */
#mesondefine CONFIG_OS_UNIX
/* Define if you want: WIN32 support */
#mesondefine CONFIG_OS_WIN32
/* Define if you want: Own libc stubs support */
#mesondefine CONFIG_OWN_LIBC
/* Define if using Perl 5.8.8 or later, where the "POPpx" macro no longer
needs an "n_a" variable like it did in 5.8.7 */
#mesondefine CONFIG_PERL_POPPX_WITHOUT_N_A
/* Define if you want: Pod2HTML support */
#mesondefine CONFIG_POD2HTML
/* Define if you want: Browser scripting support */
#mesondefine CONFIG_SCRIPTING
/* Define if you want: Guile support */
#mesondefine CONFIG_SCRIPTING_GUILE
/* Define if you want: Lua support */
#mesondefine CONFIG_SCRIPTING_LUA
/* Define if you want: Perl support */
#mesondefine CONFIG_SCRIPTING_PERL
/* Define if you want: Python3 support */
#mesondefine CONFIG_SCRIPTING_PYTHON
/* Define if you want: Ruby support */
#mesondefine CONFIG_SCRIPTING_RUBY
/* Define if you want: SpiderMonkey support */
#mesondefine CONFIG_SCRIPTING_SPIDERMONKEY
/* Define if you want: Small binary support */
#mesondefine CONFIG_SMALL
/* Define if you want: Samba protocol support */
#mesondefine CONFIG_SMB
/* Define if you want: SSL support */
#mesondefine CONFIG_SSL
/* Define if you want: BSD sysmouse support */
#mesondefine CONFIG_SYSMOUSE
/* Define if you want: terminfo support */
#mesondefine CONFIG_TERMINFO
/* Define as 1 to use the TRE library for regular expression searching. This
requires the <tre/regex.h> header file. If you define CONFIG_UTF8 too, then
wchar_t must be exactly 32-bit so that it matches unicode_val_T. */
#mesondefine CONFIG_TRE
/* Define if you want: true color support */
#mesondefine CONFIG_TRUE_COLOR
/* Define if you want: URI rewriting support */
#mesondefine CONFIG_URI_REWRITE
/* Define if you want: UTF-8 support */
#mesondefine CONFIG_UTF8
/* Define if you want: XBEL bookmarks support */
#mesondefine CONFIG_XBEL_BOOKMARKS
/* Define if you want: XmlTo support */
#mesondefine CONFIG_XMLTO
/* Define if you want: zstd support */
#mesondefine CONFIG_ZSTD
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define to 1 if you have the `access' function. */
#mesondefine HAVE_ACCESS
/* Define if you have struct addrinfo */
#mesondefine HAVE_ADDRINFO
/* Define to 1 if you have the `alarm' function. */
#mesondefine HAVE_ALARM
/* Define to 1 if you have `alloca', as a function or macro. */
#mesondefine HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#mesondefine HAVE_ALLOCA_H
/* Define to 1 if you have the <argz.h> header file. */
#mesondefine HAVE_ARGZ_H
/* Define to 1 if you have the <arpa/inet.h> header file. */
#mesondefine HAVE_ARPA_INET_H
/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */
#mesondefine HAVE_ASN1_STRING_GET0_DATA
/* Define to 1 if you have the `asprintf' function. */
#mesondefine HAVE_ASPRINTF
/* Define to 1 if you have the `atoll' function. */
#mesondefine HAVE_ATOLL
/* Define to 1 if you have the `bcopy' function. */
#mesondefine HAVE_BCOPY
/* Define if you have _beginthread() */
#mesondefine HAVE_BEGINTHREAD
/* Define to 1 if you have the <brotli/decode.h> header file. */
#mesondefine HAVE_BROTLI_DECODE_H
/* Define to 1 if you have the <bzlib.h> header file. */
#mesondefine HAVE_BZLIB_H
/* Define if you have C99 compliant vsnprintf() */
#mesondefine HAVE_C99_VSNPRINTF
/* Define to 1 if you have the `chmod' function. */
#mesondefine HAVE_CHMOD
/* Define to 1 if you have the `clock_gettime' function. */
#mesondefine HAVE_CLOCK_GETTIME
/* Define to 1 if you have the `cygwin_conv_to_full_win32_path' function. */
#mesondefine HAVE_CYGWIN_CONV_TO_FULL_WIN32_PATH
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#mesondefine HAVE_DIRENT_H
/* Define to 1 if you have the `event_base_free' function. */
#mesondefine HAVE_EVENT_BASE_FREE
/* Define to 1 if you have the `event_base_get_method' function. */
#mesondefine HAVE_EVENT_BASE_GET_METHOD
/* Define to 1 if you have the `event_base_new' function. */
#mesondefine HAVE_EVENT_BASE_NEW
/* Define to 1 if you have the `event_base_set' function. */
#mesondefine HAVE_EVENT_BASE_SET
/* Define to 1 if you have the `event_config_set_flag' function. */
#mesondefine HAVE_EVENT_CONFIG_SET_FLAG
/* Define to 1 if you have the `event_get_method' function. */
#mesondefine HAVE_EVENT_GET_METHOD
/* Define to 1 if you have the `event_get_struct_event_size' function. */
#mesondefine HAVE_EVENT_GET_STRUCT_EVENT_SIZE
/* Define to 1 if you have the `event_get_version' function. */
#mesondefine HAVE_EVENT_GET_VERSION
/* Define to 1 if you have the <event.h> header file. */
#mesondefine HAVE_EVENT_H
/* Define to 1 if you have the `event_reinit' function. */
#mesondefine HAVE_EVENT_REINIT
/* Define to 1 if you have the <ev-event.h> header file. */
#mesondefine HAVE_EV_EVENT_H
/* Define to 1 if you have the <execinfo.h> header file. */
#mesondefine HAVE_EXECINFO_H
/* Define to 1 if you have the <expat.h> header file. */
#mesondefine HAVE_EXPAT_H
/* Define to 1 if you have the <fcntl.h> header file. */
#mesondefine HAVE_FCNTL_H
/* Define to 1 if you have the `feof_unlocked' function. */
#mesondefine HAVE_FEOF_UNLOCKED
/* Define to 1 if you have the `fflush' function. */
#mesondefine HAVE_FFLUSH
/* Define to 1 if you have the `fgets_unlocked' function. */
#mesondefine HAVE_FGETS_UNLOCKED
/* Define to 1 if you have the `fork' function. */
#mesondefine HAVE_FORK
/* Define to 1 if you have the `fpathconf' function. */
#mesondefine HAVE_FPATHCONF
/* Define to 1 if you have the `fseeko' function. */
#mesondefine HAVE_FSEEKO
/* Define to 1 if you have the <fsplib.h> header file. */
#mesondefine HAVE_FSPLIB_H
/* Define to 1 if you have the `fsync' function. */
#mesondefine HAVE_FSYNC
/* Define to 1 if you have the `ftello' function. */
#mesondefine HAVE_FTELLO
/* Define to 1 if you have the `getcwd' function. */
#mesondefine HAVE_GETCWD
/* Define to 1 if you have the `getegid' function. */
#mesondefine HAVE_GETEGID
/* Define to 1 if you have the `geteuid' function. */
#mesondefine HAVE_GETEUID
/* Define to 1 if you have the `getgid' function. */
#mesondefine HAVE_GETGID
/* Define to 1 if you have the `gethostbyaddr' function. */
#mesondefine HAVE_GETHOSTBYADDR
/* Define to 1 if you have the `getifaddrs' function. */
#mesondefine HAVE_GETIFADDRS
/* Define to 1 if you have the `getpagesize' function. */
#mesondefine HAVE_GETPAGESIZE
/* Define to 1 if you have the `getpgid' function. */
#mesondefine HAVE_GETPGID
/* Define to 1 if you have the `getpgrp' function. */
#mesondefine HAVE_GETPGRP
/* Define to 1 if you have the `getpid' function. */
#mesondefine HAVE_GETPID
/* Define to 1 if you have the `getpwnam' function. */
#mesondefine HAVE_GETPWNAM
/* Define to 1 if you have the `gettimeofday' function. */
#mesondefine HAVE_GETTIMEOFDAY
/* Define to 1 if you have the `getuid' function. */
#mesondefine HAVE_GETUID
/* Define to 1 if you have the `gnutls_certificate_set_x509_system_trust'
function. */
#mesondefine HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST
/* Define to 1 if you have the `gnutls_priority_set_direct' function. */
#mesondefine HAVE_GNUTLS_PRIORITY_SET_DIRECT
/* Define to 1 if you have the <gpm.h> header file. */
#mesondefine HAVE_GPM_H
/* Define to 1 if you have the `herror' function. */
#mesondefine HAVE_HERROR
/* Define if you have the iconv() function. */
#mesondefine HAVE_ICONV
/* Define to 1 if you have the <idna.h> header file. */
#mesondefine HAVE_IDNA_H
/* Define to 1 if you have the <ifaddrs.h> header file. */
#mesondefine HAVE_IFADDRS_H
/* Define to 1 if you have the `index' function. */
#mesondefine HAVE_INDEX
/* Define to 1 if you have the `inet_ntop' function. */
#mesondefine HAVE_INET_NTOP
/* Define to 1 if you have the `inet_pton' function. */
#mesondefine HAVE_INET_PTON
/* Define if you have int32_t */
#mesondefine HAVE_INT32_T
/* Define to 1 if you have the <inttypes.h> header file. */
#mesondefine HAVE_INTTYPES_H
/* Define to 1 if you have the <io.h> header file. */
#mesondefine HAVE_IO_H
/* Define to 1 if you have the `isdigit' function. */
#mesondefine HAVE_ISDIGIT
/* Define to 1 if you have the `JS_ReportAllocationOverflow' function. */
#mesondefine HAVE_JS_REPORTALLOCATIONOVERFLOW
/* Define to 1 if you have the `JS_SetBranchCallback' function. */
#mesondefine HAVE_JS_SETBRANCHCALLBACK
/* Define to 1 if you have the `JS_TriggerOperationCallback' function. */
#mesondefine HAVE_JS_TRIGGEROPERATIONCALLBACK
/* Define to 1 if you have the `kill' function. */
#mesondefine HAVE_KILL
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#mesondefine HAVE_LANGINFO_CODESET
/* Define to 1 if you have the <lauxlib.h> header file. */
#mesondefine HAVE_LAUXLIB_H
/* Define if your <locale.h> file defines LC_MESSAGES. */
#mesondefine HAVE_LC_MESSAGES
/* Define to 1 if you have the `dl' library (-ldl). */
#mesondefine HAVE_LIBDL
/* Define to 1 if you have the `ev' library (-lev). */
#mesondefine HAVE_LIBEV
/* Define to 1 if you have the `event' library (-levent). */
#mesondefine HAVE_LIBEVENT
/* Define to 1 if you have the <libev/event.h> header file. */
#mesondefine HAVE_LIBEV_EVENT_H
/* Define to 1 if you have the `nsl' library (-lnsl). */
#mesondefine HAVE_LIBNSL
/* Define to 1 if you have the `nss_compat_ossl' library (-lnss_compat_ossl).
*/
#mesondefine HAVE_LIBNSS_COMPAT_OSSL
/* Define to 1 if you have the <libsmbclient.h> header file. */
#mesondefine HAVE_LIBSMBCLIENT_H
/* Define to 1 if you have the `socket' library (-lsocket). */
#mesondefine HAVE_LIBSOCKET
/* Define if you have long long */
#mesondefine HAVE_LONG_LONG
/* Define to 1 if you have the <lzma.h> header file. */
#mesondefine HAVE_LZMA_H
/* Define to 1 if you have the <machine/console.h> header file. */
#mesondefine HAVE_MACHINE_CONSOLE_H
/* Define to 1 if you have the <malloc.h> header file. */
#mesondefine HAVE_MALLOC_H
/* Define to 1 if you have the `memmove' function. */
#mesondefine HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#mesondefine HAVE_MEMORY_H
/* Define to 1 if you have the `mempcpy' function. */
#mesondefine HAVE_MEMPCPY
/* Define to 1 if you have the `memrchr' function. */
#mesondefine HAVE_MEMRCHR
/* Define to 1 if you have a working `mmap' system call. */
#mesondefine HAVE_MMAP
/* Define if you have MouOpen() */
#mesondefine HAVE_MOUOPEN
/* Define to 1 if you have the `mremap' function. */
#mesondefine HAVE_MREMAP
/* Define to 1 if you have the `munmap' function. */
#mesondefine HAVE_MUNMAP
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#mesondefine HAVE_NDIR_H
/* Define to 1 if you have the <netdb.h> header file. */
#mesondefine HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in6_var.h> header file. */
#mesondefine HAVE_NETINET_IN6_VAR_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#mesondefine HAVE_NETINET_IN_H
/* Define to 1 if you have the <netinet/in_system.h> header file. */
#mesondefine HAVE_NETINET_IN_SYSTEM_H
/* Define to 1 if you have the <netinet/in_systm.h> header file. */
#mesondefine HAVE_NETINET_IN_SYSTM_H
/* Define to 1 if you have the <netinet/ip.h> header file. */
#mesondefine HAVE_NETINET_IP_H
/* Define to 1 if you have the <net/if.h> header file. */
#mesondefine HAVE_NET_IF_H
/* Define to 1 if you have the <nl_types.h> header file. */
#mesondefine HAVE_NL_TYPES_H
/* Define to 1 if you have the <nss_compat_ossl/nss_compat_ossl.h> header
file. */
#mesondefine HAVE_NSS_COMPAT_OSSL_NSS_COMPAT_OSSL_H
/* Define if you have off_t */
#mesondefine HAVE_OFF_T
/* Define to 1 if you have the `poll' function. */
#mesondefine HAVE_POLL
/* Define to 1 if you have the <poll.h> header file. */
#mesondefine HAVE_POLL_H
/* Define to 1 if you have the `popen' function. */
#mesondefine HAVE_POPEN
/* Define to 1 if you have the `putenv' function. */
#mesondefine HAVE_PUTENV
/* Define to 1 if you have the <pwd.h> header file. */
#mesondefine HAVE_PWD_H
/* Define to 1 if you have the `raise' function. */
#mesondefine HAVE_RAISE
/* Define to 1 if you have the `RAND_bytes' function. */
#mesondefine HAVE_RAND_BYTES
/* Define to 1 if you have the `rb_errinfo' function. */
#mesondefine HAVE_RB_ERRINFO
/* Define if you have _read_kbd() */
#mesondefine HAVE_READ_KBD
/* Define if you have struct sockaddr_in6 */
#mesondefine HAVE_SA_IN6
/* Define if you have struct sockaddr_storage */
#mesondefine HAVE_SA_STORAGE
/* Define if you have _SC_PAGE_SIZE */
#mesondefine HAVE_SC_PAGE_SIZE
/* Define to 1 if you have the `setenv' function. */
#mesondefine HAVE_SETENV
/* Define to 1 if you have the `setitimer' function. */
#mesondefine HAVE_SETITIMER
/* Define to 1 if you have the `setlocale' function. */
#mesondefine HAVE_SETLOCALE
/* Define to 1 if you have the `setpgid' function. */
#mesondefine HAVE_SETPGID
/* Define to 1 if you have the `setpgrp' function. */
#mesondefine HAVE_SETPGRP
/* Define to 1 if you have the `sigaction' function. */
#mesondefine HAVE_SIGACTION
/* Define to 1 if you have the <sigaction.h> header file. */
#mesondefine HAVE_SIGACTION_H
/* Define to 1 if you have the `snprintf' function. */
#mesondefine HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#mesondefine HAVE_STDINT_H
/* Define to 1 if you have the `stpcpy' function. */
#mesondefine HAVE_STPCPY
/* Define to 1 if you have the `strcasecmp' function. */
#mesondefine HAVE_STRCASECMP
/* Define to 1 if you have the `strcasestr' function. */
#mesondefine HAVE_STRCASESTR
/* Define to 1 if you have the `strchr' function. */
#mesondefine HAVE_STRCHR
/* Define to 1 if you have the `strdup' function. */
#mesondefine HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */
#mesondefine HAVE_STRERROR
/* Define to 1 if you have the `strftime' function. */
#mesondefine HAVE_STRFTIME
/* Define to 1 if you have the <strings.h> header file. */
#mesondefine HAVE_STRINGS_H
/* Define to 1 if you have the `strncasecmp' function. */
#mesondefine HAVE_STRNCASECMP
/* Define to 1 if you have the `strptime' function. */
#mesondefine HAVE_STRPTIME
/* Define to 1 if you have the `strrchr' function. */
#mesondefine HAVE_STRRCHR
/* Define to 1 if you have the `strstr' function. */
#mesondefine HAVE_STRSTR
/* Define to 1 if you have the `strtoul' function. */
#mesondefine HAVE_STRTOUL
/* Define to 1 if you have the <sys/consio.h> header file. */
#mesondefine HAVE_SYS_CONSIO_H
/* Define to 1 if you have the <sys/cygwin.h> header file. */
#mesondefine HAVE_SYS_CYGWIN_H
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#mesondefine HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/fmutex.h> header file. */
#mesondefine HAVE_SYS_FMUTEX_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#mesondefine HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#mesondefine HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/param.h> header file. */
#mesondefine HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/resource.h> header file. */
#mesondefine HAVE_SYS_RESOURCE_H
/* Define to 1 if you have the <sys/select.h> header file. */
#mesondefine HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#mesondefine HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/sockio.h> header file. */
#mesondefine HAVE_SYS_SOCKIO_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#mesondefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#mesondefine HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#mesondefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/un.h> header file. */
#mesondefine HAVE_SYS_UN_H
/* Define to 1 if you have the <sys/utsname.h> header file. */
#mesondefine HAVE_SYS_UTSNAME_H
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#mesondefine HAVE_SYS_WAIT_H
/* Define to 1 if you have the <termios.h> header file. */
#mesondefine HAVE_TERMIOS_H
/* Define to 1 if you have the <term.h> header file. */
#mesondefine HAVE_TERM_H
/* Define to 1 if you have the `timegm' function. */
#mesondefine HAVE_TIMEGM
/* Define to 1 if you have the `tsearch' function. */
#mesondefine HAVE_TSEARCH
/* Define if you have typeof */
#mesondefine HAVE_TYPEOF
/* Define if you have uint16_t */
#mesondefine HAVE_UINT16_T
/* Define if you have uint32_t */
#mesondefine HAVE_UINT32_T
/* Define to 1 if you have the `uname' function. */
#mesondefine HAVE_UNAME
/* Define to 1 if you have the <unistd.h> header file. */
#mesondefine HAVE_UNISTD_H
/* Define to 1 if you have the `unsetenv' function. */
#mesondefine HAVE_UNSETENV
/* Define if you have variadic macros */
#mesondefine HAVE_VARIADIC_MACROS
/* Define to 1 if you have the `vasprintf' function. */
#mesondefine HAVE_VASPRINTF
/* Define to 1 if you have the `vsnprintf' function. */
#mesondefine HAVE_VSNPRINTF
/* Define to 1 if you have the <wchar.h> header file. */
#mesondefine HAVE_WCHAR_H
/* Define to 1 if you have the <wctype.h> header file. */
#mesondefine HAVE_WCTYPE_H
/* Define to 1 if you have the `wcwidth' function. */
#mesondefine HAVE_WCWIDTH
/* Define to 1 if you have the <windows.h> header file. */
#mesondefine HAVE_WINDOWS_H
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#mesondefine HAVE_WS2TCPIP_H
/* Define if you have X11 for restoring window titles */
#mesondefine HAVE_X11
/* Define to 1 if you have the <zlib.h> header file. */
#mesondefine HAVE_ZLIB_H
/* Define to 1 if you have the <zstd.h> header file. */
#mesondefine HAVE_ZSTD_H
/* Define to 1 if you have the `__argz_count' function. */
#mesondefine HAVE___ARGZ_COUNT
/* Define to 1 if you have the `__argz_next' function. */
#mesondefine HAVE___ARGZ_NEXT
/* Define to 1 if you have the `__argz_stringify' function. */
#mesondefine HAVE___ARGZ_STRINGIFY
/* Define as const if the declaration of iconv() needs const. */
#mesondefine ICONV_CONST
/* Directory containing libraries */
#define LIBDIR "@LIBDIR@"
/* Directory containing locales */
#define LOCALEDIR "@LOCALEDIR@"
/* Define if you want: HTML (one file) support */
#undef MANUAL_ASCIIDOC
/* Define if you want: PDF support */
#undef MANUAL_JW
/* Define if you want: HTML (multiple files) support */
#undef MANUAL_XMLTO
/* Define if you want: HTML support */
#undef MAN_ASCIIDOC
/* Define if you want: man (groff) support */
#undef MAN_XMLTO
/* Define as inline if the compiler lets you declare a function without
inline, then define it with inline, and have that definition refer to
identifiers with internal linkage. This is allowed by C99 6.7.4p6 and
6.7.4p3 together. Otherwise define as nothing. */
#define NONSTATIC_INLINE @NONSTATIC_INLINE@
/* Package version */
#define PACKAGE "@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
/* The size of `char', as computed by sizeof. */
#define SIZEOF_CHAR @SIZEOF_CHAR@
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT @SIZEOF_INT@
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG @SIZEOF_LONG@
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T @SIZEOF_OFF_T@
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT @SIZEOF_SHORT@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Package version */
#define VERSION "@VERSION@"
/* Define if you have XFree under OS/2 */
#undef X2
/* How to invoke XTerm */
#undef XTERM
/* Define as 1 if you are using Tiny C Compiler with the GNU C Library, and
<alloca.h> of glibc would otherwise override the alloca macro defined in
<stddef.h> of TCC. If <alloca.h> of glibc sees the _ALLOCA_H macro, it
assumes it has already been included, and does not redefine alloca. This
might not work in future glibc versions though, because the names of the
#include guard macros are not documented. The incompatibility has been
reported to the tinycc-devel mailing list on 2008-07-14. If a future
version of TCC provides an <alloca.h> of its own, this hack won't be
needed. */
#undef _ALLOCA_H
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */

View File

@ -16,7 +16,7 @@ AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([config/m4])
PACKAGE=elinks
VERSION=0.14.GIT
VERSION=0.15.GIT
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Package version])
@ -60,6 +60,10 @@ echo "Feature summary:" > features.log
# ===================================================================
AC_PROG_CC
AC_PROG_CXX
if test x"$CC" = x"$CXX"; then
AC_LANG(C++)
fi
AC_CHECK_TOOL([LD], [ld])
AC_PROG_AWK
AC_PATH_PROGS(AWK, "$AWK")
@ -74,7 +78,7 @@ PKG_PROG_PKG_CONFIG
CONFIG_ASCIIDOC="no"
CONFIG_POD2HTML="no"
CONFIG_XMLTO="no"
CONFIG_JW="no"
CONFIG_DBLATEX="no"
if test "x$CONFIG_DOC" != xno; then
AC_PATH_PROGS(PYTHON3, "python3")
@ -91,10 +95,10 @@ if test "x$CONFIG_DOC" != xno; then
EL_CONFIG(MAN_XMLTO, [man (groff)])
fi
AC_PATH_PROGS(JW, "jw")
if test "x$JW" != "x"; then
EL_CONFIG(CONFIG_JW, [JadeWrapper])
EL_CONFIG(MANUAL_JW, [PDF])
AC_PATH_PROGS(DBLATEX, "dblatex")
if test "x$DBLATEX" != "x"; then
EL_CONFIG(CONFIG_DBLATEX, [dblatex])
EL_CONFIG(MANUAL_DBLATEX, [PDF])
fi
AC_PATH_PROGS(POD2HTML, "pod2html")
@ -114,10 +118,10 @@ AC_SUBST(CONFIG_ASCIIDOC)
AC_SUBST(CONFIG_DOXYGEN)
AC_SUBST(CONFIG_POD2HTML)
AC_SUBST(CONFIG_XMLTO)
AC_SUBST(CONFIG_JW)
AC_SUBST(CONFIG_DBLATEX)
EL_CONFIG_DEPENDS(CONFIG_DOC, [CONFIG_ASCIIDOC CONFIG_XMLTO CONFIG_JW CONFIG_POD2HTML], [Documentation Tools])
EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MANUAL_ASCIIDOC MANUAL_XMLTO MANUAL_JW], [Manual Formats])
EL_CONFIG_DEPENDS(CONFIG_DOC, [CONFIG_ASCIIDOC CONFIG_XMLTO CONFIG_DBLATEX CONFIG_POD2HTML], [Documentation Tools])
EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MANUAL_ASCIIDOC MANUAL_XMLTO MANUAL_DBLATEX], [Manual Formats])
EL_CONFIG_DEPENDS(CONFIG_MANPAGE, [MAN_ASCIIDOC MAN_XMLTO], [Man Page Formats])
EL_CONFIG_DEPENDS(CONFIG_APIDOCS, [CONFIG_DOXYGEN], [API Documentation])
@ -129,6 +133,21 @@ if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
fi
# ===================================================================
# static binary
# ===================================================================
enable_static=no
pkg_config_static=
AC_ARG_WITH(static, [ --with-static enable build of static binary],
[ if test "x$withval" != xno; then enable_static=yes; fi ])
if test "$enable_static" = yes; then
CFLAGS="$CFLAGS -static"
pkg_config_static="--static"
fi
# ===================================================================
# Checks for special OSes.
# ===================================================================
@ -210,6 +229,7 @@ AC_CHECK_HEADERS(stdint.h inttypes.h)
AC_CHECK_HEADERS(locale.h pwd.h)
AC_CHECK_HEADERS(termios.h)
AC_CHECK_HEADERS(poll.h)
AC_CHECK_HEADERS(stdalign.h)
AC_CHECK_HEADERS(sys/un.h,
[CONFIG_INTERLINK=yes
@ -488,20 +508,49 @@ EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_GZIP, zlib, zlib.h, z, gzclearerr,
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_BZIP2, bzlib, bzlib.h, bz2, BZ2_bzReadOpen,
[ --without-bzlib disable bzlib support])
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_BROTLI, brotli, brotli/decode.h, brotlidec, BrotliDecoderDecompressStream,
[ --with-brotli enable experimental brotli support])
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_ZSTD, zstd, zstd.h, zstd, ZSTD_createDCtx,
[ --with-zstd enable experimental zstd support])
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_IDN, idn, idna.h, idn, stringprep_check_version,
[ --without-idn disable international domain names support])
# ===================================================================
# brotli
# ===================================================================
BROTLI_CFLAGS=
BROTLI_LIBS=
CONFIG_BROTLI=no
enable_brotli=no
AC_ARG_WITH(brotli, [ --with-brotli enable brotli],
[ if test "x$withval" != xno; then enable_brotli=yes; fi ])
if test "$enable_brotli" = no; then
AC_MSG_CHECKING([[for brotli]])
AC_MSG_RESULT([[disabled]])
else
AC_MSG_CHECKING([[for brotli in pkg-config]])
if $PKG_CONFIG $pkg_config_static libbrotlidec; then
BROTLI_CFLAGS=`$PKG_CONFIG $pkg_config_static --cflags libbrotlidec`
BROTLI_LIBS=`$PKG_CONFIG $pkg_config_static --libs libbrotlidec`
LIBS="$BROTLI_LIBS $LIBS"
CONFIG_BROTLI=yes
AC_DEFINE([CONFIG_BROTLI], [1], [Define as 1 to use the libbrotli library.])
AC_MSG_RESULT([[yes]])
else
enable_brotli=no
fi
fi
AC_SUBST(BROTLI_CFLAGS)
AC_SUBST(BROTLI_LIBS)
EL_LOG_CONFIG([CONFIG_BROTLI], [[brotli]], [[$enable_brotli]])
# LZMA disabled by default, because of little usability and compilation problems
# with new xz
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_LZMA, lzma, lzma.h, lzma, lzma_code,
[ --with-lzma enable lzma encoding support])
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_IDN, idn, idna.h, idn, stringprep_check_version,
[ --without-idn disable international domain names support])
# ===================================================================
# Check for GSSAPI, optional even if installed.
# ===================================================================
@ -587,7 +636,7 @@ fi
# This option sets the $with_spidermonkey variable.
AC_ARG_WITH([spidermonkey],
[AS_HELP_STRING([--without-spidermonkey],
[AS_HELP_STRING([--with-spidermonkey],
[disable SpiderMonkey Mozilla JavaScript engine support])])
# CONFIG_SPIDERMONKEY is initially blank. We change it to "yes" or "no"
@ -597,31 +646,34 @@ CONFIG_SPIDERMONKEY=
EL_SAVE_FLAGS
case "$with_spidermonkey" in
no)
"" | no)
# The user specified --without-spidermonkey.
# That overrides the other SpiderMonkey options.
AC_MSG_CHECKING([for SpiderMonkey])
AC_MSG_RESULT([disabled])
CONFIG_SPIDERMONKEY="no"
;;
"" | yes)
yes)
;;
*)
AC_MSG_WARN([This version of ELinks does not support --with-spidermonkey=DIRECTORY.])
;;
esac
for package in mozjs-17.0; do
for package in mozjs-52; do
if test -n "$CONFIG_SPIDERMONKEY"; then
break
else
AC_MSG_CHECKING([for SpiderMonkey (mozjs-17.0) in pkg-config $package])
if $PKG_CONFIG --cflags --libs $package > /dev/null 2>&AS_MESSAGE_LOG_FD; then
SPIDERMONKEY_LIBS="$($PKG_CONFIG --libs $package)"
SPIDERMONKEY_CFLAGS="$($PKG_CONFIG --cflags $package)"
AC_MSG_CHECKING([for SpiderMonkey (mozjs-52) in pkg-config $package])
if $PKG_CONFIG $pkg_config_static --cflags --libs $package > /dev/null 2>&AS_MESSAGE_LOG_FD; then
DB_LOCALSTORAGE_LIBS="$($PKG_CONFIG $pkg_config_static --libs sqlite3)"
SPIDERMONKEY_LIBS="$($PKG_CONFIG $pkg_config_static --libs $package) $DB_LOCALSTORAGE_LIBS"
DB_LOCALSTORAGE_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags sqlite3)"
SPIDERMONKEY_CFLAGS="$($PKG_CONFIG $pkg_config_static --cflags $package) $DB_LOCALSTORAGE_CFLAGS"
LIBS="$SPIDERMONKEY_LIBS $LIBS_X"
CFLAGS="$CFLAGS_X $SPIDERMONKEY_CFLAGS"
CPPFLAGS="$CPPFLAGS_X $SPIDERMONKEY_CFLAGS"
AC_LANG_PUSH([C++])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
/* mozilla-js.pc may have -DXP_UNIX or similar in Cflags.
@ -635,6 +687,7 @@ for package in mozjs-17.0; do
AC_MSG_RESULT([yes])],
[# Leave CONFIG_SPIDERMONKEY blank, to continue the search.
AC_MSG_RESULT([found but unusable])])
AC_LANG_POP([C++])
else
AC_MSG_RESULT([no])
fi
@ -646,14 +699,6 @@ if test -z "$CONFIG_SPIDERMONKEY"; then
CONFIG_SPIDERMONKEY=no
fi
if test "$CONFIG_SPIDERMONKEY" = "yes"; then
# LIBS, CFLAGS, and CPPFLAGS still include the SpiderMonkey options.
AC_CHECK_FUNCS([JS_ReportAllocationOverflow])
AC_CHECK_FUNCS([JS_SetBranchCallback])
AC_CHECK_FUNCS([JS_TriggerOperationCallback], [HAVE_JS_TRIGGEROPERATIONCALLBACK=yes])
elif test -n "$with_spidermonkey" && test "x$with_spidermonkey" != "xno"; then
AC_MSG_WARN([SpiderMonkey was not found even though you specified --with-spidermonkey.])
fi
EL_RESTORE_FLAGS
if test "x$CONFIG_SPIDERMONKEY" = xyes; then
@ -697,6 +742,7 @@ if test "x$CONFIG_ECMASCRIPT_SMJS" = xyes ||
AC_SUBST(SPIDERMONKEY_LIBS)
AC_SUBST(SPIDERMONKEY_CFLAGS)
AC_SUBST(CONFIG_SPIDERMONKEY)
CFLAGS="$CFLAGS -fpermissive $SPIDERMONKEY_CFLAGS"
fi
# ===================================================================
@ -886,9 +932,9 @@ AC_MSG_CHECKING([for Lua])
EL_SAVE_FLAGS
cf_result=no
if test -n "$luapkg" && $PKG_CONFIG "$luapkg"; then
LUA_CFLAGS=`$PKG_CONFIG --cflags "$luapkg"`
LUA_LIBS=`$PKG_CONFIG --libs "$luapkg"`
if test -n "$luapkg" && $PKG_CONFIG $pkg_config_static "$luapkg"; then
LUA_CFLAGS=`$PKG_CONFIG $pkg_config_static --cflags "$luapkg"`
LUA_LIBS=`$PKG_CONFIG $pkg_config_static --libs "$luapkg"`
CFLAGS="$CFLAGS_X $LUA_CFLAGS"
CPPFLAGS="$CPPFLAGS_X $LUA_CFLAGS"
LIBS="$LUA_LIBS $LIBS_X"
@ -939,9 +985,9 @@ if test "$with_tre" = no; then
tre_log="no (explicitly disabled)"
else
AC_MSG_CHECKING([[for TRE in pkg-config]])
if $PKG_CONFIG tre; then
TRE_CFLAGS=`$PKG_CONFIG --cflags tre`
TRE_LIBS=`$PKG_CONFIG --libs tre`
if $PKG_CONFIG $pkg_config_static tre; then
TRE_CFLAGS=`$PKG_CONFIG $pkg_config_static --cflags tre`
TRE_LIBS=`$PKG_CONFIG $pkg_config_static --libs tre`
AC_MSG_RESULT([[yes]])
else
# <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513055>
@ -1007,7 +1053,7 @@ AC_ARG_WITH(gnutls, [[ --with-gnutls enable GNUTLS SSL support]],
"yes") chosen_ssl_library="GNUTLS" ;;
*) chosen_ssl_library="GNUTLS"
AC_MSG_WARN([[Support for --with-gnutls=DIR has been removed.
You may have to set the PKG_CONFIG_PATH environment variable instead.]]) ;;
You may have to set the PKG_CONFIG $pkg_config_static_PATH environment variable instead.]]) ;;
esac])
AC_ARG_WITH(openssl, [[ --without-openssl disable OpenSSL support]])
@ -1041,9 +1087,9 @@ elif test -z "${with_nss_compat_ossl+set}"; then
else
EL_SAVE_FLAGS
if test "$with_nss_compat_ossl" = yes; then
if $PKG_CONFIG nss; then
CFLAGS="$CFLAGS_X `$PKG_CONFIG --cflags nss`"
LIBS="$LIBS_X `$PKG_CONFIG --libs nss`"
if $PKG_CONFIG $pkg_config_static nss; then
CFLAGS="$CFLAGS_X `$PKG_CONFIG $pkg_config_static --cflags nss`"
LIBS="$LIBS_X `$PKG_CONFIG $pkg_config_static --libs nss`"
else
with_nss_compat_ossl=no
fi
@ -1140,9 +1186,9 @@ elif test -n "$chosen_ssl_library" && test "$chosen_ssl_library" != "GNUTLS"; th
else
cf_result=no
AC_MSG_CHECKING([[for GNUTLS (1.2 or later) in pkg-config]])
if $PKG_CONFIG --atleast-version=1.2 gnutls; then
GNUTLS_CFLAGS=`$PKG_CONFIG --cflags gnutls`
GNUTLS_LIBS=`$PKG_CONFIG --libs gnutls`
if $PKG_CONFIG $pkg_config_static --atleast-version=1.2 gnutls; then
GNUTLS_CFLAGS=`$PKG_CONFIG $pkg_config_static --cflags gnutls`
GNUTLS_LIBS=`$PKG_CONFIG $pkg_config_static --libs gnutls`
AC_MSG_RESULT([[yes: $GNUTLS_CFLAGS $GNUTLS_LIBS]])
EL_SAVE_FLAGS
@ -1180,6 +1226,11 @@ else
EL_CONFIG(CONFIG_GNUTLS, [GNUTLS])
chosen_ssl_library="GNUTLS"
AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no, $PATH)
if test "$LIBGCRYPT_CONFIG" = no; then
AC_MSG_ERROR([[libgcrypt-config not found.]])
fi
# gcry_create_nounce is part of libgcrypt
LIBGCRYPT_CFLAGS=`libgcrypt-config --cflags`
LIBGCRYPT_LIBS=`libgcrypt-config --libs`
@ -1605,9 +1656,9 @@ if test "$enable_libdom" = no; then
AC_MSG_RESULT([[disabled]])
else
AC_MSG_CHECKING([[for libdom in pkg-config]])
if $PKG_CONFIG libdom; then
LIBDOM_CFLAGS=`$PKG_CONFIG --cflags libdom`
LIBDOM_LIBS=`$PKG_CONFIG --libs libdom`
if $PKG_CONFIG $pkg_config_static libdom; then
LIBDOM_CFLAGS=`$PKG_CONFIG $pkg_config_static --cflags libdom`
LIBDOM_LIBS=`$PKG_CONFIG $pkg_config_static --libs libdom`
LIBS="$LIBDOM_LIBS $LIBS"
CONFIG_LIBDOM=yes
AC_DEFINE([CONFIG_LIBDOM], [1], [Define as 1 to use the libdom library.])
@ -1620,6 +1671,7 @@ AC_SUBST(LIBDOM_CFLAGS)
AC_SUBST(LIBDOM_LIBS)
EL_LOG_CONFIG([CONFIG_LIBDOM], [[libdom]], [[$enable_libdom]])
# ===================================================================
# Further LDFLAGS tweaks
# ===================================================================
@ -1662,11 +1714,14 @@ test "$CONFIG_OS_OS2" = yes && LDFLAGS=`echo "$LDFLAGS" | sed "s/-Zbin-files//g"
# linker from finding the libraries listed in -l operands. So this
# -rdynamic check needs to happen after the libraries have already
# been added to $LDFLAGS.
have_rdynamic=no
AC_MSG_CHECKING([for -rdynamic])
LDFLAGS_X="$LDFLAGS"
LDFLAGS="-rdynamic $LDFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[have_rdynamic=yes],[have_rdynamic=no])
test "$have_rdynamic" = no && LDFLAGS="$LDFLAGS_X"
if test "$enable_static" = no; then
LDFLAGS_X="$LDFLAGS"
LDFLAGS="-rdynamic $LDFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[have_rdynamic=yes],[have_rdynamic=no])
test "$have_rdynamic" = no && LDFLAGS="$LDFLAGS_X"
fi
AC_MSG_RESULT($have_rdynamic)
# ===================================================================
@ -1754,16 +1809,16 @@ if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
CFLAGS="$CFLAGS -fno-strict-aliasing"
;;
4.5*)
CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-pointer-sign -Wno-enum-compare"
CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-enum-compare"
;;
4.*|5.*|6.*|7.*|8|8.*|9|9.*)
# Do not show warnings related to (char * | unsigned char *) type
# difference.
CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-pointer-sign"
CFLAGS="$CFLAGS -fno-strict-aliasing"
;;
10|10.*)
# gettext
CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-pointer-sign -Wno-builtin-declaration-mismatch"
CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-builtin-declaration-mismatch"
;;
*)
# These should be ok using -Werror
@ -1868,7 +1923,6 @@ AC_CONFIG_FILES([ \
Makefile.config \
contrib/elinks.spec \
contrib/lua/hooks.lua \
contrib/conv/w3m2links.awk \
doc/Doxyfile \
doc/man/man1/elinks.1 \
src/intl/gettext/ref-add.sed \

8
contrib/clipboard/clip.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
trap exit SIGTERM SIGINT
while true
do
socat -u PIPE:$HOME/.elinks/clipboard.fifo EXEC:"xclip -sel clip"
done

View File

@ -1 +0,0 @@
w3m2links.awk

View File

@ -1,4 +1,4 @@
#!@AWK@ -f
#!/bin/awk -f
#
# This converts w3m bookmarks.html to ELinks bookmarks.lst used by the Lua
# based bookmarks handling (NOT the internal one!).

View File

@ -193,7 +193,7 @@ rm -rf $RPM_BUILD_ROOT
* Thu Apr 04 2002 pasky@ucw.cz
- Changed some stuff so that it's now ready for inclusion..
* Sat Mar 16 2002 zimon (ät) iki fi
* Sat Mar 16 2002 zimon (ät) iki fi
- Made my own elinks.spec file as the one I found with Google didn't work how
I wanted

3
contrib/lua/meson.build Normal file
View File

@ -0,0 +1,3 @@
configure_file(input : 'hooks.lua.in',
output : 'hooks.lua',
configuration : conf_data)

4
contrib/meson.build Normal file
View File

@ -0,0 +1,4 @@
configure_file(input : 'elinks.spec.in',
output : 'elinks.spec',
configuration : conf_data)
subdir('lua')

View File

@ -100,6 +100,7 @@ powerful.
=over
=item
I<Developer's usage>: The function I<goto_url_hook> is called when the hook is
triggered, taking the target URL and current URL as its two arguments. It
returns the final target URL.
@ -1077,6 +1078,7 @@ These hooks effect a URL before ELinks has a chance to load it.
=over
=item
I<Developer's usage>: The function I<follow_url_hook> is called when the hook
is triggered, taking the target URL as its only argument. It returns the final
target URL.
@ -1147,6 +1149,7 @@ available.
=over
=item
I<Developer's usage>: The function I<pre_format_html_hook> is called when the
hook is triggered, taking the document's URL and the HTML source as its two
arguments. It returns the rewritten HTML code.
@ -1252,6 +1255,7 @@ you want to use some anonymizer for access to certain sites.
=over
=item
I<Developer's usage>: The function I<proxy_for_hook> is called when the hook is
triggered, taking the target URL as its only argument. It returns the proxy
URL, empty string to use no proxy or I<undef> to use the default proxy URL.
@ -1290,6 +1294,7 @@ stuff.
=over
=item
I<Developer's usage>: The function I<quit_hook> is called when the hook is
triggered, taking no arguments nor returning anything. ('cause, you know, what
would be the point?)

View File

@ -24,6 +24,7 @@ quit_hook() -- Clean up before ELinks exits.
"""
import elinks
from urllib.parse import urlparse, parse_qs
from importlib import reload
dumbprefixes = {
@ -74,9 +75,12 @@ def follow_url_hook(url):
url -- The URL of the link.
"""
google_redirect = 'http://www.google.com/url?sa=D&q='
google_redirect = 'https://www.google.com/url?'
if url.startswith(google_redirect):
return url.replace(google_redirect, '')
try:
return parse_qs(urlparse(url).query)['q'][0]
except:
pass
def pre_format_html_hook(url, html):
"""Rewrite the body of a document before it's formatted.

View File

@ -44,7 +44,7 @@ var smartprefixes = {
sdp: "http://www.slashdot.org/search.pl?query=%s&op=polls",
sdj: "http://www.slashdot.org/search.pl?query=%s&op=journals",
dbug: "http://bugs.debian.org/%s",
dix: "http://dix.osola.com/index.de.php?trans=1&search=%s",
//dix: "http://dix.osola.com/index.de.php?trans=1&search=%s",
dixgram: "http://dix.osola.com/v.php?language=german&search=%s",
dpkg: "http://packages.debian.org/%s",
emacs: "http://www.emacswiki.org/cgi-bin/wiki.pl?search=%s",

View File

@ -102,15 +102,15 @@ function gmane (url)
}
/* javascript:bugzilla('http://bugzilla.elinks.cz/', "%s"); */
function bugzilla (base_url, arguments)
function bugzilla (base_url, args)
{
if (!arguments || arguments == '') return base_url;
if (!args || args == '') return base_url;
if (arguments.match(/^[\d]+$/))
return base_url + 'show_bug.cgi?id=' + arguments;
if (args.match(/^[\d]+$/))
return base_url + 'show_bug.cgi?id=' + args;
return base_url + 'buglist.cgi?short_desc_type=allwordssubstr'
+ '&short_desc=' + escape(arguments);
+ '&short_desc=' + escape(args);
}
/* javascript:babelfish("%s"); */
@ -130,18 +130,18 @@ function babelfish (url)
"Deutsch": 'de',
"english": 'en',
"french": 'fr',
"fran\231ais": 'fr',
"fran\x99ais": 'fr',
"greek": 'el',
"italian": 'it',
"italiano": 'it',
"japanese": 'ja',
"korean": 'ko',
"portuguese": 'pt',
"portugu\234s": 'pt',
"portugu\x9Cs": 'pt',
"russian": 'ru',
"spanish": 'es',
"espanol": 'es',
"espa\241ol": 'es',
"espa\xA1ol": 'es',
};
var parts = url.match(/^(\S+)\s+(\S+)\s*(.*)/);

View File

@ -7,7 +7,7 @@
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = ELinks
PROJECT_NUMBER = @VERSION@
OUTPUT_DIRECTORY = api
OUTPUT_DIRECTORY = $(OUTPUT_DIRECTORY)api
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES

View File

@ -54,8 +54,8 @@ MAN_DOCS-$(CONFIG_XMLTO) += \
elinks.conf.5 \
elinkskeys.5
# Use jw for generating PDF, since xmlto seems to freak out.
PDF_DOCS-$(CONFIG_JW) += \
# Use dblatex for generating PDF
PDF_DOCS-$(CONFIG_DBLATEX) += \
manual.pdf
API_DOCS-$(CONFIG_DOXYGEN) += \
@ -146,8 +146,8 @@ option-%.frag.xhtml: $(ELINKS) $(HELP2XML)
#############################################################################
# Build commands and macros
quiet_cmd_jw = ' [$(LINK_COLOR)JW$(END_COLOR)] $(RELPATH)$@'
cmd_jw = $(JW) -b $(2) $<
quiet_cmd_dblatex = ' [$(LINK_COLOR)DBLATEX$(END_COLOR)] $(RELPATH)$@'
cmd_dblatex = $(DBLATEX) $<
quiet_cmd_xmlto = ' [$(LINK_COLOR)XMLTO$(END_COLOR)] $(RELPATH)$@'
cmd_xmlto = $(XMLTO) -o $(call outdir) $(3) $(2) $<
@ -203,7 +203,7 @@ elinks.conf.5.html: option-config.frag.xhtml
$(call cmd,xmlto,html)
%.pdf: %.xml
$(call cmd,jw,pdf)
$(call cmd,dblatex)
%.html: %.pod
$(call cmd,pod2html)

View File

@ -76,7 +76,7 @@ The following tools are used for generating documentation in various formats:
- python: interpreter for asciidoc, which is the basic tool for
lifting the .txt files to other formats.
- xmlto: used for outputting chunked HTML and man pages.
- jw: used for pdf documents.
- dblatex: used for pdf documents.
- pod2html: used for perl docs.
All these tools are checked by configure, thus to successfully build all the
@ -89,7 +89,7 @@ manual formats (with tool requirements listed):
- HTML one-file (asciidoc)
- HTML chunked / multiple files (asciidoc + xmlto)
- PDF (asciidoc + jw)
- PDF (asciidoc + dblatex)
and the following man page formats:

View File

@ -1050,11 +1050,12 @@ document\&.plain\&.compress_empty_lines \fB[0|1]\fR (default: 0)
Compress successive empty lines to only one in displayed text\&.
.RE
.SS "document\&.uri_passing (URI passing)"
Rules for passing URIs to external commands\&. When one rule is defined the link and tab menu will have a menu item that makes it possible to pass the the link, frame or tab URI to an external command\&. If several rules are defined the link and tab menu will have a submenu of items for each rule\&.
.sp
Note, this is mostly useful for launching graphical viewers, since there is no support for releasing the terminal while the command runs\&. The action and submenus are also available by binding keys to the frame\-external\-command, the link\-external\-command, and the tab\-external\-command actions\&.
Rules for passing URIs to external commands\&. When one rule is defined the link and tab menu will have a menu item that makes it possible to pass the link, frame or tab URI to an external command\&. If several rules are defined the link and tab menu will have a submenu of items for each rule\&. The commands are also available by binding keys to the frame-external-command, the link-external-command and the tab-external-command actions\&.
.RE
.SS "document\&.uri_passing\&._template_ (URI passing)"
Definition of an external program that can be passed URIs.
.PP
document\&.uri_passing\&._template_ \fB<str>\fR (default: "")
document\&.uri_passing\&._template_\&.command \fB<str>\fR (default: "")
.RS 4
A rule for passing URI to an external command\&. The format is:
.sp
@ -1065,11 +1066,16 @@ A rule for passing URI to an external command\&. The format is:
.RS 4
\h'-04'\(bu\h'+03'%% in the string means \'%\'
.RE
.IP "" 4
.PP
Do
\fBnot\fR
put single\- or double\-quotes around %c\&.
.RE
.PP
document\&.uri_passing\&._template_\&.foreground (default: 0)
.RS 4
External commands run in the background by default: elinks is still active, and they do not receive standard input. This suboption allows reverses this behaviour: the command receives standard input and elinks is blocked.
.RE
.SS "ecmascript (ECMAScript)"
ECMAScript options\&.
.PP

249
doc/meson.build Normal file
View File

@ -0,0 +1,249 @@
configure_file(input : 'Doxyfile.in',
output : 'Doxyfile',
configuration : conf_data)
dblatex = find_program('dblatex', required: false)
doxygen = find_program('doxygen', required: false)
pod2html = find_program('pod2html', required: false)
xmlto = find_program('xmlto', required: false)
perl_html = []
perl_hooks_html = []
if pod2html.found()
perl_html = custom_target('perl.html',
input: ['perl.pod'],
output: ['perl.html'],
command: [pod2html, '--outfile=@OUTPUT@', '--infile=@INPUT@'])
perl_hooks_html = custom_target('perl-hooks.html',
input: ['../contrib/perl/hooks.pl'],
output: ['perl-hooks.html'],
command: [pod2html, '--outfile=@OUTPUT@', '--infile=@INPUT@'])
endif
features_txt = custom_target('features.txt',
input: ['../features.conf'],
output: 'features.txt',
capture: true,
command: ['@CURRENT_SOURCE_DIR@/tools/conf2doc', '@INPUT@'])
keymap_actions_txt = custom_target('keymap-actions.txt',
input: ['../src/config/kbdbind.c'],
output: 'keymap-actions.txt',
capture: true,
command: ['@CURRENT_SOURCE_DIR@/tools/keys2doc', '@INPUT@', 'keymap-actions.txt'])
keymap_defaults_txt = custom_target('keymap-defaults.txt',
input: ['../src/config/kbdbind.c'],
output: 'keymap-defaults.txt',
capture: true,
command: ['@CURRENT_SOURCE_DIR@/tools/keys2doc', '@INPUT@', 'keymap-defaults.txt'])
option_command_frag_xml = custom_target('option-command.frag.xml',
input: [],
output: 'option-command.frag.xml',
command: ['LC_ALL=C', 'LANGUAGE=en', '@CURRENT_SOURCE_DIR@/tools/help2xml', elinks, '@OUTPUT@'])
option_config_frag_xml = custom_target('option-config.frag.xml',
input: [],
output: 'option-config.frag.xml',
command: ['LC_ALL=C', 'LANGUAGE=en', '@CURRENT_SOURCE_DIR@/tools/help2xml', elinks, '@OUTPUT@'])
option_command_frag_xhtml = custom_target('option-command.frag.xhtml',
input: [],
output: 'option-command.frag.xhtml',
command: ['LC_ALL=C', 'LANGUAGE=en', '@CURRENT_SOURCE_DIR@/tools/help2xml', elinks, '@OUTPUT@'])
option_config_frag_xhtml = custom_target('option-config.frag.xhtml',
input: [],
output: 'option-config.frag.xhtml',
command: ['LC_ALL=C', 'LANGUAGE=en', '@CURRENT_SOURCE_DIR@/tools/help2xml', elinks, '@OUTPUT@'])
elinks_1_html = custom_target('elinks.1.html',
input: 'elinks.1.txt',
output: 'elinks.1.html',
depends: option_command_frag_xhtml,
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/xhtml11.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'xhtml11',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
elinks_conf_5_html = custom_target('elinks.conf.5.html',
input: 'elinks.conf.5.txt',
output: 'elinks.conf.5.html',
depends: option_config_frag_xhtml,
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/xhtml11.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'xhtml11',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
elinkskeys_5_html = custom_target('elinkskeys.5.html',
input: 'elinkskeys.5.txt',
output: 'elinkskeys.5.html',
depends: [keymap_actions_txt, keymap_defaults_txt],
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/xhtml11.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'xhtml11',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
hacking_html = custom_target('hacking.html',
input: 'hacking.txt',
output: 'hacking.html',
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/xhtml11.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'xhtml11',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
manual_html = custom_target('manual.html',
input: 'manual.txt',
output: 'manual.html',
depends: features_txt,
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/xhtml11.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'xhtml11',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
elinks_1_xml = custom_target('elinks.1.xml',
input: 'elinks.1.txt',
output: 'elinks.1.xml',
depends: option_command_frag_xml,
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/docbook.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'docbook',
'-d', 'manpage',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
elinks_conf_5_xml = custom_target('elinks.conf.5.xml',
input: 'elinks.conf.5.txt',
output: 'elinks.conf.5.xml',
depends: option_config_frag_xml,
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/docbook.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'docbook',
'-d', 'manpage',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
elinkskeys_5_xml = custom_target('elinkskeys.5.xml',
input: 'elinkskeys.5.txt',
output: 'elinkskeys.5.xml',
depends: [keymap_actions_txt, keymap_defaults_txt],
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/docbook.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'docbook',
'-d', 'manpage',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
hacking_xml = custom_target('hacking.xml',
input: 'hacking.txt',
output: 'hacking.xml',
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/docbook.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'docbook',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
manual_xml = custom_target('manual.xml',
input: 'manual.txt',
output: 'manual.xml',
depends: features_txt,
command: ['@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.py',
'--no-conf', '-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/asciidoc.conf',
'-f', '@CURRENT_SOURCE_DIR@/tools/asciidoc/docbook.conf',
'-f', '@CURRENT_SOURCE_DIR@/asciidoc.conf',
'-a', 'builddir='+meson.current_build_dir()+'/',
'-a', 'elinks_version='+meson.project_version(),
'-b', 'docbook',
'--unsafe', '-o', '@OUTPUT@', '@INPUT@'])
elinks_1 = []
elinks_conf_5 = []
elinkskeys_5 = []
manual_html_chunked = []
if xmlto.found()
elinks_1 = custom_target('elinks.1',
input: [],
output: 'elinks.1',
depends: elinks_1_xml,
command: [xmlto, '-o', meson.current_build_dir(), 'man', meson.current_build_dir()+'/elinks.1.xml'])
elinks_conf_5 = custom_target('elinks.conf.5',
input: [],
output: 'elinks.conf.5',
depends: elinks_conf_5_xml,
command: [xmlto, '-o', meson.current_build_dir(), 'man', meson.current_build_dir()+'/elinks.conf.5.xml'])
elinkskeys_5 = custom_target('elinkskeys.5',
input: [],
output: 'elinkskeys.5',
depends: elinkskeys_5_xml,
command: [xmlto, '-o', meson.current_build_dir(), 'man', meson.current_build_dir()+'/elinkskeys.5.xml'])
manual_html_chunked = custom_target('manual.html-chunked',
input: [],
output: 'manual.html-chunked',
depends: manual_xml,
command: [xmlto, '-o', meson.current_build_dir() + '/manual.html-chunked', 'html', meson.current_build_dir()+'/manual.xml'])
endif
manual_pdf = []
if dblatex.found()
manual_pdf = custom_target('manual.pdf',
input: [],
output: 'manual.pdf',
depends: manual_xml,
command: [dblatex, meson.current_build_dir() + '/manual.xml'])
endif
doxygen_api = []
if doxygen.found()
doxygen_api = custom_target('api',
input: [],
output: 'api',
command: ['OUTPUT_DIRECTORY='+meson.current_build_dir()+'/', doxygen, meson.current_build_dir()+'/Doxyfile'])
endif
txt = alias_target('txt', elinks, features_txt, keymap_actions_txt, keymap_defaults_txt)
alias_target('xml', elinks, option_command_frag_xml, option_config_frag_xml, option_command_frag_xhtml, option_config_frag_xhtml,
elinks_1_xml, elinks_conf_5_xml, elinkskeys_5_xml, hacking_xml, manual_xml)
alias_target('html', elinks, perl_html, perl_hooks_html, elinks_1_html, elinks_conf_5_html, elinkskeys_5_html, hacking_html, manual_html,
manual_html_chunked)
alias_target('pdf', elinks, manual_xml, manual_pdf)
alias_target('man', elinks, elinks_1, elinks_conf_5, elinkskeys_5)

View File

@ -91,7 +91,8 @@ choice if you want).
Attaching a program to it::
You must tell ELinks the exact command for running it (with any
options you wish). In place of the filename you must enter %.
options you wish). In place of the filename you must enter %f. Also the
uri can be used as %u.
Choosing whether you want confirmation before applying it::
@ -144,12 +145,12 @@ and value with the value you want to assign to the item. You must do so for
each of the available items: program, ask and block.
The value for program is a string with the exact command you want to be issued
to view the file, placing % were you would put the file name. The values for
ask and block are either 0 (no) or 1 (yes). Available contexts include unix
and unix-xwin, which mean UNIX text terminal and X respectively (others can be
os2, win32, beos, riscos, ...). The latter does not mean you are running
ELinks from X, just that the DISPLAY variable is set so that ELinks may run an
X program.
to view the file, placing %f were you would put the file name and %u the uri
(if needed). The values for ask and block are either 0 (no) or 1 (yes).
Available contexts include unix and unix-xwin, which mean UNIX text terminal
and X respectively (others can be os2, win32, beos, riscos, ...). The latter
does not mean you are running ELinks from X, just that the DISPLAY variable is
set so that ELinks may run an X program.
To illustrate it, here is an example. Suppose you want to define the
image_viewer handler which should be used to view images. The configuration
@ -162,8 +163,8 @@ set mime.handler.image_viewer.unix-xwin.ask = 0
set mime.handler.image_viewer.unix.block = 1
set mime.handler.image_viewer.unix-xwin.block = 0
set mime.handler.image_viewer.unix.program = "zgv %"
set mime.handler.image_viewer.unix-xwin.program = "xli %"
set mime.handler.image_viewer.unix.program = "zgv %f"
set mime.handler.image_viewer.unix-xwin.program = "xli %f"
--------------------------------------------------------------------------------
In this example the image_viewer handler uses the svgalib image viewer zgv

9
git-dirty.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
cd "$MESON_SOURCE_ROOT"
for line in $(git diff-index HEAD 2>/dev/null)
do
echo '-dirty'
exit 0
done

713
meson.build Normal file
View File

@ -0,0 +1,713 @@
project('elinks', ['c','cpp'], version:'0.15.GIT', license:'GPLv2')
srcs=[]
srcdir = meson.source_root()
txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD').stdout().strip()
dirty = run_command(srcdir + '/git-dirty.sh').stdout().strip()
add_global_arguments('-DBUILD_ID="' + txt + dirty + '"', language : 'c')
conf_data = configuration_data()
conf_data.set('VERSION', meson.project_version())
conf_data.set('PACKAGE', meson.project_name())
conf_data.set('CONFIG_LARGEFILE', get_option('largefile'))
conf_data.set('CONFIG_BOOKMARKS', get_option('bookmarks'))
conf_data.set('CONFIG_XBEL_BOOKMARKS', get_option('xbel'))
conf_data.set('CONFIG_SCRIPTING_SPIDERMONKEY', get_option('sm-scripting'))
conf_data.set('CONFIG_NLS', get_option('nls'))
conf_data.set('CONFIG_COOKIES', get_option('cookies'))
conf_data.set('CONFIG_FORMHIST', get_option('formhist'))
conf_data.set('CONFIG_GLOBHIST', get_option('globhist'))
conf_data.set('CONFIG_MAILCAP', get_option('mailcap'))
conf_data.set('CONFIG_MIMETYPES', get_option('mimetypes'))
conf_data.set('CONFIG_IPV6', get_option('ipv6'))
conf_data.set('CONFIG_BITTORRENT', get_option('bittorrent'))
conf_data.set('CONFIG_DATA', get_option('data'))
conf_data.set('CONFIG_URI_REWRITE', get_option('uri-rewrite'))
conf_data.set('CONFIG_CGI', get_option('cgi'))
conf_data.set('CONFIG_FINGER', get_option('finger'))
conf_data.set('CONFIG_FSP', get_option('fsp'))
conf_data.set('CONFIG_FTP', get_option('ftp'))
conf_data.set('CONFIG_GOPHER', get_option('gopher'))
conf_data.set('CONFIG_NNTP', get_option('nntp'))
conf_data.set('CONFIG_SMB', get_option('smb'))
conf_data.set('CONFIG_MOUSE', get_option('mouse'))
conf_data.set('CONFIG_SYSMOUSE', get_option('sysmouse'))
conf_data.set('CONFIG_88_COLORS', get_option('88-colors'))
conf_data.set('CONFIG_256_COLORS', get_option('256-colors'))
conf_data.set('CONFIG_TRUE_COLOR', get_option('true-color'))
conf_data.set('CONFIG_EXMODE', get_option('exmode'))
conf_data.set('CONFIG_LEDS', get_option('leds'))
conf_data.set('CONFIG_MARKS', get_option('marks'))
conf_data.set10('CONFIG_CSS', get_option('css'))
conf_data.set('CONFIG_DOM', get_option('html-highlight'))
conf_data.set('CONFIG_BACKTRACE', get_option('backtrace'))
conf_data.set('CONFIG_NO_ROOT', get_option('no-root'))
conf_data.set('CONFIG_DEBUG', get_option('withdebug'))
conf_data.set('CONFIG_FASTMEM', get_option('fastmem'))
conf_data.set('CONFIG_OWN_LIBC', get_option('own-libc'))
conf_data.set('CONFIG_SMALL', get_option('small'))
conf_data.set('CONFIG_UTF8', get_option('utf-8'))
conf_data.set('CONFIG_COMBINING', get_option('combining'))
conf_data.set('CONFIG_XTERM', get_option('xterm'))
conf_data.set('CONFIG_GPM', get_option('gpm'))
conf_data.set('CONFIG_TERMINFO', get_option('terminfo'))
conf_data.set('CONFIG_GZIP', get_option('zlib'))
conf_data.set('CONFIG_BZIP2', get_option('bzlib'))
conf_data.set('CONFIG_BROTLI', get_option('brotli'))
conf_data.set('CONFIG_ZSTD', get_option('zstd'))
conf_data.set('CONFIG_IDN', get_option('idn'))
conf_data.set('CONFIG_LZMA', get_option('lzma'))
conf_data.set('CONFIG_GSSAPI', get_option('gssapi'))
conf_data.set('CONFIG_ECMASCRIPT_SMJS', get_option('spidermonkey'))
conf_data.set('CONFIG_SCRIPTING_GUILE', get_option('guile'))
conf_data.set('CONFIG_SCRIPTING_PERL', get_option('perl'))
conf_data.set('CONFIG_SCRIPTING_PYTHON', get_option('python'))
luapkg = get_option('luapkg')
if luapkg != ''
conf_data.set('CONFIG_SCRIPTING_LUA', true)
else
conf_data.set('CONFIG_SCRIPTING_LUA', false)
endif
conf_data.set('CONFIG_TRE', get_option('tre'))
conf_data.set('CONFIG_SCRIPTING_RUBY', get_option('ruby'))
conf_data.set('CONFIG_GNUTLS', get_option('gnutls'))
conf_data.set('CONFIG_OPENSSL', get_option('openssl'))
conf_data.set('CONFIG_LIBEV', get_option('libev'))
conf_data.set('CONFIG_LIBEVENT', get_option('libevent'))
conf_data.set('CONFIG_X', get_option('x'))
conf_data.set('CONFIG_LIBDOM', get_option('libdom'))
#CONFIG_BOOKMARKS=true
#CONFIG_XBEL_BOOKMARKS=true
#CONFIG_COOKIES=true
#CONFIG_DOM=true
if conf_data.get('CONFIG_SCRIPTING_SPIDERMONKEY') or conf_data.get('CONFIG_ECMASCRIPT_SMJS')
conf_data.set('CONFIG_ECMASCRIPT', true)
else
conf_data.set('CONFIG_ECMASCRIPT', false)
endif
conf_data.set('CONFIG_ECMASCRIPT_SMJS_HEARTBEAT', true)
#CONFIG_FORMHIST', true)
#CONFIG_GLOBHIST', true)
conf_data.set('CONFIG_SCRIPTING', true)
#CONFIG_SCRIPTING_GUILE', false)
#conf_data.set('CONFIG_SCRIPTING_LUA', true)
#CONFIG_SCRIPTING_PERL', false)
#CONFIG_SCRIPTING_PYTHON', false)
#CONFIG_SCRIPTING_RUBY', false)
#CONFIG_SCRIPTING_SPIDERMONKEY', false)
#CONFIG_LEDS', true)
#CONFIG_EXMODE', false)
#CONFIG_CSS', true)
#CONFIG_LIBDOM', false)
#CONFIG_BROTLI', true)
#CONFIG_BZIP2', true)
#CONFIG_GZIP', true)
#CONFIG_LZMA', false)
#CONFIG_ZSTD', true)
#CONFIG_NLS', true)
#CONFIG_UTF8', true)
#CONFIG_MAILCAP', true)
#CONFIG_MIMETYPES', true)
system = host_machine.system()
if system == 'haiku'
conf_data.set('CONFIG_OS_BEOS', true)
else
conf_data.set('CONFIG_OS_BEOS', false)
endif
if system == 'windows'
conf_data.set('CONFIG_OS_WIN32', true)
else
conf_data.set('CONFIG_OS_WIN32', false)
endif
if system != 'haiku' and system != 'windows'
conf_data.set10('CONFIG_OS_UNIX', true)
else
conf_data.set10('CONFIG_OS_UNIX', false)
endif
conf_data.set('CONFIG_SSL', true)
conf_data.set('CONFIG_OS_OS2', false)
conf_data.set('CONFIG_OS_RISCOS', false)
# AC_HEADER_DIRENT
conf_data.set10('HAVE_DIRENT_H', 1)
# AC_HEADER_SYS_WAIT
conf_data.set10('HAVE_SYS_WAIT_H', 1)
# AC_HEADER_TIME
conf_data.set10('HAVE_SYS_TIME_H', 1)
compiler = meson.get_compiler('c')
if conf_data.get('CONFIG_ECMASCRIPT')
extracflags = ['-xc++', '-fpermissive']
else
extracflags = []
endif
conf_data.set10('HAVE_WCHAR_H', compiler.has_header('wchar.h'))
conf_data.set10('HAVE_WCTYPE_H', compiler.has_header('wctype.h'))
conf_data.set10('HAVE_FCNTL_H', compiler.has_header('fcntl.h'))
conf_data.set10('HAVE_UNISTD_H', compiler.has_header('unistd.h'))
conf_data.set10('HAVE_SIGACTION_H', compiler.has_header('sigaction.h'))
conf_data.set10('HAVE_ARPA_INET_H', compiler.has_header('arpa/inet.h'))
conf_data.set10('HAVE_NETINET_IN_SYSTM_H', compiler.has_header('netinet/in_systm.h'))
conf_data.set10('HAVE_NETINET_IN_SYSTEM_H', compiler.has_header('netinet/in_system.h'))
conf_data.set10('HAVE_NETINET_IP_H', compiler.has_header('netinet/ip.h'))
conf_data.set10('HAVE_NETDB_H', compiler.has_header('netdb.h'))
conf_data.set10('HAVE_NETINET_IN_H', compiler.has_header('netinet/in.h'))
conf_data.set10('HAVE_NETINET_IN6_VAR_H', compiler.has_header('netinet/in6_var.h'))
conf_data.set10('HAVE_IFADDRS_H', compiler.has_header('ifaddrs.h'))
conf_data.set('HAVE_SYS_CYGWIN_H', compiler.has_header('sys/cygwin.h'))
conf_data.set('HAVE_IO_H', compiler.has_header('io.h'))
conf_data.set10('HAVE_SYS_FMUTEX_H', compiler.has_header('sys/fmutex.h'))
conf_data.set10('HAVE_SYS_IOCTL_H', compiler.has_header('sys/ioctl.h'))
conf_data.set10('HAVE_SYS_SOCKIO_H', compiler.has_header('sys/sockio.h'))
conf_data.set10('HAVE_SYS_RESOURCE_H', compiler.has_header('sys/resource.h'))
conf_data.set10('HAVE_SYS_SELECT_H', compiler.has_header('sys/select.h'))
conf_data.set10('HAVE_SYS_SOCKET_H', compiler.has_header('sys/socket.h'))
conf_data.set10('HAVE_SYS_TIME_H', compiler.has_header('sys/time.h'))
conf_data.set10('HAVE_SYS_UTSNAME_H', compiler.has_header('sys/utsname.h'))
conf_data.set10('HAVE_NET_IF_H', compiler.has_header('net/if.h'))
conf_data.set10('HAVE_STDINT_H', compiler.has_header('stdint.h'))
conf_data.set10('HAVE_INTTYPES_H', compiler.has_header('inttypes.h'))
conf_data.set10('HAVE_PWD_H', compiler.has_header('pwd.h'))
conf_data.set10('HAVE_TERMIOS_H', compiler.has_header('termios.h'))
conf_data.set10('HAVE_POLL_H', compiler.has_header('poll.h'))
conf_data.set10('HAVE_SYS_TYPES_H', compiler.has_header('sys/types.h'))
conf_data.set10('HAVE_GPM_H', compiler.has_header('gpm.h'))
conf_data.set('HAVE_IDNA_H', compiler.has_header('idna.h'))
conf_data.set('HAVE_EVENT_H', compiler.has_header('event.h'))
conf_data.set10('HAVE_ALLOCA_H', compiler.has_header('alloca.h'))
conf_data.set('HAVE_STDALIGN_H', compiler.has_header('stdalign.h'))
deps = []
if conf_data.get('CONFIG_GZIP')
zdeps = dependency('zlib')
deps += zdeps
endif
if conf_data.get('CONFIG_TRE')
tredeps = dependency('tre')
deps += tredeps
endif
if conf_data.get('CONFIG_LIBEVENT')
eventdeps = dependency('libevent')
deps += eventdeps
conf_data.set('HAVE_LIBEVENT', true)
else
eventdeps = []
endif
if conf_data.get('CONFIG_OPENSSL')
ssldeps = dependency('openssl')
deps += ssldeps
conf_data.set('USE_OPENSSL', true)
else
ssldeps = []
endif
gnutlsdeps = []
if conf_data.get('CONFIG_GNUTLS')
gnutlsdeps = dependency('gnutls')
libgcryptdeps = dependency('libgcrypt')
deps += gnutlsdeps
deps += libgcryptdeps
endif
if conf_data.get('CONFIG_BROTLI')
brotlideps = dependency('libbrotlidec')
deps += brotlideps
endif
if conf_data.get('CONFIG_ZSTD')
zstddeps = dependency('libzstd')
deps += zstddeps
endif
if conf_data.get('CONFIG_IDN')
idndeps = dependency('libidn')
deps += idndeps
endif
conf_data.set('HAVE_X11', false)
if conf_data.get('CONFIG_X')
x11deps = dependency('x11')
deps += x11deps
conf_data.set('HAVE_X11', compiler.has_header('X11/Xlib.h'))
endif
if conf_data.get('CONFIG_BZIP2')
bz2deps = dependency('bzip2')
deps += bz2deps
endif
if conf_data.get('CONFIG_ECMASCRIPT')
mozjsdeps = dependency('mozjs-52')
deps += mozjsdeps
sqlite3deps = dependency('sqlite3')
deps += sqlite3deps
endif
if conf_data.get('CONFIG_SCRIPTING_LUA')
luadeps = dependency(luapkg)
deps += luadeps
endif
if conf_data.get('CONFIG_XBEL_BOOKMARKS')
expatdeps = dependency('expat')
deps += expatdeps
endif
if conf_data.get('CONFIG_GPM')
libgpmdeps = compiler.find_library('gpm')
deps += libgpmdeps
endif
if conf_data.get('CONFIG_LIBDOM')
domdeps = dependency('libdom')
deps += domdeps
endif
if conf_data.get('CONFIG_SCRIPTING_PYTHON')
python3deps = dependency('python3-embed')
deps += python3deps
endif
rubydeps = []
if conf_data.get('CONFIG_SCRIPTING_RUBY')
rubydeps = dependency('ruby-2.6')
deps += rubydeps
endif
guiledeps = []
if conf_data.get('CONFIG_SCRIPTING_GUILE')
guiledeps = dependency('guile-2.2')
deps += guiledeps
endif
if conf_data.get('CONFIG_FSP')
fspdeps = compiler.find_library('fsplib')
deps += fspdeps
endif
eh = ''
if conf_data.get('CONFIG_LIBEV')
conf_data.set('HAVE_LIBEV_EVENT_H', compiler.has_header('libev/event.h'))
eh = '#include <libev/event.h>'
elif conf_data.get('CONFIG_LIBEVENT')
eh = '#include <event.h>'
endif
if compiler.has_header('sys/un.h')
conf_data.set('CONFIG_INTERLINK', true)
conf_data.set10('HAVE_SYS_UN_H', true)
else
conf_data.set('CONFIG_INTERLINK', false)
endif
#AC_STRUCT_TM
#AC_C_CONST
#AC_C_INLINE
if conf_data.get('CONFIG_ECMASCRIPT')
conf_data.set('NONSTATIC_INLINE', '')
else
conf_data.set('NONSTATIC_INLINE', 'inline')
endif
#AC_SYS_LARGEFILE
#AC_TYPE_SIZE_T
#AC_TYPE_OFF_T
#EL_CHECK_TYPE(ssize_t, int)
conf_data.set10('HAVE_LONG_LONG', 1)
conf_data.set10('HAVE_OFF_T', 1)
conf_data.set10('HAVE_INT32_T', 1)
conf_data.set10('HAVE_UINT32_T', 1)
conf_data.set10('HAVE_UINT16_T', 1)
conf_data.set10('HAVE_VARIADIC_MACROS', 1)
#AC_FUNC_MEMCMP
#AC_FUNC_MMAP
conf_data.set10('HAVE_MMAP', 1)
if compiler.has_function('strftime', prefix: '#include <time.h>')
conf_data.set10('HAVE_STRFTIME', 1)
endif
if compiler.has_function('strptime', prefix: '#include <time.h>', args: '-D_XOPEN_SOURCE')
conf_data.set10('HAVE_STRPTIME', 1)
endif
if compiler.has_function('atoll', prefix : '#include <stdlib.h>')
conf_data.set10('HAVE_ATOLL', 1)
endif
if compiler.has_function('gethostbyaddr', prefix : '#include <netdb.h>')
conf_data.set10('HAVE_GETHOSTBYADDR', 1)
endif
if compiler.has_function('herror', prefix : '#include <netdb.h>')
conf_data.set10('HAVE_HERROR', 1)
endif
if compiler.has_function('strerror', prefix : '#include <string.h>')
conf_data.set10('HAVE_STRERROR', 1)
endif
if compiler.has_function('popen', prefix : '#include <stdio.h>')
conf_data.set10('HAVE_POPEN', 1)
endif
if compiler.has_function('uname', prefix : '#include <sys/utsname.h>')
conf_data.set10('HAVE_UNAME', 1)
endif
if compiler.has_function('access', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_ACCESS', 1)
endif
if compiler.has_function('chmod', prefix : '#include <sys/stat.h>')
conf_data.set10('HAVE_CHMOD', 1)
endif
if compiler.has_function('alarm', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_ALARM', 1)
endif
if compiler.has_function('timegm', prefix : '#include <time.h>')
conf_data.set10('HAVE_TIMEGM', 1)
endif
if compiler.has_function('mremap', prefix : '#include <sys/mman.h>', args: '-D_GNU_SOURCE')
conf_data.set10('HAVE_MREMAP', 1)
endif
if compiler.has_function('strcasecmp', prefix : '#include <strings.h>')
conf_data.set10('HAVE_STRCASECMP', 1)
endif
if compiler.has_function('strncasecmp', prefix : '#include <strings.h>')
conf_data.set10('HAVE_STRNCASECMP', 1)
endif
if compiler.has_function('strcasestr', prefix : '#include <string.h>', args: '-D_GNU_SOURCE')
conf_data.set10('HAVE_STRCASESTR', 1)
endif
conf_data.set10('HAVE_STRSTR', 1)
conf_data.set10('HAVE_STRCHR', 1)
conf_data.set10('HAVE_STRRCHR', 1)
if compiler.has_function('memmove', prefix : '#include <string.h>')
conf_data.set10('HAVE_MEMMOVE', 1)
endif
if compiler.has_function('bcopy', prefix : '#include <strings.h>')
conf_data.set10('HAVE_BCOPY', 1)
endif
if compiler.has_function('stpcpy', prefix : '#include <string.h>')
conf_data.set10('HAVE_STPCPY', 1)
endif
if compiler.has_function('strdup', prefix : '#include <string.h>')
conf_data.set10('HAVE_STRDUP', 1)
endif
if compiler.has_function('index', prefix : '#include <strings.h>')
conf_data.set10('HAVE_INDEX', 1)
endif
if compiler.has_function('isdigit', prefix : '#include <ctype.h>')
conf_data.set10('HAVE_ISDIGIT', 1)
endif
if compiler.has_function('mempcpy', prefix : '#include <string.h>')
conf_data.set10('HAVE_MEMPCPY', 1)
endif
if compiler.has_function('memrchr', prefix : '#include <string.h>', args: '-D_GNU_SOURCE')
conf_data.set10('HAVE_MEMRCHR', 1)
endif
if compiler.has_function('snprintf', prefix : '#include <stdio.h>')
conf_data.set10('HAVE_SNPRINTF', 1)
endif
if compiler.has_function('vsnprintf', prefix : '#include <stdarg.h>')
conf_data.set10('HAVE_VSNPRINTF', 1)
endif
if compiler.has_function('asprintf', prefix : '#include <stdio.h>', args: '-D_GNU_SOURCE')
conf_data.set10('HAVE_ASPRINTF', 1)
endif
if compiler.has_function('vasprintf', prefix : '#include <stdio.h>', args: '-D_GNU_SOURCE')
conf_data.set10('HAVE_VASPRINTF', 1)
endif
if compiler.has_function('getifaddrs', prefix : '#include <ifaddrs.h>')
conf_data.set10('HAVE_GETIFADDRS', 1)
endif
if compiler.has_function('getpwnam', prefix : '#include <pwd.h>')
conf_data.set10('HAVE_GETPWNAM', 1)
endif
if compiler.has_function('inet_pton', prefix : '#include <arpa/inet.h>')
conf_data.set10('HAVE_INET_PTON', 1)
endif
if compiler.has_function('inet_ntop', prefix : '#include <arpa/inet.h>')
conf_data.set10('HAVE_INET_NTOP', 1)
endif
if compiler.has_function('fflush', prefix : '#include <stdio.h>')
conf_data.set10('HAVE_FFLUSH', 1)
endif
if compiler.has_function('fsync', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_FSYNC', 1)
endif
if compiler.has_function('fseeko', prefix : '#include <stdio.h>')
conf_data.set10('HAVE_FSEEKO', 1)
endif
if compiler.has_function('ftello', prefix : '#include <stdio.h>')
conf_data.set10('HAVE_FTELLO', 1)
endif
if compiler.has_function('sigaction', prefix : '#include <signal.h>')
conf_data.set10('HAVE_SIGACTION', 1)
endif
if compiler.has_function('gettimeofday', prefix : '#include <sys/time.h>')
conf_data.set10('HAVE_GETTIMEOFDAY', 1)
endif
if compiler.has_function('clock_gettime', prefix : '#include <time.h>')
conf_data.set10('HAVE_CLOCK_GETTIME', 1)
endif
if compiler.has_function('setitimer', prefix : '#include <sys/time.h>')
conf_data.set10('HAVE_SETITIMER', 1)
endif
if compiler.has_function('setenv', prefix : '#include <stdlib.h>')
conf_data.set10('HAVE_SETENV', 1)
conf_data.set('HAVE_SETENV_OR_PUTENV', true)
endif
if compiler.has_function('putenv', prefix : '#include <stdlib.h>')
conf_data.set10('HAVE_PUTENV', 1)
conf_data.set('HAVE_SETENV_OR_PUTENV', true)
endif
if compiler.has_function('unsetenv', prefix : '#include <stdlib.h>')
conf_data.set10('HAVE_UNSETENV', 1)
endif
if compiler.has_function('getuid', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_GETUID', 1)
endif
if compiler.has_function('geteuid', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_GETEUID', 1)
endif
if compiler.has_function('wcwidth', prefix : '#include <wchar.h>', args: '-D_XOPEN_SOURCE')
conf_data.set10('HAVE_WCWIDTH', 1)
endif
if compiler.has_function('fork', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_FORK', 1)
endif
if compiler.has_function('getpid', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_GETPID', 1)
endif
if compiler.has_function('setpgid', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_SETPGID', 1)
endif
if compiler.has_function('getpgid', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_GETPGID', 1)
endif
if compiler.has_function('setpgrp', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_SETPGRP', 1)
endif
if compiler.has_function('getpgrp', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_GETPGRP', 1)
endif
if compiler.has_function('raise', prefix : '#include <signal.h>')
conf_data.set10('HAVE_RAISE', 1)
endif
if compiler.has_function('kill', prefix : '#include <signal.h>')
conf_data.set10('HAVE_KILL', 1)
endif
if compiler.has_function('fpathconf', prefix : '#include <unistd.h>')
conf_data.set10('HAVE_FPATHCONF', 1)
endif
if compiler.has_function('poll', prefix : '#include <poll.h>')
conf_data.set10('HAVE_POLL', 1)
endif
if compiler.has_function('event_base_set', prefix: eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_BASE_SET', 1)
endif
if compiler.has_function('event_get_version', prefix: eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_GET_VERSION', 1)
endif
if compiler.has_function('event_get_method', prefix : eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_GET_METHD', 1)
endif
if compiler.has_function('event_base_free', prefix : eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_BASE_FREE', 1)
endif
if compiler.has_function('event_base_new', prefix : eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_BASE_NEW', 1)
endif
if compiler.has_function('event_reinit', prefix : eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_REINIT', 1)
endif
if compiler.has_function('event_base_get_method', prefix : eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_BASE_GET_METHOD', 1)
endif
if compiler.has_function('event_reinit', prefix : eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_REINIT', 1)
endif
if compiler.has_function('event_config_set_flag', prefix : eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_CONFIG_SET_FLAG', 1)
endif
if compiler.has_function('event_get_struct_event_size', prefix : eh, dependencies: eventdeps)
conf_data.set('HAVE_EVENT_GET_STRUCT_EVENT_SIZE', 1)
endif
if compiler.has_function('RAND_bytes', prefix: '#include <openssl/rand.h>', dependencies: ssldeps)
conf_data.set('HAVE_RAND_BYTES', 1)
endif
if compiler.has_function('ASN1_STRING_get0_data', prefix: '#include <openssl/asn1.h>', dependencies: ssldeps)
conf_data.set('HAVE_ASN1_STRING_GET0_DATA', 1)
endif
if compiler.has_function('nl_langinfo', prefix: '#include <langinfo.h>')
conf_data.set('HAVE_LANGINFO_CODESET', 1)
endif
if compiler.has_function('iconv', prefix: '#include <iconv.h>')
conf_data.set('HAVE_ICONV', 1)
endif
if compiler.has_function('alloca', prefix: '#include <alloca.h>')
conf_data.set('HAVE_ALLOCA', 1)
endif
if compiler.has_function('rb_errinfo', prefix: '#include <ruby.h>', dependencies: rubydeps)
conf_data.set('HAVE_RB_ERRINFO', 1)
endif
if compiler.has_function('gnutls_priority_set_direct', prefix: '#include <gnutls/gnutls.h>', dependencies: gnutlsdeps)
conf_data.set('HAVE_GNUTLS_PRIORITY_SET_DIRECT', 1)
endif
if compiler.has_function('gnutls_certificate_set_x509_system_trust', prefix: '#include <gnutls/gnutls.h>', dependencies: gnutlsdeps)
conf_data.set('HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST', 1)
endif
conf_data.set('ICONV_CONST', true)
sysconfdir = get_option('prefix') / get_option('sysconfdir')/'elinks'
conf_data.set('CONFDIR', sysconfdir)
conf_data.set('sysconfdir', sysconfdir)
conf_data.set('SOMETHING', '@SOMETHING@')
conf_data.set('api_srcdir', srcdir + '/src')
conf_data.set('LIBDIR', get_option('prefix') / 'lib')
conf_data.set('LOCALEDIR', get_option('prefix') / 'share/locale')
conf_data.set('HAVE_SA_STORAGE', true)
conf_data.set('SIZEOF_CHAR', compiler.sizeof('char'))
conf_data.set('SIZEOF_SHORT', compiler.sizeof('short'))
conf_data.set('SIZEOF_INT', compiler.sizeof('int'))
conf_data.set('SIZEOF_LONG', compiler.sizeof('long'))
conf_data.set('SIZEOF_LONG_LONG', compiler.sizeof('long long'))
conf_data.set('SIZEOF_OFF_T', compiler.sizeof('off_t'))
#AC_CHECK_FUNCS([cygwin_conv_to_full_win32_path])
#CONFIG_BITTORRENT', true)
#CONFIG_FINGER', false)
#CONFIG_FSP', false)
#CONFIG_FTP', true)
#CONFIG_GOPHER', true)
#CONFIG_NNTP', false)
#CONFIG_SMB', false)
#CONFIG_URI_REWRITE', true)
#CONFIG_CGI', true)
#CONFIG_GSSAPI', false)
#CONFIG_DATA', true)
#CONFIG_MOUSE', true)
#CONFIG_TERMINFO', false)
#CONFIG_SMALL', false)
#CONFIG_DEBUG', false)
#CONFIG_OWN_LIBC', false)
conf_data.set('CONFIG_GNUTLS_OPENSSL_COMPAT', false)
#CONFIG_OPENSSL', true)
#CONFIG_MARKS', true)
configure_file(input : 'config2.h.in',
output : 'config.h',
configuration : conf_data)
subdir('po')
subdir('src')
subdir('contrib')
subdir('doc')

63
meson_options.txt Normal file
View File

@ -0,0 +1,63 @@
option('largefile', type: 'boolean', value: true, description: 'support for large files')
option('bookmarks', type: 'boolean', value: true, description: 'bookmark support')
option('xbel', type: 'boolean', value: true, description: 'XBEL bookmark support (requires expat)')
option('sm-scripting', type: 'boolean', value: false, description: 'ECMAScript browser scripting (requires Spidermonkey)')
option('nls', type: 'boolean', value: true, description: 'Native Language Support')
option('cookies', type: 'boolean', value: true, description: 'cookie support')
option('formhist', type: 'boolean', value: true, description: 'form history support')
option('globhist', type: 'boolean', value: true, description: 'global history support')
option('mailcap', type: 'boolean', value: true, description: 'mailcap support')
option('mimetypes', type: 'boolean', value: true, description: 'mimetypes files support')
option('ipv6', type: 'boolean', value: true, description: 'IPv6 support')
option('bittorrent', type: 'boolean', value: true, description: 'BitTorrent protocol support')
option('data', type: 'boolean', value: true, description: 'data protocol support')
option('uri-rewrite', type: 'boolean', value: true, description: 'URI rewrite support')
option('cgi', type: 'boolean', value: false, description: 'local CGI support')
option('finger', type: 'boolean', value: false, description: 'finger protocol support')
option('fsp', type: 'boolean', value: true, description: 'FSP protocol support')
option('ftp', type: 'boolean', value: true, description: 'ftp protocol support')
option('gopher', type: 'boolean', value: false, description: 'gopher protocol support')
option('nntp', type: 'boolean', value: false, description: 'nntp protocol support')
option('smb', type: 'boolean', value: false, description: 'Samba protocol support')
option('mouse', type: 'boolean', value: true, description: 'mouse support')
option('sysmouse', type: 'boolean', value: false, description: 'BSD sysmouse support')
option('88-colors', type: 'boolean', value: false, description: '88 color support')
option('256-colors', type: 'boolean', value: false, description: '256 color support')
option('true-color', type: 'boolean', value: false, description: 'true color support')
option('exmode', type: 'boolean', value: false, description: 'exmode (CLI) interface')
option('leds', type: 'boolean', value: true, description: 'LEDs support')
option('marks', type: 'boolean', value: true, description: 'document marks support')
option('css', type: 'boolean', value: true, description: 'Cascading Style Sheet support')
option('html-highlight', type: 'boolean', value: false, description: 'HTML highlighting using DOM engine')
option('backtrace', type: 'boolean', value: true, description: 'backtrace support')
option('no-root', type: 'boolean', value: false, description: 'prevention of usage by root')
option('withdebug', type: 'boolean', value: false, description: 'leak debug and internal error checking')
option('fastmem', type: 'boolean', value: false, description: 'direct use of system allocation functions, not usable with debug enabled')
option('own-libc', type: 'boolean', value: false, description: 'force use of internal functions instead of those of system libc')
option('small', type: 'boolean', value: false, description: 'reduce binary size as far as possible (but see the bottom of doc/small.txt!)')
option('utf-8', type: 'boolean', value: true, description: 'UTF-8 support')
option('combining', type: 'boolean', value: false, description: 'support Unicode combining characters (experimental)')
option('xterm', type: 'boolean', value: false, description: 'how to invoke the X terminal emulator')
option('gpm', type: 'boolean', value: true, description: 'gpm (mouse) support')
option('terminfo', type: 'boolean', value: false, description: 'terminfo support')
option('zlib', type: 'boolean', value: true, description: 'zlib support')
option('bzlib', type: 'boolean', value: false, description: 'bzip2 support')
option('brotli', type: 'boolean', value: false, description: 'brotli support')
option('zstd', type: 'boolean', value: false, description: 'zstd support')
option('idn', type: 'boolean', value: true, description: 'international domain names support')
option('lzma', type: 'boolean', value: false, description: 'lzma encoding support')
option('gssapi', type: 'boolean', value: false, description: 'GSSAPI support')
option('spidermonkey', type: 'boolean', value: false, description: 'SpiderMonkey Mozilla JavaScript engine support')
option('guile', type: 'boolean', value: false, description: 'Guile support')
option('perl', type: 'boolean', value: false, description: 'Perl5 support')
option('python', type: 'boolean', value: false, description: 'Python3 support')
option('luapkg', type: 'string', value:'', description: 'Lua version')
option('tre', type: 'boolean', value: true, description: 'TRE regex search support')
option('ruby', type: 'boolean', value: false, description: 'Ruby support')
option('gnutls', type: 'boolean', value: false, description: 'GNUTLS SSL support')
option('openssl', type: 'boolean', value: true, description: 'OpenSSL support')
option('libev', type: 'boolean', value: false, description: 'compile with libev (libevent compatibility mode)')
option('libevent', type: 'boolean', value: false, description: 'compile with libevent. Note that libev has precedence')
option('x', type: 'boolean', value: false, description: 'use the X Window System')
option('libdom', type: 'boolean', value: false, description: 'libdom')

1
po/LINGUAS Normal file
View File

@ -0,0 +1 @@
af be bg ca cs da de el es et fi fr gl hr hu id is it ja lt nb nl pl pt_BR pt ro ru sk sr sv tr uk

631
po/POTFILES Normal file
View File

@ -0,0 +1,631 @@
src/bfu/button.c
src/bfu/button.h
src/bfu/checkbox.c
src/bfu/checkbox.h
src/bfu/common.h
src/bfu/dialog.c
src/bfu/dialog.h
src/bfu/group.c
src/bfu/group.h
src/bfu/hierbox.c
src/bfu/hierbox.h
src/bfu/hotkey.c
src/bfu/hotkey.h
src/bfu/inpfield.c
src/bfu/inpfield.h
src/bfu/inphist.c
src/bfu/inphist.h
src/bfu/leds.c
src/bfu/leds.h
src/bfu/listbox.c
src/bfu/listbox.h
src/bfu/listmenu.c
src/bfu/listmenu.h
src/bfu/menu.c
src/bfu/menu.h
src/bfu/msgbox.c
src/bfu/msgbox.h
src/bfu/style.c
src/bfu/style.h
src/bfu/text.c
src/bfu/text.h
src/bfu/widget.c
src/bfu/widget.h
src/bookmarks/backend/common.c
src/bookmarks/backend/common.h
src/bookmarks/backend/default.c
src/bookmarks/backend/default.h
src/bookmarks/backend/xbel.c
src/bookmarks/backend/xbel.h
src/bookmarks/bookmarks.c
src/bookmarks/bookmarks.h
src/bookmarks/dialogs.c
src/bookmarks/dialogs.h
src/cache/cache.c
src/cache/cache.h
src/cache/dialogs.c
src/cache/dialogs.h
src/config/actions-edit.inc
src/config/actions-main.inc
src/config/actions-menu.inc
src/config/cmdline.c
src/config/cmdline.h
src/config/conf.c
src/config/conf.h
src/config/dialogs.c
src/config/dialogs.h
src/config/domain.c
src/config/domain.h
src/config/home.c
src/config/home.h
src/config/kbdbind.c
src/config/kbdbind.h
src/config/options.c
src/config/options.h
src/config/options.inc
src/config/opttypes.c
src/config/opttypes.h
src/config/timer.c
src/config/timer.h
src/config/urlhist.c
src/config/urlhist.h
src/cookies/cookies-t.c
src/cookies/cookies.c
src/cookies/cookies.h
src/cookies/dialogs.c
src/cookies/dialogs.h
src/cookies/parser.c
src/cookies/parser.h
src/cookies/parsetst.c
src/cookies/path.c
src/cookies/path.h
src/dialogs/document.c
src/dialogs/document.h
src/dialogs/download.c
src/dialogs/download.h
src/dialogs/edit.c
src/dialogs/edit.h
src/dialogs/exmode.c
src/dialogs/exmode.h
src/dialogs/info.c
src/dialogs/info.h
src/dialogs/menu.c
src/dialogs/menu.h
src/dialogs/options.c
src/dialogs/options.h
src/dialogs/progress.c
src/dialogs/progress.h
src/dialogs/status.c
src/dialogs/status.h
src/document/css/apply.c
src/document/css/apply.h
src/document/css/css.c
src/document/css/css.h
src/document/css/parser.c
src/document/css/parser.h
src/document/css/property.c
src/document/css/property.h
src/document/css/scanner.c
src/document/css/scanner.h
src/document/css/stylesheet.c
src/document/css/stylesheet.h
src/document/css/value.c
src/document/css/value.h
src/document/docdata.c
src/document/docdata.h
src/document/document.c
src/document/document.h
src/document/dom/renderer.c
src/document/dom/renderer.h
src/document/dom/rss.c
src/document/dom/rss.h
src/document/dom/source.c
src/document/dom/source.h
src/document/dom/util.c
src/document/dom/util.h
src/document/format.c
src/document/format.h
src/document/forms.c
src/document/forms.h
src/document/html/frames.c
src/document/html/frames.h
src/document/html/internal.h
src/document/html/parse-meta-refresh.c
src/document/html/parse-meta-refresh.h
src/document/html/parser.c
src/document/html/parser.h
src/document/html/parser/forms.c
src/document/html/parser/forms.h
src/document/html/parser/general.c
src/document/html/parser/general.h
src/document/html/parser/link.c
src/document/html/parser/link.h
src/document/html/parser/parse.c
src/document/html/parser/parse.h
src/document/html/parser/stack.c
src/document/html/parser/stack.h
src/document/html/parser/table.c
src/document/html/parser/table.h
src/document/html/renderer.c
src/document/html/renderer.h
src/document/html/tables.c
src/document/html/tables.h
src/document/html/test/parse-meta-refresh-test.c
src/document/html/test/test-parse-meta-refresh
src/document/libdom/renderer.c
src/document/libdom/renderer.h
src/document/options.c
src/document/options.h
src/document/plain/renderer.c
src/document/plain/renderer.h
src/document/refresh.c
src/document/refresh.h
src/document/renderer.c
src/document/renderer.h
src/document/view.h
src/dom/code.h
src/dom/configuration.c
src/dom/configuration.h
src/dom/css/scanner.c
src/dom/css/scanner.h
src/dom/node.c
src/dom/node.h
src/dom/scanner.c
src/dom/scanner.h
src/dom/select.c
src/dom/select.h
src/dom/sgml/docbook/attribute.inc
src/dom/sgml/docbook/docbook.c
src/dom/sgml/docbook/docbook.h
src/dom/sgml/docbook/element.inc
src/dom/sgml/dump.c
src/dom/sgml/dump.h
src/dom/sgml/html/attribute.inc
src/dom/sgml/html/element.inc
src/dom/sgml/html/html.c
src/dom/sgml/html/html.h
src/dom/sgml/parser.c
src/dom/sgml/parser.h
src/dom/sgml/rss/attribute.inc
src/dom/sgml/rss/element.inc
src/dom/sgml/rss/rss.c
src/dom/sgml/rss/rss.h
src/dom/sgml/scanner.c
src/dom/sgml/scanner.h
src/dom/sgml/sgml.c
src/dom/sgml/sgml.h
src/dom/sgml/xbel/attribute.inc
src/dom/sgml/xbel/element.inc
src/dom/sgml/xbel/xbel.c
src/dom/sgml/xbel/xbel.h
src/dom/stack.c
src/dom/stack.h
src/dom/string.h
src/dom/test/dom-select.c
src/dom/test/html-mangle.c
src/dom/test/sgml-parser.c
src/dom/test/test-dom-configuration-basic
src/dom/test/test-sgml-dump-basic
src/dom/test/test-sgml-parser-basic
src/ecmascript/ecmascript.c
src/ecmascript/ecmascript.h
src/ecmascript/spidermonkey-shared.c
src/ecmascript/spidermonkey-shared.h
src/ecmascript/spidermonkey.c
src/ecmascript/spidermonkey.h
src/ecmascript/spidermonkey/document.c
src/ecmascript/spidermonkey/document.h
src/ecmascript/spidermonkey/form.c
src/ecmascript/spidermonkey/form.h
src/ecmascript/spidermonkey/heartbeat.c
src/ecmascript/spidermonkey/heartbeat.h
src/ecmascript/spidermonkey/location.c
src/ecmascript/spidermonkey/location.h
src/ecmascript/spidermonkey/navigator.c
src/ecmascript/spidermonkey/navigator.h
src/ecmascript/spidermonkey/unibar.c
src/ecmascript/spidermonkey/unibar.h
src/ecmascript/spidermonkey/util.h
src/ecmascript/spidermonkey/window.c
src/ecmascript/spidermonkey/window.h
src/elinks.h
src/encoding/brotli.c
src/encoding/brotli.h
src/encoding/bzip2.c
src/encoding/bzip2.h
src/encoding/deflate.c
src/encoding/deflate.h
src/encoding/encoding.c
src/encoding/encoding.h
src/encoding/lzma.c
src/encoding/lzma.h
src/encoding/zstd.c
src/encoding/zstd.h
src/formhist/dialogs.c
src/formhist/dialogs.h
src/formhist/formhist.c
src/formhist/formhist.h
src/globhist/dialogs.c
src/globhist/dialogs.h
src/globhist/globhist.c
src/globhist/globhist.h
src/intl/charsets.c
src/intl/charsets.h
src/intl/codepage.inc
src/intl/entity.inc
src/intl/gettext/bindtextdom.c
src/intl/gettext/dcgettext.c
src/intl/gettext/dcigettext.c
src/intl/gettext/dcngettext.c
src/intl/gettext/dgettext.c
src/intl/gettext/dngettext.c
src/intl/gettext/explodename.c
src/intl/gettext/finddomain.c
src/intl/gettext/gettext.c
src/intl/gettext/gettext.h
src/intl/gettext/gettextP.h
src/intl/gettext/hash-string.h
src/intl/gettext/intl-compat.c
src/intl/gettext/l10nflist.c
src/intl/gettext/libgettext.h
src/intl/gettext/libgnuintl.h
src/intl/gettext/libintl.c
src/intl/gettext/libintl.h
src/intl/gettext/loadinfo.h
src/intl/gettext/loadmsgcat.c
src/intl/gettext/localcharset.c
src/intl/gettext/localealias.c
src/intl/gettext/ngettext.c
src/intl/gettext/plural.c
src/intl/gettext/textdomain.c
src/intl/test/utf8-step-test.c
src/intl/uni_7b.inc
src/intl/width.c
src/main/event.c
src/main/event.h
src/main/interlink.c
src/main/interlink.h
src/main/main.c
src/main/main.h
src/main/module.c
src/main/module.h
src/main/object.h
src/main/select.c
src/main/select.h
src/main/timer.c
src/main/timer.h
src/main/version.c
src/main/version.h
src/mime/backend/common.c
src/mime/backend/common.h
src/mime/backend/default.c
src/mime/backend/default.h
src/mime/backend/mailcap.c
src/mime/backend/mailcap.h
src/mime/backend/mimetypes.c
src/mime/backend/mimetypes.h
src/mime/dialogs.c
src/mime/dialogs.h
src/mime/mime.c
src/mime/mime.h
src/network/connection.c
src/network/connection.h
src/network/dns.c
src/network/dns.h
src/network/progress.c
src/network/progress.h
src/network/socket.c
src/network/socket.h
src/network/ssl/match-hostname.c
src/network/ssl/match-hostname.h
src/network/ssl/socket.c
src/network/ssl/socket.h
src/network/ssl/ssl.c
src/network/ssl/ssl.h
src/network/ssl/test/match-hostname-test.c
src/network/state.c
src/network/state.h
src/osdep/ascii.h
src/osdep/beos/beos.c
src/osdep/beos/beos.h
src/osdep/beos/overrides.c
src/osdep/beos/overrides.h
src/osdep/beos/sysinfo.h
src/osdep/generic.h
src/osdep/getifaddrs.c
src/osdep/getifaddrs.h
src/osdep/newwin.c
src/osdep/newwin.h
src/osdep/os2/os2.c
src/osdep/os2/os2.h
src/osdep/os2/sysinfo.h
src/osdep/osdep.c
src/osdep/osdep.h
src/osdep/riscos/riscos.c
src/osdep/riscos/riscos.h
src/osdep/riscos/sysinfo.h
src/osdep/signals.c
src/osdep/signals.h
src/osdep/stat.h
src/osdep/stub.c
src/osdep/stub.h
src/osdep/sysname.c
src/osdep/sysname.h
src/osdep/system.h
src/osdep/types.h
src/osdep/unix/bsd.c
src/osdep/unix/sysinfo.h
src/osdep/unix/unix.c
src/osdep/unix/unix.h
src/osdep/win32/overrides.c
src/osdep/win32/overrides.h
src/osdep/win32/sysinfo.h
src/osdep/win32/vt100.c
src/osdep/win32/vt100.h
src/osdep/win32/win32.c
src/osdep/win32/win32.h
src/protocol/about.c
src/protocol/about.h
src/protocol/auth/auth.c
src/protocol/auth/auth.h
src/protocol/auth/dialogs.c
src/protocol/auth/dialogs.h
src/protocol/auth/digest.c
src/protocol/auth/digest.h
src/protocol/bittorrent/bencoding.c
src/protocol/bittorrent/bencoding.h
src/protocol/bittorrent/bittorrent.c
src/protocol/bittorrent/bittorrent.h
src/protocol/bittorrent/common.c
src/protocol/bittorrent/common.h
src/protocol/bittorrent/connection.c
src/protocol/bittorrent/connection.h
src/protocol/bittorrent/dialogs.c
src/protocol/bittorrent/dialogs.h
src/protocol/bittorrent/peerconnect.c
src/protocol/bittorrent/peerconnect.h
src/protocol/bittorrent/peerwire.c
src/protocol/bittorrent/peerwire.h
src/protocol/bittorrent/piececache.c
src/protocol/bittorrent/piececache.h
src/protocol/bittorrent/tracker.c
src/protocol/bittorrent/tracker.h
src/protocol/common.c
src/protocol/common.h
src/protocol/data.c
src/protocol/data.h
src/protocol/date.c
src/protocol/date.h
src/protocol/file/cgi.c
src/protocol/file/cgi.h
src/protocol/file/file.c
src/protocol/file/file.h
src/protocol/file/mailcap.c
src/protocol/file/mailcap.h
src/protocol/finger/finger.c
src/protocol/finger/finger.h
src/protocol/fsp/fsp.c
src/protocol/fsp/fsp.h
src/protocol/ftp/ftp-parser.c
src/protocol/ftp/ftp.c
src/protocol/ftp/ftp.h
src/protocol/ftp/parse.c
src/protocol/ftp/parse.h
src/protocol/gopher/gopher.c
src/protocol/gopher/gopher.h
src/protocol/header.c
src/protocol/header.h
src/protocol/http/blacklist.c
src/protocol/http/blacklist.h
src/protocol/http/codes.c
src/protocol/http/codes.h
src/protocol/http/http.c
src/protocol/http/http.h
src/protocol/http/http_negotiate.c
src/protocol/http/http_negotiate.h
src/protocol/http/post.c
src/protocol/http/post.h
src/protocol/nntp/codes.h
src/protocol/nntp/connection.c
src/protocol/nntp/connection.h
src/protocol/nntp/nntp.c
src/protocol/nntp/nntp.h
src/protocol/nntp/response.c
src/protocol/nntp/response.h
src/protocol/protocol.c
src/protocol/protocol.h
src/protocol/proxy.c
src/protocol/proxy.h
src/protocol/rewrite/rewrite.c
src/protocol/rewrite/rewrite.h
src/protocol/smb/smb.h
src/protocol/smb/smb2.c
src/protocol/test/stub.c
src/protocol/test/uri-test.c
src/protocol/uri.c
src/protocol/uri.h
src/protocol/user.c
src/protocol/user.h
src/scripting/guile/core.c
src/scripting/guile/core.h
src/scripting/guile/guile.c
src/scripting/guile/guile.h
src/scripting/guile/hooks.c
src/scripting/guile/hooks.h
src/scripting/lua/core.c
src/scripting/lua/core.h
src/scripting/lua/hooks.c
src/scripting/lua/hooks.h
src/scripting/lua/lua.c
src/scripting/lua/lua.h
src/scripting/perl/core.c
src/scripting/perl/core.h
src/scripting/perl/hooks.c
src/scripting/perl/hooks.h
src/scripting/perl/perl.c
src/scripting/perl/perl.h
src/scripting/python/core.c
src/scripting/python/core.h
src/scripting/python/dialogs.c
src/scripting/python/dialogs.h
src/scripting/python/document.c
src/scripting/python/document.h
src/scripting/python/hooks.c
src/scripting/python/hooks.h
src/scripting/python/keybinding.c
src/scripting/python/keybinding.h
src/scripting/python/load.c
src/scripting/python/load.h
src/scripting/python/menu.c
src/scripting/python/menu.h
src/scripting/python/open.c
src/scripting/python/open.h
src/scripting/python/python.c
src/scripting/python/python.h
src/scripting/ruby/core.c
src/scripting/ruby/core.h
src/scripting/ruby/hooks.c
src/scripting/ruby/hooks.h
src/scripting/ruby/ruby.c
src/scripting/ruby/ruby.h
src/scripting/scripting.c
src/scripting/scripting.h
src/scripting/smjs/action_object.c
src/scripting/smjs/action_object.h
src/scripting/smjs/bookmarks.c
src/scripting/smjs/bookmarks.h
src/scripting/smjs/cache_object.c
src/scripting/smjs/cache_object.h
src/scripting/smjs/core.c
src/scripting/smjs/core.h
src/scripting/smjs/elinks_object.c
src/scripting/smjs/elinks_object.h
src/scripting/smjs/global_object.c
src/scripting/smjs/global_object.h
src/scripting/smjs/globhist.c
src/scripting/smjs/globhist.h
src/scripting/smjs/hooks.c
src/scripting/smjs/hooks.h
src/scripting/smjs/keybinding.c
src/scripting/smjs/keybinding.h
src/scripting/smjs/load_uri.c
src/scripting/smjs/load_uri.h
src/scripting/smjs/session_object.c
src/scripting/smjs/session_object.h
src/scripting/smjs/smjs.c
src/scripting/smjs/smjs.h
src/scripting/smjs/terminal_object.c
src/scripting/smjs/terminal_object.h
src/scripting/smjs/view_state_object.c
src/scripting/smjs/view_state_object.h
src/session/download.c
src/session/download.h
src/session/history.c
src/session/history.h
src/session/location.c
src/session/location.h
src/session/session.c
src/session/session.h
src/session/task.c
src/session/task.h
src/setup.h
src/terminal/color.c
src/terminal/color.h
src/terminal/draw.c
src/terminal/draw.h
src/terminal/event.c
src/terminal/event.h
src/terminal/hardio.c
src/terminal/hardio.h
src/terminal/itrm.h
src/terminal/kbd.c
src/terminal/kbd.h
src/terminal/key.inc
src/terminal/mouse.c
src/terminal/mouse.h
src/terminal/palette.inc
src/terminal/screen.c
src/terminal/screen.h
src/terminal/tab.c
src/terminal/tab.h
src/terminal/terminal.c
src/terminal/terminal.h
src/terminal/terminfo.c
src/terminal/terminfo.h
src/terminal/window.c
src/terminal/window.h
src/util/align.h
src/util/base64.c
src/util/base64.h
src/util/bitfield.h
src/util/box.h
src/util/color.c
src/util/color.h
src/util/color.inc
src/util/color_s.inc
src/util/conv.c
src/util/conv.h
src/util/env.c
src/util/env.h
src/util/error.c
src/util/error.h
src/util/fastfind.c
src/util/fastfind.h
src/util/file.c
src/util/file.h
src/util/hash.c
src/util/hash.h
src/util/lists.h
src/util/math.h
src/util/md5.c
src/util/md5.h
src/util/memdebug.c
src/util/memdebug.h
src/util/memlist.c
src/util/memlist.h
src/util/memory.c
src/util/memory.h
src/util/profile.h
src/util/random.c
src/util/random.h
src/util/scanner.c
src/util/scanner.h
src/util/secsave.c
src/util/secsave.h
src/util/sha1.c
src/util/sha1.h
src/util/snprintf.c
src/util/snprintf.h
src/util/string.c
src/util/string.h
src/util/test.h
src/util/time.c
src/util/time.h
src/vernum.c
src/vernum.h
src/viewer/action.c
src/viewer/action.h
src/viewer/dump/dump-color-mode.h
src/viewer/dump/dump-specialized.h
src/viewer/dump/dump.c
src/viewer/dump/dump.h
src/viewer/text/draw.c
src/viewer/text/draw.h
src/viewer/text/form.c
src/viewer/text/form.h
src/viewer/text/link.c
src/viewer/text/link.h
src/viewer/text/marks.c
src/viewer/text/marks.h
src/viewer/text/search.c
src/viewer/text/search.h
src/viewer/text/textarea.c
src/viewer/text/textarea.h
src/viewer/text/view.c
src/viewer/text/view.h
src/viewer/text/vs.c
src/viewer/text/vs.h
src/viewer/timer.c
src/viewer/timer.h
src/viewer/viewer.c
src/viewer/viewer.h

1301
po/af.po

File diff suppressed because it is too large Load Diff

1322
po/be.po

File diff suppressed because it is too large Load Diff

1322
po/bg.po

File diff suppressed because it is too large Load Diff

1322
po/ca.po

File diff suppressed because it is too large Load Diff

1303
po/cs.po

File diff suppressed because it is too large Load Diff

1303
po/da.po

File diff suppressed because it is too large Load Diff

1303
po/de.po

File diff suppressed because it is too large Load Diff

1322
po/el.po

File diff suppressed because it is too large Load Diff

1322
po/es.po

File diff suppressed because it is too large Load Diff

1322
po/et.po

File diff suppressed because it is too large Load Diff

1307
po/fi.po

File diff suppressed because it is too large Load Diff

1305
po/fr.po

File diff suppressed because it is too large Load Diff

1322
po/gl.po

File diff suppressed because it is too large Load Diff

1322
po/hr.po

File diff suppressed because it is too large Load Diff

1303
po/hu.po

File diff suppressed because it is too large Load Diff

1322
po/id.po

File diff suppressed because it is too large Load Diff

1322
po/is.po

File diff suppressed because it is too large Load Diff

1309
po/it.po

File diff suppressed because it is too large Load Diff

1300
po/ja.po

File diff suppressed because it is too large Load Diff

1322
po/lt.po

File diff suppressed because it is too large Load Diff

8
po/meson.build Normal file
View File

@ -0,0 +1,8 @@
if conf_data.get('CONFIG_NLS')
i18n = import('i18n')
# define GETTEXT_PACKAGE
add_project_arguments('-DGETTEXT_PACKAGE="elinks"', language:'c')
i18n.gettext('elinks',
args: '--directory=' + meson.source_root()
)
endif

1322
po/nb.po

File diff suppressed because it is too large Load Diff

1322
po/nl.po

File diff suppressed because it is too large Load Diff

1313
po/pl.po

File diff suppressed because it is too large Load Diff

1322
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1322
po/ro.po

File diff suppressed because it is too large Load Diff

1322
po/ru.po

File diff suppressed because it is too large Load Diff

1309
po/sk.po

File diff suppressed because it is too large Load Diff

1303
po/sr.po

File diff suppressed because it is too large Load Diff

1322
po/sv.po

File diff suppressed because it is too large Load Diff

1322
po/tr.po

File diff suppressed because it is too large Load Diff

1343
po/uk.po

File diff suppressed because it is too large Load Diff

View File

@ -36,13 +36,13 @@
#ifdef DEBUG_BUTTON_HOTKEY
void
add_dlg_button_do(const unsigned char *file, int line,
struct dialog *dlg, unsigned char *text, int flags,
add_dlg_button_do(const char *file, int line,
struct dialog *dlg, char *text, int flags,
widget_handler_T *handler, void *data,
done_handler_T *done, void *done_data)
#else
void
add_dlg_button_do(struct dialog *dlg, unsigned char *text, int flags,
add_dlg_button_do(struct dialog *dlg, char *text, int flags,
widget_handler_T *handler, void *data,
done_handler_T *done, void *done_data)
#endif
@ -63,7 +63,7 @@ add_dlg_button_do(struct dialog *dlg, unsigned char *text, int flags,
widget->info.button.truetextlen = textlen;
if (textlen > 1) {
unsigned char *pos = memchr(text, '~', textlen - 1);
char *pos = memchr(text, '~', textlen - 1);
if (pos) {
widget->info.button.hotkey_pos = pos - text;
@ -217,7 +217,7 @@ display_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
draw_dlg_text(dlg_data, pos->x, pos->y, BUTTON_LEFT, BUTTON_LEFT_LEN, 0, color);
if (len > 0) {
unsigned char *text = widget_data->widget->text;
char *text = widget_data->widget->text;
int hk_pos = widget_data->widget->info.button.hotkey_pos;
int attr;

View File

@ -4,6 +4,10 @@
#include "bfu/common.h"
#include "util/align.h"
#ifdef __cplusplus
extern "C" {
#endif
struct dialog;
struct dialog_data;
struct terminal;
@ -32,7 +36,7 @@ struct widget_info_button {
/** @def add_dlg_ok_button
* Add a button that will close the dialog if pressed.
*
* void add_dlg_ok_button(struct dialog *dlg, unsigned char *text, int flags,
* void add_dlg_ok_button(struct dialog *dlg, char *text, int flags,
* ::done_handler_T *done, void *data);
*
* @param dlg
@ -57,7 +61,7 @@ struct widget_info_button {
/** @def add_dlg_button
* Add a button that need not close the dialog if pressed.
*
* void add_dlg_button(struct dialog *dlg, unsigned char *text, int flags,
* void add_dlg_button(struct dialog *dlg, char *text, int flags,
* ::widget_handler_T *handler, void *data);
*
* @param handler
@ -72,7 +76,7 @@ struct widget_info_button {
* The other parameters are as in ::add_dlg_ok_button. */
#ifdef DEBUG_BUTTON_HOTKEY
void add_dlg_button_do(const unsigned char *file, int line, struct dialog *dlg, unsigned char *text, int flags, widget_handler_T *handler, void *data, done_handler_T *done, void *done_data);
void add_dlg_button_do(const char *file, int line, struct dialog *dlg, char *text, int flags, widget_handler_T *handler, void *data, done_handler_T *done, void *done_data);
#define add_dlg_ok_button(dlg, text, flags, done, data) \
add_dlg_button_do(__FILE__, __LINE__, dlg, text, flags, ok_dialog, NULL, done, data)
@ -80,7 +84,7 @@ void add_dlg_button_do(const unsigned char *file, int line, struct dialog *dlg,
add_dlg_button_do(__FILE__, __LINE__, dlg, text, flags, handler, data, NULL, NULL)
#else
void add_dlg_button_do(struct dialog *dlg, unsigned char *text, int flags, widget_handler_T *handler, void *data, done_handler_T *done, void *done_data);
void add_dlg_button_do(struct dialog *dlg, char *text, int flags, widget_handler_T *handler, void *data, done_handler_T *done, void *done_data);
#define add_dlg_ok_button(dlg, text, flags, done, data) \
add_dlg_button_do(dlg, text, flags, ok_dialog, NULL, done, data)
@ -92,4 +96,8 @@ void add_dlg_button_do(struct dialog *dlg, unsigned char *text, int flags, widge
extern const struct widget_ops button_ops;
void dlg_format_buttons(struct dialog_data *, struct widget_data *, int, int, int *, int, int *, enum format_align, int);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,7 +21,7 @@
#define CHECKBOX_LS (CHECKBOX_LEN + CHECKBOX_SPACING) /* "[X] " */
void
add_dlg_radio_do(struct dialog *dlg, unsigned char *text,
add_dlg_radio_do(struct dialog *dlg, char *text,
int groupid, int groupnum, int *data)
{
struct widget *widget = &dlg->widgets[dlg->number_of_widgets++];
@ -42,7 +42,7 @@ dlg_format_checkbox(struct dialog_data *dlg_data,
enum format_align align, int format_only)
{
struct terminal *term = dlg_data->win->term;
unsigned char *text = widget_data->widget->text;
char *text = widget_data->widget->text;
set_box(&widget_data->box, x, *y, CHECKBOX_LEN, CHECKBOX_HEIGHT);
@ -63,7 +63,7 @@ display_checkbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
{
struct terminal *term = dlg_data->win->term;
struct color_pair *color;
unsigned char *text;
char *text;
struct el_box *pos = &widget_data->box;
int selected = is_selected_widget(dlg_data, widget_data);

View File

@ -1,6 +1,10 @@
#ifndef EL__BFU_CHECKBOX_H
#define EL__BFU_CHECKBOX_H
#ifdef __cplusplus
extern "C" {
#endif
struct dialog;
struct dialog_data;
struct terminal;
@ -20,7 +24,7 @@ struct widget_data_info_checkbox {
};
void add_dlg_radio_do(struct dialog *dlg, unsigned char *text, int groupid, int groupnum, int *data);
void add_dlg_radio_do(struct dialog *dlg, char *text, int groupid, int groupnum, int *data);
#define add_dlg_radio(dlg, text, groupid, groupnum, data) \
add_dlg_radio_do(dlg, text, groupid, groupnum, data)
@ -39,4 +43,8 @@ dlg_format_checkbox(struct dialog_data *dlg_data,
#define widget_has_group(widget_data) ((widget_data)->widget->type == WIDGET_CHECKBOX \
? (widget_data)->widget->info.checkbox.gid : -1)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,6 +1,10 @@
#ifndef EL__BFU_COMMON_H
#define EL__BFU_COMMON_H
#ifdef __cplusplus
extern "C" {
#endif
struct dialog_data;
struct widget_data;
@ -47,4 +51,8 @@ enum widget_type {
};
#ifdef __cplusplus
}
#endif
#endif /* EL__BFU_COMMON_H */

View File

@ -97,7 +97,7 @@ redraw_dialog(struct dialog_data *dlg_data, int layout)
title_color = get_bfu_color(term, "dialog.title");
if (title_color && dlg_data->real_box.width > 2) {
unsigned char *title = dlg_data->dlg->title;
char *title = dlg_data->dlg->title;
int titlelen = strlen(title);
int titlecells = titlelen;
int x, y;
@ -333,7 +333,7 @@ select_button_by_key(struct dialog_data *dlg_data)
foreach_widget(dlg_data, widget_data) {
int hk_pos;
unsigned char *hk_ptr;
char *hk_ptr;
term_event_char_T hk_char;
if (widget_data->widget->type != WIDGET_BUTTON)

View File

@ -8,6 +8,9 @@
#include "terminal/window.h" /* dialog_data->win->term is so common that... */
#include "util/memlist.h"
#ifdef __cplusplus
extern "C" {
#endif
struct dialog_data;
struct term_event;
@ -46,7 +49,7 @@ struct dialog_refresh {
};
struct dialog {
unsigned char *title;
char *title;
void *udata;
void *udata2;
struct dialog_refresh *refresh;
@ -120,7 +123,7 @@ struct dialog {
* @return
* The address of the additional data. */
#define get_dialog_offset(dlg, n) \
(((unsigned char *) dlg) + sizeof_dialog(n, 0))
(((char *) dlg) + sizeof_dialog(n, 0))
#define dialog_has_refresh(dlg_data) \
((dlg_data)->dlg->refresh && (dlg_data)->dlg->refresh->timer != TIMER_ID_UNDEF)
@ -222,4 +225,8 @@ struct widget_data *select_widget_by_id(struct dialog_data *dlg_data, int i);
assert(n == (dlg)->number_of_widgets); \
} while (0)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -36,7 +36,7 @@ dlg_format_group(struct dialog_data *dlg_data,
while (n--) {
int widget_width;
int width;
unsigned char *text = widget_data->widget->text;
char *text = widget_data->widget->text;
int label_length;
int label_padding;

View File

@ -1,6 +1,10 @@
#ifndef EL__BFU_GROUP_H
#define EL__BFU_GROUP_H
#ifdef __cplusplus
extern "C" {
#endif
struct dialog_data;
struct terminal;
struct widget_data;
@ -11,4 +15,8 @@ void dlg_format_group(struct dialog_data *dlg_data,
void group_layouter(struct dialog_data *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -413,7 +413,7 @@ push_hierbox_info_button(struct dialog_data *dlg_data, struct widget_data *butto
struct listbox_item *item = box->sel;
struct terminal *term = dlg_data->win->term;
struct listbox_context *context;
unsigned char *msg;
char *msg;
if (!item) return EVENT_PROCESSED;
@ -595,8 +595,8 @@ print_delete_error(struct listbox_item *item, struct terminal *term,
const struct listbox_ops *ops, enum delete_error err)
{
struct string msg;
unsigned char *errmsg;
unsigned char *text;
char *errmsg;
char *text;
switch (err) {
case DELETE_IMPOSSIBLE:
@ -631,7 +631,7 @@ print_delete_error(struct listbox_item *item, struct terminal *term,
mem_free(text);
if (item->type == BI_LEAF) {
unsigned char *info = ops->get_info(item, term);
char *info = ops->get_info(item, term);
if (info) {
add_format_to_string(&msg, "\n\n%s", info);
@ -722,7 +722,7 @@ query_delete_selected_item(void *context_)
struct listbox_data *box = oldcontext->box;
const struct listbox_ops *ops = box->ops;
struct listbox_item *item = box->sel;
unsigned char *text;
char *text;
enum delete_error delete_;
assert(item);
@ -754,7 +754,7 @@ query_delete_selected_item(void *context_)
MSG_BOX_BUTTON(N_("~Yes"), push_ok_delete_button, B_ENTER),
MSG_BOX_BUTTON(N_("~No"), done_listbox_context, B_ESC));
} else {
unsigned char *msg = ops->get_info(item, term);
char *msg = ops->get_info(item, term);
ops->lock(item);
@ -888,7 +888,7 @@ static int
scan_for_matches(struct listbox_item *item, void *info_, int *offset)
{
struct listbox_context *context = info_;
unsigned char *text = (unsigned char *) context->widget_data;
char *text = (char *) context->widget_data;
if (!*text) {
item->visible = 1;
@ -922,7 +922,7 @@ mark_visible(struct listbox_item *item, void *xxx, int *offset)
static void
search_hierbox_browser(void *data, unsigned char *text)
search_hierbox_browser(void *data, char *text)
{
struct dialog_data *dlg_data = data;
struct listbox_data *box = get_dlg_listbox_data(dlg_data);

View File

@ -5,13 +5,17 @@
#include "bfu/listbox.h"
#include "util/lists.h"
#ifdef __cplusplus
extern "C" {
#endif
struct session;
/** BFU hierbox browser button */
struct hierbox_browser_button {
/** The button label text
* It is automatically localized. */
unsigned char *label;
char *label;
/** The button handler
* The handler gets called when the button is activated */
@ -35,7 +39,7 @@ struct hierbox_browser_button {
struct hierbox_browser {
/** The title of the browser
* Note, it is automatically localized. */
unsigned char *title;
char *title;
/** Callback for (un)expansion of the listboxes
* Can be used by subsystems to install a handler to be called
@ -146,4 +150,8 @@ widget_handler_status_T push_hierbox_delete_button(struct dialog_data *dlg_data,
widget_handler_status_T push_hierbox_clear_button(struct dialog_data *dlg_data, struct widget_data *button);
widget_handler_status_T push_hierbox_search_button(struct dialog_data *dlg_data, struct widget_data *button);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -22,10 +22,10 @@
/* Return position (starting at 1) of the first tilde in text,
* or 0 if not found. */
static inline int
find_hotkey_pos(unsigned char *text)
find_hotkey_pos(char *text)
{
if (text && *text) {
unsigned char *p = strchr((const char *)text, '~');
char *p = strchr((const char *)text, '~');
if (p) return (int) (p - text) + 1;
}
@ -46,7 +46,7 @@ init_hotkeys(struct terminal *term, struct menu *menu)
memset(used_hotkeys, 0, sizeof(used_hotkeys));
foreach_menu_item(mi, menu->items) {
unsigned char *text = mi->text;
char *text = mi->text;
if (!mi_has_left_text(mi)) continue;
if (mi_text_translate(mi)) text = _(text, term);
@ -80,7 +80,7 @@ init_hotkeys(struct terminal *term, struct menu *menu)
mi->hotkey_state = HKS_IGNORE;
} else if (mi->hotkey_state != HKS_CACHED
&& !mi->hotkey_pos) {
unsigned char *text = mi->text;
char *text = mi->text;
if (!mi_has_left_text(mi)) continue;
if (mi_text_translate(mi)) text = _(text, term);
@ -142,7 +142,7 @@ check_hotkeys_common(struct menu *menu, term_event_char_T hotkey, struct termina
start = i;
do {
struct menu_item *item;
unsigned char *text;
char *text;
#ifdef CONFIG_UTF8
unicode_val_T items_hotkey;
#endif

View File

@ -5,10 +5,14 @@
#include "terminal/kbd.h"
#ifdef __cplusplus
extern "C" {
#endif
struct menu;
struct terminal;
/* int find_hotkey_pos(unsigned char *text); */
/* int find_hotkey_pos(char *text); */
void init_hotkeys(struct terminal *term, struct menu *menu);
#ifdef CONFIG_NLS
void clear_hotkeys_cache(struct menu *menu);
@ -18,4 +22,8 @@ void refresh_hotkeys(struct terminal *term, struct menu *menu);
int check_hotkeys(struct menu *menu, term_event_char_T hotkey, struct terminal *term);
int check_not_so_hot_keys(struct menu *menu, term_event_char_T key, struct terminal *term);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -38,7 +38,7 @@
#define INPUTFIELD_FLOAT_SEPARATOR_LEN 1
void
add_dlg_field_do(struct dialog *dlg, enum widget_type type, unsigned char *label,
add_dlg_field_do(struct dialog *dlg, enum widget_type type, char *label,
int min, int max, widget_handler_T *handler,
int datalen, void *data,
struct input_history *history, enum inpfield_flags flags)
@ -89,7 +89,7 @@ check_number(struct dialog_data *dlg_data, struct widget_data *widget_data)
widget_handler_status_T
check_nonempty(struct dialog_data *dlg_data, struct widget_data *widget_data)
{
unsigned char *p;
char *p;
for (p = widget_data->cdata; *p; p++)
if (*p > ' ')
@ -110,7 +110,7 @@ dlg_format_field(struct dialog_data *dlg_data,
struct terminal *term = dlg_data->win->term;
static int max_label_width;
static int *prev_y; /* Assert the uniqueness of y */ /* TODO: get rid of this !! --Zas */
unsigned char *label = widget_data->widget->text;
char *label = widget_data->widget->text;
struct color_pair *text_color = NULL;
int label_width = 0;
int float_label = widget_data->widget->info.field.flags & (INPFIELD_FLOAT|INPFIELD_FLOAT2);
@ -177,9 +177,9 @@ input_field_cancel(struct dialog_data *dlg_data, struct widget_data *widget_data
static widget_handler_status_T
input_field_ok(struct dialog_data *dlg_data, struct widget_data *widget_data)
{
void (*fn)(void *, unsigned char *) = widget_data->widget->data;
void (*fn)(void *, char *) = widget_data->widget->data;
void *data = dlg_data->dlg->udata2;
unsigned char *text = dlg_data->widgets_data->cdata;
char *text = dlg_data->widgets_data->cdata;
if (check_dialog(dlg_data)) return EVENT_NOT_PROCESSED;
@ -194,18 +194,18 @@ input_field_ok(struct dialog_data *dlg_data, struct widget_data *widget_data)
void
input_field(struct terminal *term, struct memory_list *ml, int intl,
unsigned char *title,
unsigned char *text,
unsigned char *okbutton,
unsigned char *cancelbutton,
char *title,
char *text,
char *okbutton,
char *cancelbutton,
void *data, struct input_history *history, int l,
unsigned char *def, int min, int max,
char *def, int min, int max,
widget_handler_T *check,
void (*fn)(void *, unsigned char *),
void (*fn)(void *, char *),
void (*cancelfn)(void *))
{
struct dialog *dlg;
unsigned char *field;
char *field;
if (intl) {
title = _(title, term);
@ -245,12 +245,12 @@ input_field(struct terminal *term, struct memory_list *ml, int intl,
void
input_dialog(struct terminal *term, struct memory_list *ml,
unsigned char *title,
unsigned char *text,
char *title,
char *text,
void *data, struct input_history *history, int l,
unsigned char *def, int min, int max,
char *def, int min, int max,
widget_handler_T *check,
void (*fn)(void *, unsigned char *),
void (*fn)(void *, char *),
void (*cancelfn)(void *))
{
/* [gettext_accelerator_context(input_dialog)] */
@ -273,7 +273,7 @@ display_field_do(struct dialog_data *dlg_data, struct widget_data *widget_data,
#ifdef CONFIG_UTF8
if (term->utf8_cp) {
unsigned char *t = widget_data->cdata;
char *t = widget_data->cdata;
int p = widget_data->info.field.cpos;
len = utf8_ptr2cells(t, &t[p]);
@ -295,7 +295,7 @@ display_field_do(struct dialog_data *dlg_data, struct widget_data *widget_data,
color = get_bfu_color(term, "dialog.field-text");
if (color) {
unsigned char *text = widget_data->cdata + widget_data->info.field.vpos;
char *text = widget_data->cdata + widget_data->info.field.vpos;
int len, w;
#ifdef CONFIG_UTF8
@ -476,8 +476,8 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
if (widget_data->info.field.cpos < strlen(widget_data->cdata)) {
#ifdef CONFIG_UTF8
if (term->utf8_cp) {
unsigned char *next = widget_data->cdata + widget_data->info.field.cpos;
unsigned char *end = strchr((const char *)next, '\0');
char *next = widget_data->cdata + widget_data->info.field.cpos;
char *end = strchr((const char *)next, '\0');
utf8_to_unicode(&next, end);
widget_data->info.field.cpos = (int)(next - widget_data->cdata);
@ -494,8 +494,8 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
widget_data->info.field.cpos--;
#ifdef CONFIG_UTF8
if (widget_data->info.field.cpos && term->utf8_cp) {
unsigned char *t = widget_data->cdata;
unsigned char *t2 = t;
char *t = widget_data->cdata;
char *t2 = t;
int p = widget_data->info.field.cpos;
unsigned char tmp = t[p];
@ -523,8 +523,8 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
/* FIXME: This isn't nice. We remove last byte
* from UTF-8 character to detect
* character before it. */
unsigned char *text = widget_data->cdata;
unsigned char *end = widget_data->cdata + widget_data->info.field.cpos - 1;
char *text = widget_data->cdata;
char *end = widget_data->cdata + widget_data->info.field.cpos - 1;
unicode_val_T data;
int old = widget_data->info.field.cpos;
@ -561,9 +561,9 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
#ifdef CONFIG_UTF8
if (term->utf8_cp) {
unsigned char *end = widget_data->cdata + cdata_len;
unsigned char *text = widget_data->cdata + widget_data->info.field.cpos;
unsigned char *old = text;
char *end = widget_data->cdata + cdata_len;
char *text = widget_data->cdata + widget_data->info.field.cpos;
char *old = text;
utf8_to_unicode(&text, end);
if (old != text) {
@ -642,7 +642,7 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
case ACT_EDIT_PASTE_CLIPBOARD:
{
/* Paste from clipboard */
unsigned char *clipboard = get_clipboard_text();
char *clipboard = get_clipboard_text();
if (!clipboard) goto display_field;
@ -679,14 +679,14 @@ kbd_field(struct dialog_data *dlg_data, struct widget_data *widget_data)
default:
if (check_kbd_textinput_key(ev)) {
unsigned char *text = widget_data->cdata;
char *text = widget_data->cdata;
int textlen = strlen(text);
#ifndef CONFIG_UTF8
/* Both get_kbd_key(ev) and @text
* are in the terminal's charset. */
const int inslen = 1;
#else /* CONFIG_UTF8 */
const unsigned char *ins;
const char *ins;
int inslen;
/* get_kbd_key(ev) is UCS-4, and @text
@ -874,11 +874,11 @@ cancel_input_line:
}
void
input_field_line(struct session *ses, unsigned char *prompt, void *data,
input_field_line(struct session *ses, char *prompt, void *data,
struct input_history *history, input_line_handler_T handler)
{
struct dialog *dlg;
unsigned char *buffer;
char *buffer;
struct input_line *input_line;
assert(ses);

View File

@ -6,6 +6,9 @@
#include "util/lists.h"
#include "util/align.h"
#ifdef __cplusplus
extern "C" {
#endif
struct dialog;
struct dialog_data;
@ -35,7 +38,7 @@ struct widget_data_info_field {
};
void
add_dlg_field_do(struct dialog *dlg, enum widget_type type, unsigned char *label,
add_dlg_field_do(struct dialog *dlg, enum widget_type type, char *label,
int min, int max, widget_handler_T *handler,
int data_len, void *data,
struct input_history *history, enum inpfield_flags flags);
@ -64,21 +67,21 @@ widget_handler_status_T check_nonempty(struct dialog_data *, struct widget_data
void dlg_format_field(struct dialog_data *, struct widget_data *, int, int *, int, int *, enum format_align, int format_only);
void input_field(struct terminal *, struct memory_list *, int, unsigned char *,
unsigned char *, unsigned char *, unsigned char *, void *,
struct input_history *, int, unsigned char *, int, int,
void input_field(struct terminal *, struct memory_list *, int, char *,
char *, char *, char *, void *,
struct input_history *, int, char *, int, int,
widget_handler_T *check,
void (*)(void *, unsigned char *),
void (*)(void *, char *),
void (*)(void *));
void
input_dialog(struct terminal *term, struct memory_list *ml,
unsigned char *title,
unsigned char *text,
char *title,
char *text,
void *data, struct input_history *history, int l,
unsigned char *def, int min, int max,
char *def, int min, int max,
widget_handler_T *check,
void (*fn)(void *, unsigned char *),
void (*fn)(void *, char *),
void (*cancelfn)(void *));
@ -102,11 +105,11 @@ struct input_line {
struct session *ses;
input_line_handler_T handler;
void *data;
unsigned char buffer[INPUT_LINE_BUFFER_SIZE];
char buffer[INPUT_LINE_BUFFER_SIZE];
};
void
input_field_line(struct session *ses, unsigned char *prompt, void *data,
input_field_line(struct session *ses, char *prompt, void *data,
struct input_history *history, input_line_handler_T handler);
#define widget_has_history(widget_data) ((widget_data)->widget->type == WIDGET_FIELD \
@ -115,4 +118,8 @@ input_field_line(struct session *ses, unsigned char *prompt, void *data,
#define widget_is_textfield(widget_data) ((widget_data)->widget->type == WIDGET_FIELD \
|| (widget_data)->widget->type == WIDGET_FIELD_PASS)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -24,7 +24,7 @@
static void
tab_compl_n(struct dialog_data *dlg_data, unsigned char *item, int len)
tab_compl_n(struct dialog_data *dlg_data, char *item, int len)
{
struct widget_data *widget_data = selected_widget(dlg_data);
@ -40,7 +40,7 @@ tab_compl_n(struct dialog_data *dlg_data, unsigned char *item, int len)
}
static void
tab_compl(struct dialog_data *dlg_data, unsigned char *item)
tab_compl(struct dialog_data *dlg_data, char *item)
{
tab_compl_n(dlg_data, item, strlen(item));
}
@ -49,7 +49,7 @@ tab_compl(struct dialog_data *dlg_data, unsigned char *item)
static void
menu_tab_compl(struct terminal *term, void *item_, void *dlg_data_)
{
unsigned char *item = item_;
char *item = item_;
struct dialog_data *dlg_data = dlg_data_;
tab_compl_n(dlg_data, item, strlen(item));
@ -90,9 +90,9 @@ do_tab_compl(struct dialog_data *dlg_data,
/* Return the length of the common substring from the starts
* of the two strings a and b. */
static inline int
strcommonlen(unsigned char *a, unsigned char *b)
strcommonlen(char *a, char *b)
{
unsigned char *start = a;
char *start = a;
while (*a && *a == *b)
++a, ++b;
@ -114,11 +114,11 @@ do_tab_compl_unambiguous(struct dialog_data *dlg_data,
/* Maximum number of characters in a match. Characters after this
* position are varying in other matches. */
int longest_common_match = 0;
unsigned char *match = NULL;
char *match = NULL;
struct input_history_entry *entry;
foreach (entry, *history) {
unsigned char *cur = entry->data;
char *cur = entry->data;
int cur_len = strcommonlen(cur, match ? match
: widget_data->cdata);
@ -160,7 +160,7 @@ set_complete_file_menu(struct terminal *term, void *filename_, void *dlg_data_)
{
struct dialog_data *dlg_data = dlg_data_;
struct widget_data *widget_data = selected_widget(dlg_data);
unsigned char *filename = filename_;
char *filename = filename_;
int filenamelen;
assert(widget_is_textfield(widget_data));
@ -182,7 +182,7 @@ static void
tab_complete_file_menu(struct terminal *term, void *path_, void *dlg_data_)
{
struct dialog_data *dlg_data = dlg_data_;
unsigned char *path = path_;
char *path = path_;
auto_complete_file(term, 0 /* no_elevator */, path,
set_complete_file_menu, tab_complete_file_menu,
@ -205,7 +205,7 @@ do_tab_compl_file(struct dialog_data *dlg_data,
/* Search for duplicate entries in history list, save first one and remove
* older ones. */
static struct input_history_entry *
check_duplicate_entries(struct input_history *history, unsigned char *data)
check_duplicate_entries(struct input_history *history, char *data)
{
struct input_history_entry *entry, *first_duplicate = NULL;
@ -237,7 +237,7 @@ check_duplicate_entries(struct input_history *history, unsigned char *data)
/* Add a new entry in inputbox history list, take care of duplicate if
* check_duplicate and respect history size limit. */
void
add_to_input_history(struct input_history *history, unsigned char *data,
add_to_input_history(struct input_history *history, char *data,
int check_duplicate)
{
struct input_history_entry *entry;
@ -284,16 +284,16 @@ add_to_input_history(struct input_history *history, unsigned char *data,
/* Load history file */
int
load_input_history(struct input_history *history, unsigned char *filename)
load_input_history(struct input_history *history, char *filename)
{
unsigned char *history_file = filename;
unsigned char line[MAX_STR_LEN];
char *history_file = filename;
char line[MAX_STR_LEN];
FILE *file;
if (get_cmd_opt_bool("anonymous")) return 0;
if (elinks_home) {
history_file = straconcat(elinks_home, filename,
(unsigned char *) NULL);
(char *) NULL);
if (!history_file) return 0;
}
@ -319,11 +319,11 @@ load_input_history(struct input_history *history, unsigned char *filename)
/* Write history list to file. It returns a value different from 0 in case of
* failure, 0 on success. */
int
save_input_history(struct input_history *history, unsigned char *filename)
save_input_history(struct input_history *history, char *filename)
{
struct input_history_entry *entry;
struct secure_save_info *ssi;
unsigned char *history_file;
char *history_file;
int i = 0;
if (!history->dirty
@ -332,7 +332,7 @@ save_input_history(struct input_history *history, unsigned char *filename)
return 0;
history_file = straconcat(elinks_home, filename,
(unsigned char *) NULL);
(char *) NULL);
if (!history_file) return -1;
ssi = secure_open(history_file);
@ -358,7 +358,7 @@ dlg_set_history(struct widget_data *widget_data)
assert(widget_data->widget->datalen > 0);
if ((void *) widget_data->info.field.cur_hist != &widget_data->info.field.history) {
unsigned char *s = widget_data->info.field.cur_hist->data;
char *s = widget_data->info.field.cur_hist->data;
widget_data->info.field.cpos = int_min(strlen(s), widget_data->widget->datalen - 1);
if (widget_data->info.field.cpos)

View File

@ -3,12 +3,16 @@
#include "util/lists.h"
#ifdef __cplusplus
extern "C" {
#endif
struct dialog_data;
struct input_history_entry {
LIST_HEAD(struct input_history_entry);
unsigned char data[1]; /* Must be last. */
char data[1]; /* Must be last. */
};
struct input_history {
@ -40,7 +44,7 @@ struct input_history {
if (!(history)->nosave) (history)->dirty = 1; \
} while (0)
void add_to_input_history(struct input_history *, unsigned char *, int);
void add_to_input_history(struct input_history *, char *, int);
void do_tab_compl(struct dialog_data *,
LIST_OF(struct input_history_entry) *);
@ -50,12 +54,16 @@ void do_tab_compl_unambiguous(struct dialog_data *,
LIST_OF(struct input_history_entry) *);
/* Load history file from elinks home. */
int load_input_history(struct input_history *history, unsigned char *filename);
int load_input_history(struct input_history *history, char *filename);
/* Write history list to @filebane in elinks home. It returns a value different
* from 0 in case of failure, 0 on success. */
int save_input_history(struct input_history *history, unsigned char *filename);
int save_input_history(struct input_history *history, char *filename);
void dlg_set_history(struct widget_data *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -10,9 +10,7 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include "elinks.h"
@ -165,7 +163,7 @@ init_led_panel(struct led_panel *leds)
static int
draw_timer(struct terminal *term, int xpos, int ypos, struct color_pair *color)
{
unsigned char s[64];
char s[64];
int i, length;
snprintf(s, sizeof(s), "[%d]", get_timer_duration());
@ -183,7 +181,7 @@ draw_show_ip(struct session *ses, int xpos, int ypos, struct color_pair *color)
if (ses->doc_view && ses->doc_view->document && ses->doc_view->document->ip) {
struct terminal *term = ses->tab->term;
unsigned char *s = ses->doc_view->document->ip;
char *s = ses->doc_view->document->ip;
int length = strlen(s);
int i;
@ -200,7 +198,7 @@ draw_show_ip(struct session *ses, int xpos, int ypos, struct color_pair *color)
static int
draw_clock(struct terminal *term, int xpos, int ypos, struct color_pair *color)
{
unsigned char s[64];
char s[64];
time_t curtime = time(NULL);
struct tm *loctime = localtime(&curtime);
int i, length;

View File

@ -6,6 +6,10 @@
#include "main/module.h"
#include "util/color.h"
#ifdef __cplusplus
extern "C" {
#endif
struct session;
struct terminal;
@ -50,4 +54,9 @@ unsigned char get_led_value(struct led *led);
void unset_led_value(struct led *led);
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -460,7 +460,7 @@ display_listbox_item(struct listbox_item *item, void *data_, int *offset)
data->box->ops->draw(item, data, x, y, width);
} else {
unsigned char *text;
char *text;
const struct listbox_ops *ops = data->box->ops;
int len_bytes;

View File

@ -4,6 +4,10 @@
#include "util/align.h"
#include "util/lists.h"
#ifdef __cplusplus
extern "C" {
#endif
struct dialog;
struct listbox_data;
struct listbox_item;
@ -45,18 +49,18 @@ struct listbox_context {
};
struct listbox_ops_messages {
unsigned char *cant_delete_item; /* %s = text of item */
unsigned char *cant_delete_used_item; /* %s = text of item */
unsigned char *cant_delete_folder; /* %s = text of item */
unsigned char *cant_delete_used_folder; /* %s = text of item */
unsigned char *delete_marked_items_title; /* not a format string */
unsigned char *delete_marked_items; /* not a format string */
unsigned char *delete_folder_title; /* not a format string */
unsigned char *delete_folder; /* %s = text of item */
unsigned char *delete_item_title; /* not a format string */
unsigned char *delete_item; /* %s = text of item */
unsigned char *clear_all_items_title; /* not a format string */
unsigned char *clear_all_items; /* not a format string */
char *cant_delete_item; /* %s = text of item */
char *cant_delete_used_item; /* %s = text of item */
char *cant_delete_folder; /* %s = text of item */
char *cant_delete_used_folder; /* %s = text of item */
char *delete_marked_items_title; /* not a format string */
char *delete_marked_items; /* not a format string */
char *delete_folder_title; /* not a format string */
char *delete_folder; /* %s = text of item */
char *delete_item_title; /* not a format string */
char *delete_item; /* %s = text of item */
char *clear_all_items_title; /* not a format string */
char *clear_all_items; /* not a format string */
};
/* TODO: We can maybe find a better way of figuring out whether a user of a
@ -68,8 +72,8 @@ struct listbox_ops {
void (*unlock)(struct listbox_item *);
int (*is_used)(struct listbox_item *);
unsigned char *(*get_text)(struct listbox_item *, struct terminal *);
unsigned char *(*get_info)(struct listbox_item *, struct terminal *);
char *(*get_text)(struct listbox_item *, struct terminal *);
char *(*get_info)(struct listbox_item *, struct terminal *);
struct uri *(*get_uri)(struct listbox_item *);
@ -77,7 +81,7 @@ struct listbox_ops {
/* Do a search on the item. */
enum listbox_match (*match)(struct listbox_item *, struct terminal *,
unsigned char *text);
char *text);
/* Before calling delete() thou shall call can_delete(). */
int (*can_delete)(struct listbox_item *);
@ -144,4 +148,8 @@ struct listbox_data *get_listbox_widget_data(struct widget_data *widget_data);
#define get_dlg_listbox_data(dlg_data) \
get_listbox_widget_data(dlg_data->widgets_data)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -57,7 +57,7 @@ do_select_submenu(struct terminal *term, void *menu_, void *ses_)
}
void
new_menu_item(struct list_menu *menu, unsigned char *name, int data, int fullname)
new_menu_item(struct list_menu *menu, char *name, int data, int fullname)
/* name == NULL - up; data == -1 - down */
{
struct menu_item *new_menu_item = NULL; /* no uninitialized warnings */
@ -169,15 +169,15 @@ destroy_menu(struct list_menu *menu)
}
void
menu_labels(struct menu_item *items, unsigned char *base, unsigned char **lbls)
menu_labels(struct menu_item *items, char *base, char **lbls)
{
struct menu_item *item;
unsigned char *bs;
char *bs;
foreach_menu_item (item, items) {
bs = (item->flags & MENU_FULLNAME) ? (unsigned char *) ""
bs = (item->flags & MENU_FULLNAME) ? (char *) ""
: base;
bs = straconcat(bs, item->text, (unsigned char *) NULL);
bs = straconcat(bs, item->text, (char *) NULL);
if (!bs) continue;
if (item->func == do_select_submenu) {
@ -193,7 +193,7 @@ menu_labels(struct menu_item *items, unsigned char *base, unsigned char **lbls)
void
add_select_item(struct list_menu *menu, struct string *string,
struct string *orig_string, unsigned char **value,
struct string *orig_string, char **value,
int order, int dont_add)
{
int pos = order - 1;

View File

@ -2,6 +2,10 @@
#ifndef EL__BFU_LISTMENU_H
#define EL__BFU_LISTMENU_H
#ifdef __cplusplus
extern "C" {
#endif
struct session;
struct string;
struct terminal;
@ -13,11 +17,15 @@ struct list_menu {
void init_menu(struct list_menu *menu);
void destroy_menu(struct list_menu *menu);
void add_select_item(struct list_menu *menu, struct string *string, struct string *orig_string, unsigned char **value, int order, int dont_add);
void new_menu_item(struct list_menu *menu, unsigned char *name, int data, int fullname);
void add_select_item(struct list_menu *menu, struct string *string, struct string *orig_string, char **value, int order, int dont_add);
void new_menu_item(struct list_menu *menu, char *name, int data, int fullname);
struct menu_item *detach_menu(struct list_menu *menu);
void menu_labels(struct menu_item *m, unsigned char *base, unsigned char **lbls);
void menu_labels(struct menu_item *m, char *base, char **lbls);
void do_select_submenu(struct terminal *term, void *menu_, void *ses_);
void free_menu(struct menu_item *m);
#ifdef __cplusplus
}
#endif
#endif /* EL__BFU_LISTMENU_H */

View File

@ -54,7 +54,7 @@
/* Types and structures */
/* Submenu indicator, displayed at right. */
static unsigned char m_submenu[] = ">>";
static char m_submenu[] = ">>";
static int m_submenu_len = sizeof(m_submenu) - 1;
/* Prototypes */
@ -190,7 +190,7 @@ select_menu(struct terminal *term, struct menu *menu)
static int
get_menuitem_text_width(struct terminal *term, struct menu_item *mi)
{
unsigned char *text;
char *text;
if (!mi_has_left_text(mi)) return 0;
@ -229,7 +229,7 @@ get_menuitem_rtext_width(struct terminal *term, struct menu_item *mi)
}
} else if (mi_has_right_text(mi)) {
unsigned char *rtext = mi->rtext;
char *rtext = mi->rtext;
if (mi_rtext_translate(mi))
rtext = _(rtext, term);
@ -371,7 +371,7 @@ set_menu_selection(struct menu *menu, int pos)
* separators). For double-width glyph width == 2.
* len - length of text in bytes */
static inline void
draw_menu_left_text(struct terminal *term, unsigned char *text, int len,
draw_menu_left_text(struct terminal *term, char *text, int len,
int x, int y, int width, struct color_pair *color)
{
int w = width - (L_TEXT_SPACE + R_TEXT_SPACE);
@ -398,7 +398,7 @@ draw_menu_left_text(struct terminal *term, unsigned char *text, int len,
static inline void
draw_menu_left_text_hk(struct terminal *term, unsigned char *text,
draw_menu_left_text_hk(struct terminal *term, char *text,
int hotkey_pos, int x, int y, int width,
struct color_pair *color, int selected)
{
@ -411,7 +411,7 @@ draw_menu_left_text_hk(struct terminal *term, unsigned char *text,
int w = width - (L_TEXT_SPACE + R_TEXT_SPACE);
int hk_state = 0;
#ifdef CONFIG_UTF8
unsigned char *text2, *end;
char *text2, *end;
#endif
#ifdef CONFIG_DEBUG
@ -521,7 +521,7 @@ utf8:
}
static inline void
draw_menu_right_text(struct terminal *term, unsigned char *text, int len,
draw_menu_right_text(struct terminal *term, char *text, int len,
int x, int y, int width, struct color_pair *color)
{
int w = width - (L_RTEXT_SPACE + R_RTEXT_SPACE);
@ -611,7 +611,7 @@ display_menu(struct terminal *term, struct menu *menu)
if (mi_has_left_text(mi)) {
int l = mi->hotkey_pos;
unsigned char *text = mi->text;
char *text = mi->text;
if (mi_text_translate(mi))
text = _(text, term);
@ -658,7 +658,7 @@ display_menu(struct terminal *term, struct menu *menu)
}
} else if (mi_has_right_text(mi)) {
unsigned char *rtext = mi->rtext;
char *rtext = mi->rtext;
if (mi_rtext_translate(mi))
rtext = _(rtext, term);
@ -781,10 +781,10 @@ menu_page_down(struct menu *menu)
#undef DIST
static inline int
search_menu_item(struct menu_item *item, unsigned char *buffer,
search_menu_item(struct menu_item *item, char *buffer,
struct terminal *term)
{
unsigned char *text, *match;
char *text, *match;
/* set_menu_selection asserts selectability. */
if (!mi_has_left_text(item) || !mi_is_selectable(item)) return 0;
@ -810,7 +810,7 @@ menu_search_handler(struct input_line *line, int action_id)
{
struct menu *menu = line->data;
struct terminal *term = menu->win->term;
unsigned char *buffer = line->buffer;
char *buffer = line->buffer;
struct window *win;
int pos = menu->selected;
int start;
@ -871,7 +871,7 @@ search_menu(struct menu *menu)
struct terminal *term = menu->win->term;
struct window *current_tab = get_current_tab(term);
struct session *ses = current_tab ? current_tab->data : NULL;
unsigned char *prompt = _("Search menu/", term);
char *prompt = _("Search menu/", term);
if (menu->size < 1 || !ses) return;
@ -1127,7 +1127,7 @@ display_mainmenu(struct terminal *term, struct menu *menu)
for (i = menu->first; i < menu->size; i++) {
struct menu_item *mi = &menu->items[i];
struct color_pair *color = normal_color;
unsigned char *text = mi->text;
char *text = mi->text;
int l = mi->hotkey_pos;
int textlen;
int selected = (i == menu->selected);
@ -1248,7 +1248,7 @@ mainmenu_mouse_handler(struct menu *menu, struct term_event *ev)
/* We don't initialize to menu->first here, since it breaks
* horizontal scrolling using mouse in some cases. --Zas */
foreach_menu_item (item, menu->items) {
unsigned char *text = item->text;
char *text = item->text;
if (!mi_has_left_text(item)) continue;
@ -1386,7 +1386,7 @@ new_menu(enum menu_item_flags flags)
}
void
add_to_menu(struct menu_item **mi, unsigned char *text, unsigned char *rtext,
add_to_menu(struct menu_item **mi, char *text, char *rtext,
enum main_action action_id, menu_func_T func, void *data,
enum menu_item_flags flags)
{

View File

@ -4,6 +4,10 @@
#include "config/kbdbind.h"
#include "util/box.h"
#ifdef __cplusplus
extern "C" {
#endif
struct terminal;
struct window;
@ -76,7 +80,7 @@ enum hotkey_state {
/* XXX: keep order of fields, there's some hard initializations for it. --Zas
*/
struct menu_item {
unsigned char *text; /* The item label */
char *text; /* The item label */
/* The following three members are tightly coupled:
*
@ -87,7 +91,7 @@ struct menu_item {
* - A few places however there is no associated keybinding and no
* ``default'' handler defined in which case @rtext (if non NULL)
* will be drawn and @func will be called when selecting the item. */
unsigned char *rtext; /* Right aligned guiding text */
char *rtext; /* Right aligned guiding text */
enum main_action action_id; /* Default item handlers */
menu_func_T func; /* Called when selecting the item */
@ -102,8 +106,8 @@ struct menu_item {
#define INIT_MENU_ITEM(text, rtext, action_id, func, data, flags) \
{ \
(unsigned char *) (text), \
(unsigned char *) (rtext), \
(char *) (text), \
(char *) (rtext), \
(action_id), \
(func), \
(void *) (data), \
@ -124,8 +128,8 @@ struct menu_item {
#define SET_MENU_ITEM(e_, text_, rtext_, action_id_, func_, data_, \
flags_, hotkey_state_, hotkey_pos_) \
do { \
(e_)->text = (unsigned char *) (text_); \
(e_)->rtext = (unsigned char *) (rtext_); \
(e_)->text = (char *) (text_); \
(e_)->rtext = (char *) (rtext_); \
(e_)->action_id = (action_id_); \
(e_)->func = (func_); \
(e_)->data = (void *) (data_); \
@ -161,7 +165,7 @@ struct menu {
struct menu_item *new_menu(enum menu_item_flags);
void
add_to_menu(struct menu_item **mi, unsigned char *text, unsigned char *rtext,
add_to_menu(struct menu_item **mi, char *text, char *rtext,
enum main_action action_id, menu_func_T func, void *data,
enum menu_item_flags flags);
@ -177,4 +181,8 @@ void do_menu_selected(struct terminal *, struct menu_item *, void *, int, int);
void do_mainmenu(struct terminal *, struct menu_item *, void *, int);
void deselect_mainmenu(struct terminal *term, struct menu *menu);
#ifdef __cplusplus
}
#endif
#endif

5
src/bfu/meson.build Normal file
View File

@ -0,0 +1,5 @@
srcs += files('button.c', 'checkbox.c', 'dialog.c', 'group.c', 'hierbox.c', 'hotkey.c', 'inpfield.c', 'inphist.c', 'listbox.c',
'listmenu.c', 'menu.c', 'msgbox.c', 'style.c', 'text.c', 'widget.c')
if conf_data.get('CONFIG_LEDS')
srcs += files('leds.c')
endif

View File

@ -23,8 +23,8 @@
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *ml, enum msgbox_flags flags,
unsigned char *title, enum format_align align,
unsigned char *text, void *udata, int buttons, ...)
char *title, enum format_align align,
char *text, void *udata, int buttons, ...)
{
struct dialog *dlg;
va_list ap;
@ -66,11 +66,11 @@ msg_box(struct terminal *term, struct memory_list *ml, enum msgbox_flags flags,
va_start(ap, buttons);
while (dlg->number_of_widgets < buttons + 1) {
unsigned char *label;
char *label;
done_handler_T *done;
int bflags;
label = va_arg(ap, unsigned char *);
label = va_arg(ap, char *);
done = va_arg(ap, done_handler_T *);
bflags = va_arg(ap, int);
@ -93,10 +93,10 @@ msg_box(struct terminal *term, struct memory_list *ml, enum msgbox_flags flags,
return do_dialog(term, dlg, ml);
}
static inline unsigned char *
msg_text_do(unsigned char *format, va_list ap)
static inline char *
msg_text_do(char *format, va_list ap)
{
unsigned char *info;
char *info;
int infolen, len;
va_list ap2;
@ -117,10 +117,10 @@ msg_text_do(unsigned char *format, va_list ap)
return info;
}
unsigned char *
msg_text(struct terminal *term, unsigned char *format, ...)
char *
msg_text(struct terminal *term, const char *format, ...)
{
unsigned char *info;
char *info;
va_list ap;
va_start(ap, format);
@ -142,9 +142,9 @@ abort_refreshed_msg_box_handler(struct dialog_data *dlg_data)
static enum dlg_refresh_code
refresh_msg_box(struct dialog_data *dlg_data, void *data)
{
unsigned char *(*get_info)(struct terminal *, void *) = data;
char *(*get_info)(struct terminal *, void *) = data;
void *msg_data = dlg_data->dlg->udata2;
unsigned char *info = get_info(dlg_data->win->term, msg_data);
char *info = get_info(dlg_data->win->term, msg_data);
if (!info) return REFRESH_CANCEL;
@ -156,13 +156,13 @@ refresh_msg_box(struct dialog_data *dlg_data, void *data)
void
refreshed_msg_box(struct terminal *term, enum msgbox_flags flags,
unsigned char *title, enum format_align align,
unsigned char *(get_info)(struct terminal *, void *),
char *title, enum format_align align,
char *(get_info)(struct terminal *, void *),
void *data)
{
/* [gettext_accelerator_context(refreshed_msg_box)] */
struct dialog_data *dlg_data;
unsigned char *info = get_info(term, data);
char *info = get_info(term, data);
if (!info) return;
@ -183,8 +183,8 @@ refreshed_msg_box(struct terminal *term, enum msgbox_flags flags,
struct dialog_data *
info_box(struct terminal *term, enum msgbox_flags flags,
unsigned char *title, enum format_align align,
unsigned char *text)
char *title, enum format_align align,
char *text)
{
/* [gettext_accelerator_context(info_box)] */
return msg_box(term, NULL, flags,

View File

@ -4,6 +4,10 @@
#include "util/align.h"
#include "util/memlist.h"
#ifdef __cplusplus
extern "C" {
#endif
struct terminal;
@ -90,8 +94,8 @@ enum msgbox_flags {
* ...no matter that it could fit on one line in case of a tiny message box. */
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *mem_list,
enum msgbox_flags flags, unsigned char *title, enum format_align align,
unsigned char *text, void *udata, int buttons, ...);
enum msgbox_flags flags, char *title, enum format_align align,
char *text, void *udata, int buttons, ...);
/* Cast @value to @type and warn if the conversion is suspicious.
* If @value has side effects, this does them only once.
@ -104,7 +108,7 @@ msg_box(struct terminal *term, struct memory_list *mem_list,
/* A button in the variadic arguments of msg_box().
* This macro expands into three arguments. */
#define MSG_BOX_BUTTON(label, handler, flags) \
MSG_BOX_CAST(const unsigned char *, label), \
MSG_BOX_CAST(const char *, label), \
MSG_BOX_CAST(done_handler_T *, handler), \
MSG_BOX_CAST(int, flags)
@ -117,21 +121,24 @@ msg_box(struct terminal *term, struct memory_list *mem_list,
* This one automagically localizes the format string. The possible
* additional parameters still need to be localized manually at the user's
* side. */
unsigned char *msg_text(struct terminal *term, unsigned char *format, ...);
char *msg_text(struct terminal *term, const char *format, ...);
/* A periodically refreshed message box with one OK button. The text in the
* message box is updated using the get_info() function. If get_info() returns
* NULL the message box is closed. */
void
refreshed_msg_box(struct terminal *term, enum msgbox_flags flags,
unsigned char *title, enum format_align align,
unsigned char *(get_info)(struct terminal *, void *),
char *title, enum format_align align,
char *(get_info)(struct terminal *, void *),
void *data);
struct dialog_data *
info_box(struct terminal *term, enum msgbox_flags flags,
unsigned char *title, enum format_align align,
unsigned char *text);
char *title, enum format_align align,
char *text);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,7 +28,7 @@ struct bfu_color_entry {
static struct hash *bfu_colors = NULL;
struct color_pair *
get_bfu_color(struct terminal *term, unsigned char *stylename)
get_bfu_color(struct terminal *term, char *stylename)
{
static enum color_mode last_color_mode;
struct bfu_color_entry *entry;

View File

@ -1,6 +1,10 @@
#ifndef EL__BFU_STYLE_H
#define EL__BFU_STYLE_H
#ifdef __cplusplus
extern "C" {
#endif
struct color_pair;
struct terminal;
@ -19,7 +23,7 @@ struct terminal;
* @return A color pair matching the stylename or NULL.
*/
struct color_pair *
get_bfu_color(struct terminal *term, unsigned char *stylename);
get_bfu_color(struct terminal *term, char *stylename);
/** Cleanup after the BFU style cache
*
@ -27,4 +31,8 @@ get_bfu_color(struct terminal *term, unsigned char *stylename);
*/
void done_bfu_colors(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -23,7 +23,7 @@
#define is_unsplitable(pos) (*(pos) && *(pos) != '\n' && !isspace(*(pos)))
void
add_dlg_text(struct dialog *dlg, unsigned char *text,
add_dlg_text(struct dialog *dlg, char *text,
enum format_align align, int bottom_pad)
{
struct widget *widget = &dlg->widgets[dlg->number_of_widgets++];
@ -38,26 +38,26 @@ add_dlg_text(struct dialog *dlg, unsigned char *text,
/* Returns length of substring (from start of @text) before a split. */
#ifdef CONFIG_UTF8
static inline int
split_line(unsigned char *text, int max_width, int *cells, int utf8)
split_line(char *text, int max_width, int *cells, int utf8)
#else
static inline int
split_line(unsigned char *text, int max_width, int *cells)
split_line(char *text, int max_width, int *cells)
#endif /* CONFIG_UTF8 */
{
unsigned char *split = text;
char *split = text;
#ifdef CONFIG_UTF8
unsigned char *text_end = split + strlen(split);
char *text_end = split + strlen(split);
#endif /* CONFIG_UTF8 */
int cells_save = *cells;
if (max_width <= 0) return 0;
while (*split && *split != '\n') {
unsigned char *next_split;
char *next_split;
#ifdef CONFIG_UTF8
if (utf8) {
unsigned char *next_char_begin = split
char *next_char_begin = split
+ utf8charlen(split);
next_split = split;
@ -153,15 +153,15 @@ split_line(unsigned char *text, int max_width, int *cells)
/* Find the start of each line with the current max width */
#ifdef CONFIG_UTF8
static unsigned char **
static char **
split_lines(struct widget_data *widget_data, int max_width, int utf8)
#else
static unsigned char **
static char **
split_lines(struct widget_data *widget_data, int max_width)
#endif /* CONFIG_UTF8 */
{
unsigned char *text = widget_data->widget->text;
unsigned char **lines = (unsigned char **) widget_data->cdata;
char *text = widget_data->widget->text;
char **lines = (char **) widget_data->cdata;
int line = 0;
if (widget_data->info.text.max_width == max_width) return lines;
@ -202,7 +202,7 @@ split_lines(struct widget_data *widget_data, int max_width)
/* Yes it might be a bit ugly on the other hand it will be autofreed
* for us. */
widget_data->cdata = (unsigned char *) lines;
widget_data->cdata = (char *) lines;
widget_data->info.text.lines = line;
widget_data->info.text.max_width = max_width;
@ -212,7 +212,7 @@ split_lines(struct widget_data *widget_data, int max_width)
/* Format text according to dialog box and alignment. */
void
dlg_format_text_do(struct dialog_data *dlg_data,
unsigned char *text,
char *text,
int x, int *y, int width, int *real_width,
struct color_pair *color, enum format_align align,
int format_only)
@ -270,9 +270,9 @@ dlg_format_text(struct dialog_data *dlg_data,
int format_only)
{
struct terminal *term = dlg_data->win->term;
unsigned char *text = widget_data->widget->text;
char *text = widget_data->widget->text;
unsigned char saved = 0;
unsigned char *saved_pos = NULL;
char *saved_pos = NULL;
int height;
height = int_max(0, max_height - 3);
@ -288,7 +288,7 @@ dlg_format_text(struct dialog_data *dlg_data,
&& (widget_data->info.text.max_width != width
|| height < widget_data->info.text.lines))
{
unsigned char **lines;
char **lines;
int current;
int visible;
@ -304,7 +304,7 @@ dlg_format_text(struct dialog_data *dlg_data,
return;
#endif
lines = (unsigned char **) widget_data->cdata;
lines = (char **) widget_data->cdata;
/* Make maximum number of lines available */
visible = int_max(widget_data->info.text.lines - height,

View File

@ -3,6 +3,10 @@
#include "util/color.h"
#ifdef __cplusplus
extern "C" {
#endif
struct dialog;
struct dialog_data;
struct terminal;
@ -42,12 +46,12 @@ struct widget_data_info_text {
#endif
};
void add_dlg_text(struct dialog *dlg, unsigned char *text,
void add_dlg_text(struct dialog *dlg, char *text,
enum format_align align, int bottom_pad);
extern const struct widget_ops text_ops;
void dlg_format_text_do(struct dialog_data *dlg_data,
unsigned char *text, int x, int *y, int w, int *rw,
char *text, int x, int *y, int w, int *rw,
struct color_pair *scolor, enum format_align align, int format_only);
void
@ -60,4 +64,8 @@ dlg_format_text(struct dialog_data *dlg_data, struct widget_data *widget_data,
&& (widget_data)->info.text.lines > 0 \
&& (widget_data)->box.height < (widget_data)->info.text.lines)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -16,6 +16,10 @@
#include "util/lists.h"
#include "util/box.h"
#ifdef __cplusplus
extern "C" {
#endif
struct dialog_data;
@ -32,7 +36,7 @@ struct widget_ops {
struct widget {
const struct widget_ops *ops;
unsigned char *text;
char *text;
widget_handler_T *handler;
@ -57,14 +61,14 @@ struct widget_data {
* and is assumed to be unibyte otherwise.) The UTF-8 I/O
* option has no effect here.
*
* For WIDGET_TEXT: @cdata is cast from/to an unsigned char **
* For WIDGET_TEXT: @cdata is cast from/to an char **
* that points to the first element of an array. Each element
* in this array corresponds to one line of text, and is an
* unsigned char * that points to the first character of that
* char * that points to the first character of that
* line. The array has @widget_data.info.text.lines elements.
*
* For WIDGET_LISTBOX: @cdata points to struct listbox_data. */
unsigned char *cdata;
char *cdata;
struct el_box box;
@ -87,5 +91,8 @@ widget_is_focusable(struct widget_data *widget_data)
}
}
#ifdef __cplusplus
}
#endif
#endif

View File

@ -47,7 +47,7 @@ bookmarks_read(void)
{
int backend_num = get_opt_int("bookmarks.file_format", NULL);
struct bookmarks_backend *backend = bookmarks_backends[backend_num];
unsigned char *file_name;
char *file_name;
FILE *f;
if (!backend
@ -58,7 +58,7 @@ bookmarks_read(void)
if (!file_name) return;
if (elinks_home) {
file_name = straconcat(elinks_home, file_name,
(unsigned char *) NULL);
(char *) NULL);
if (!file_name) return;
}
@ -79,7 +79,7 @@ bookmarks_write(LIST_OF(struct bookmark) *bookmarks_list)
int backend_num = get_opt_int("bookmarks.file_format", NULL);
struct bookmarks_backend *backend = bookmarks_backends[backend_num];
struct secure_save_info *ssi;
unsigned char *file_name;
char *file_name;
if (!bookmarks_are_dirty() && backend_num == loaded_backend_num) return;
if (!backend
@ -92,7 +92,7 @@ bookmarks_write(LIST_OF(struct bookmark) *bookmarks_list)
* they would be just truncated to zero by secure_open()). */
file_name = backend->filename(1);
if (!file_name) return;
file_name = straconcat(elinks_home, file_name, (unsigned char *) NULL);
file_name = straconcat(elinks_home, file_name, (char *) NULL);
if (!file_name) return;
ssi = secure_open(file_name);

View File

@ -6,9 +6,13 @@
#include "util/lists.h"
#include "util/secsave.h"
#ifdef __cplusplus
extern "C" {
#endif
struct bookmarks_backend {
/* Order matters here. --Zas. */
unsigned char *(*filename)(int);
char *(*filename)(int);
void (*read)(FILE *);
void (*write)(struct secure_save_info *, LIST_OF(struct bookmark) *);
};
@ -16,4 +20,8 @@ struct bookmarks_backend {
void bookmarks_read(void);
void bookmarks_write(LIST_OF(struct bookmark) *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -31,19 +31,19 @@ read_bookmarks_default(FILE *f)
* + 1 byte for end of line + 1 byte for null char + reserve */
#define INBUF_SIZE ((MAX_STR_LEN - 1) + 1 + (MAX_STR_LEN - 1) + 1 + 5 + 1 + 1 \
+ MAX_STR_LEN)
unsigned char in_buffer[INBUF_SIZE]; /* read buffer */
char in_buffer[INBUF_SIZE]; /* read buffer */
struct bookmark *last_bm = NULL;
int last_depth = 0;
const int file_cp = get_cp_index("System");
/* TODO: Ignore lines with bad chars in title or url (?). -- Zas */
while (fgets(in_buffer, INBUF_SIZE, f)) {
unsigned char *title = in_buffer;
unsigned char *url;
unsigned char *depth_str;
char *title = in_buffer;
char *url;
char *depth_str;
int depth = 0;
unsigned char *flags = NULL;
unsigned char *line_end;
char *flags = NULL;
char *line_end;
/* Load URL. */
@ -143,7 +143,7 @@ write_bookmarks_default_inner(const struct write_bookmarks_default *out,
struct bookmark *bm;
foreach (bm, *bookmarks_list) {
unsigned char *title, *url;
char *title, *url;
title = convert_string(out->conv_table, bm->title,
strlen(bm->title), out->codepage,
@ -189,7 +189,7 @@ write_bookmarks_default(struct secure_save_info *ssi,
write_bookmarks_default_inner(&out, bookmarks_list);
}
static unsigned char *
static char *
filename_bookmarks_default(int writing)
{
return BOOKMARKS_FILENAME;

View File

@ -4,6 +4,14 @@
#include "bookmarks/backend/common.h"
#ifdef __cplusplus
extern "C" {
#endif
extern struct bookmarks_backend default_bookmarks_backend;
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,5 @@
if conf_data.get('CONFIG_XBEL_BOOKMARKS')
srcs += files('xbel.c')
endif
srcs += files('common.c', 'default.c')

View File

@ -38,8 +38,8 @@
struct attributes {
LIST_HEAD(struct attributes);
unsigned char *name;
unsigned char *value;
char *name;
char *value;
};
/* Prototypes */
@ -50,9 +50,9 @@ static void on_text(void *data, const XML_Char *text, int len);
static struct tree_node *new_node(struct tree_node *parent);
static void free_node(struct tree_node *node);
static void free_xbeltree(struct tree_node *node);
static struct tree_node *get_child(struct tree_node *node, unsigned char *name);
static unsigned char *get_attribute_value(struct tree_node *node,
unsigned char *name);
static struct tree_node *get_child(struct tree_node *node, char *name);
static char *get_attribute_value(struct tree_node *node,
char *name);
struct read_bookmarks_xbel {
@ -60,7 +60,7 @@ struct read_bookmarks_xbel {
};
static void read_bookmarks_xbel(FILE *f);
static unsigned char * filename_bookmarks_xbel(int writing);
static char * filename_bookmarks_xbel(int writing);
static int xbeltree_to_bookmarks_list(const struct read_bookmarks_xbel *preload,
struct tree_node *root,
struct bookmark *current_parent);
@ -72,8 +72,8 @@ static void write_bookmarks_xbel(struct secure_save_info *ssi,
/* Element */
struct tree_node {
unsigned char *name; /* Name of the element */
unsigned char *text; /* Text inside the element */
char *name; /* Name of the element */
char *text; /* Text inside the element */
LIST_OF(struct attributes) attrs;
struct tree_node *parent;
struct tree_node *children;
@ -92,7 +92,7 @@ static int readok = 1;
static void
read_bookmarks_xbel(FILE *f)
{
unsigned char in_buffer[BUFSIZ];
char in_buffer[BUFSIZ];
XML_Parser p;
int done = 0;
int err = 0;
@ -165,7 +165,7 @@ write_bookmarks_xbel(struct secure_save_info *ssi,
secure_fputs(ssi, "\n</xbel>\n");
}
static unsigned char *
static char *
filename_bookmarks_xbel(int writing)
{
if (writing && !readok) return NULL;
@ -182,7 +182,7 @@ indentation(struct secure_save_info *ssi, int num)
}
static void
print_xml_entities(struct secure_save_info *ssi, const unsigned char *str)
print_xml_entities(struct secure_save_info *ssi, const char *str)
{
struct string entitized = NULL_STRING;
@ -268,7 +268,7 @@ on_element_open(void *data, const char *name, const char **attr)
current_node = node;
current_node->name = stracpy((unsigned char *) name);
current_node->name = stracpy((char *) name);
if (!current_node->name) {
mem_free(current_node);
return;
@ -276,8 +276,8 @@ on_element_open(void *data, const char *name, const char **attr)
for (; *attr; attr += 2) {
struct attributes *attribute = mem_calloc(1, sizeof(*attribute));
unsigned char *name = stracpy((unsigned char *) attr[0]);
unsigned char *value = stracpy((unsigned char *) attr[1]);
char *name = stracpy((char *) attr[0]);
char *value = stracpy((char *) attr[1]);
if (!attribute || !name || !value) {
mem_free_if(attribute);
@ -301,10 +301,10 @@ on_element_close(void *data, const char *name)
current_node = current_node->parent;
}
static unsigned char *
delete_whites(const unsigned char *s)
static char *
delete_whites(const char *s)
{
unsigned char *r;
char *r;
int last_was_space = 0, c = 0, i;
int len = strlen(s);
@ -376,7 +376,7 @@ xbeltree_to_bookmarks_list(const struct read_bookmarks_xbel *preload,
while (node) {
if (!strcmp(node->name, "bookmark")) {
unsigned char *href;
char *href;
title = get_child(node, "title");
href = get_attribute_value(node, "href");
@ -385,13 +385,13 @@ xbeltree_to_bookmarks_list(const struct read_bookmarks_xbel *preload,
tmp = add_bookmark(current_parent, 0,
/* The <title> element is optional */
title && title->text ? title->text
: (unsigned char *) gettext("No title"),
: (char *) gettext("No title"),
/* XXX: The href attribute isn't optional but
* we don't validate the source XML yet, so
* we can't always assume a non NULL value for
* get_attribute_value() */
href ? href
: (unsigned char *) gettext("No URL"));
: (char *) gettext("No URL"));
/* Out of memory */
if (!tmp) return 0;
@ -400,14 +400,14 @@ xbeltree_to_bookmarks_list(const struct read_bookmarks_xbel *preload,
lastbm = tmp;
} else if (!strcmp(node->name, "folder")) {
unsigned char *folded;
char *folded;
title = get_child(node, "title");
intl_set_charset_by_index(preload->utf8_cp);
tmp = add_bookmark(current_parent, 0,
title && title->text ? title->text
: (unsigned char *) gettext("No title"),
: (char *) gettext("No title"),
NULL);
/* Out of memory */
@ -471,7 +471,7 @@ free_xbeltree(struct tree_node *node)
}
static struct tree_node *
get_child(struct tree_node *node, unsigned char *name)
get_child(struct tree_node *node, char *name)
{
struct tree_node *ret;
@ -489,8 +489,8 @@ get_child(struct tree_node *node, unsigned char *name)
return NULL;
}
static unsigned char *
get_attribute_value(struct tree_node *node, unsigned char *name)
static char *
get_attribute_value(struct tree_node *node, char *name)
{
struct attributes *attribute;

Some files were not shown because too many files have changed in this diff Show More