From 7ccfb607bb8ee3aa0532d78f9a60f6f2d036eb44 Mon Sep 17 00:00:00 2001 From: goyalyashpal Date: Thu, 13 Apr 2023 19:32:21 +0530 Subject: [PATCH 01/15] Remove redundant README --- README | 77 ---------------------------------------------------- README.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 78 insertions(+), 79 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 8e240deb..00000000 --- a/README +++ /dev/null @@ -1,77 +0,0 @@ -ELinks - an advanced web browser -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -ELinks is an advanced and well-established feature-rich text mode web -(HTTP/FTP/..) browser. ELinks can render both frames and tables, is highly -customizable and can be extended via scripts. It is very portable and runs -on a variety of platforms. - -The ELinks official website is available at - - http://elinks.cz/ - -Please see the SITES file for mirrors or other recommended sites. If you -want to install ELinks on your computer, see the INSTALL file for further -instructions. - -A good starting point is documentation files available in doc/, especially the -file index.txt. - -If you want to request features or report bugs, see community information at -http://elinks.cz/community.html and feedback information available at -http://elinks.cz/feedback.html. - -If you want to write some patches, please first read the doc/hacking.txt -document. - -If you want to add a new language or update the translation for an existing -one, please read po/README document. - -If you want to write some documentation, well, you're welcome! ;) - - - -Historical notes -~~~~~~~~~~~~~~~~ - -Initially, ELinks was a development version of Links (Lynx-like text WWW -browser), with more liberal features policy and development style. Its purpose -was to provide an alternative to Links, and to test and tune various new -features, but still provide good rock-solid releases inside stable branches. - -Why not contribute to Links instead? Well, first I made a bunch of patches for -the original Links, but Mikulas wasn't around to integrate them, so I started -releasing my fork. When he came back, a significant number of them got refused -because Mikulas did not like them as he just wouldn't have any use for them -himself. He aims to keep Links at a relatively closed feature set and merge -only new features which he himself needs. It has the advantage that the tree is -very narrow and the code is small and contains very little bloat. - -ELinks, on the contrary, aims to provide a full-featured web browser, superior -to both lynx and w3m and with the power (but not slowness and memory usage) of -Mozilla, Konqueror and similar browsers. However, to prevent drastic bloating -of the code, the development is driven in the course of modularization and -separation of add-on modules (like cookies, bookmarks, ssl, scripting etc). - -For more details about ELinks history, please see - - http://elinks.cz/history.html - -If you are more interested in the history and various Links clones and versions, -you can examine the website at - - http://links.sf.net/ - -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/elinks.git - - -vim: textwidth=80 diff --git a/README.md b/README.md index 73161337..95e8a5f1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,78 @@ -# felinks -Fork of elinks +# ELinks - an advanced web browser +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +ELinks is an advanced and well-established feature-rich text mode web +(HTTP/FTP/..) browser. ELinks can render both frames and tables, is highly +customizable and can be extended via scripts. It is very portable and runs +on a variety of platforms. + +The ELinks official website is available at + + http://elinks.cz/ + +Please see the SITES file for mirrors or other recommended sites. If you +want to install ELinks on your computer, see the INSTALL file for further +instructions. + +A good starting point is documentation files available in doc/, especially the +file index.txt. + +If you want to request features or report bugs, see community information at +http://elinks.cz/community.html and feedback information available at +http://elinks.cz/feedback.html. + +If you want to write some patches, please first read the doc/hacking.txt +document. + +If you want to add a new language or update the translation for an existing +one, please read po/README document. + +If you want to write some documentation, well, you're welcome! ;) + + + +Historical notes +~~~~~~~~~~~~~~~~ + +Initially, ELinks was a development version of Links (Lynx-like text WWW +browser), with more liberal features policy and development style. Its purpose +was to provide an alternative to Links, and to test and tune various new +features, but still provide good rock-solid releases inside stable branches. + +Why not contribute to Links instead? Well, first I made a bunch of patches for +the original Links, but Mikulas wasn't around to integrate them, so I started +releasing my fork. When he came back, a significant number of them got refused +because Mikulas did not like them as he just wouldn't have any use for them +himself. He aims to keep Links at a relatively closed feature set and merge +only new features which he himself needs. It has the advantage that the tree is +very narrow and the code is small and contains very little bloat. + +ELinks, on the contrary, aims to provide a full-featured web browser, superior +to both lynx and w3m and with the power (but not slowness and memory usage) of +Mozilla, Konqueror and similar browsers. However, to prevent drastic bloating +of the code, the development is driven in the course of modularization and +separation of add-on modules (like cookies, bookmarks, ssl, scripting etc). + +For more details about ELinks history, please see + + http://elinks.cz/history.html + +If you are more interested in the history and various Links clones and versions, +you can examine the website at + + http://links.sf.net/ + +Old ELinks team lost interest in ELinks development somehow. felinks (fork of +elinks) 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/elinks.git + + +vim: textwidth=80 From 552917701c39684a4486dc1546bb7b7cbac213e5 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 22 Apr 2023 10:28:40 +0200 Subject: [PATCH 02/15] [meson] Check for git availability. Refs #47 --- meson.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 44f229dc..b22adaff 100644 --- a/meson.build +++ b/meson.build @@ -3,8 +3,15 @@ srcs=[] srcdir = meson.source_root() -txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD', check:false).stdout().strip() -dirty = run_command(srcdir + '/git-dirty.sh', check:false).stdout().strip() +git = find_program('git', required: false) + +if git.found() + txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD', check:false).stdout().strip() + dirty = run_command(srcdir + '/git-dirty.sh', check:false).stdout().strip() +else + txt = '' + dirty = '' +endif add_global_arguments('-DBUILD_ID="' + txt + dirty + '"', language : 'c') conf_data = configuration_data() From dd4557e98386d82709c1c9116a11cfd8ba48920a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=A3=D8=AD=D9=85=D8=AF=20=D8=A7=D9=84=D9=85=D8=AD=D9=85?= =?UTF-8?q?=D9=88=D8=AF=D9=8A=20=28Ahmed=20El-Mahmoudy=29?= Date: Sun, 23 Apr 2023 06:59:03 +0200 Subject: [PATCH 03/15] Install txt, pdf, html docs in $prefix/share/doc/elinks --- doc/meson.build | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/meson.build b/doc/meson.build index 79d76875..af4d87d3 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -15,16 +15,21 @@ if conf_data.get('CONFIG_REPRODUCIBLE') else asciidoc_env = [] endif +doc_dir = get_option('prefix') / 'share/doc/elinks' if pod2html.found() perl_html = custom_target('perl.html', input: ['perl.pod'], output: ['perl.html'], + install: true, + install_dir: doc_dir, command: [pod2html, '--outfile=@OUTPUT@', '--infile=@INPUT@']) perl_hooks_html = custom_target('perl-hooks.html', input: ['../contrib/perl/hooks.pl'], output: ['perl-hooks.html'], + install: true, + install_dir: doc_dir, command: [pod2html, '--outfile=@OUTPUT@', '--infile=@INPUT@']) endif @@ -32,6 +37,8 @@ features_txt = custom_target('features.txt', input: ['../features.conf'], output: 'features.txt', capture: true, + install: true, + install_dir: doc_dir, command: [meson.current_source_dir() + '/tools/conf2doc', '@INPUT@']) keymap_actions_txt = custom_target('keymap-actions.txt', @@ -44,6 +51,8 @@ keymap_defaults_txt = custom_target('keymap-defaults.txt', input: ['../src/config/kbdbind.c'], output: 'keymap-defaults.txt', capture: true, + install: true, + install_dir: doc_dir, command: [meson.current_source_dir() + '/tools/keys2doc', '@INPUT@', 'keymap-defaults.txt']) option_command_frag_xml = custom_target('option-command.frag.xml', @@ -62,6 +71,8 @@ option_command_frag_xhtml = custom_target('option-command.frag.xhtml', input: [], output: 'option-command.frag.xhtml', env: ['LC_ALL=C', 'LANGUAGE=en'], + install: true, + install_dir: doc_dir, command: [meson.current_source_dir() + '/tools/help2xml', elinks, '@OUTPUT@']) option_config_frag_xhtml = custom_target('option-config.frag.xhtml', @@ -75,6 +86,8 @@ elinks_1_html = custom_target('elinks.1.html', output: 'elinks.1.html', depends: option_command_frag_xhtml, env: asciidoc_env, + install: true, + install_dir: doc_dir, command: [meson.current_source_dir() + '/tools/asciidoc/asciidoc.py', '--no-conf', '-f', meson.current_source_dir() + '/tools/asciidoc/asciidoc.conf', '-f', meson.current_source_dir() + '/tools/asciidoc/xhtml11.conf', @@ -103,6 +116,8 @@ elinkskeys_5_html = custom_target('elinkskeys.5.html', output: 'elinkskeys.5.html', depends: [keymap_actions_txt, keymap_defaults_txt], env: asciidoc_env, + install: true, + install_dir: doc_dir, command: [meson.current_source_dir() + '/tools/asciidoc/asciidoc.py', '--no-conf', '-f', meson.current_source_dir() + '/tools/asciidoc/asciidoc.conf', '-f', meson.current_source_dir() + '/tools/asciidoc/xhtml11.conf', @@ -130,6 +145,8 @@ manual_html = custom_target('manual.html', output: 'manual.html', depends: features_txt, env: asciidoc_env, + install: true, + install_dir: doc_dir, command: [meson.current_source_dir() + '/tools/asciidoc/asciidoc.py', '--no-conf', '-f', meson.current_source_dir() + '/tools/asciidoc/asciidoc.conf', '-f', meson.current_source_dir() + '/tools/asciidoc/xhtml11.conf', @@ -248,6 +265,8 @@ if xmlto.found() input: [], output: 'manual.html-chunked', depends: manual_xml, + install: true, + install_dir: doc_dir, command: [xmlto, '-o', meson.current_build_dir() + '/manual.html-chunked', 'html', meson.current_build_dir()+'/manual.xml']) endif @@ -258,6 +277,8 @@ if dblatex.found() input: [], output: 'manual.pdf', depends: manual_xml, + install: true, + install_dir: doc_dir, command: [dblatex, meson.current_build_dir() + '/manual.xml']) endif @@ -267,6 +288,8 @@ if doxygen.found() input: [], output: 'api', env: ['OUTPUT_DIRECTORY='+meson.current_build_dir()+'/'], + install: true, + install_dir: doc_dir, command: [doxygen, meson.current_build_dir()+'/Doxyfile']) endif From e890b0758491d84868130be14e0d3b8b08cd3c12 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 23 Apr 2023 13:37:36 +0200 Subject: [PATCH 04/15] [meson] Added docdir option. Refs #224 By default docdir is $prefix/share/doc/elinks --- doc/meson.build | 7 ++++++- meson_options.txt | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/meson.build b/doc/meson.build index af4d87d3..12570e70 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -15,7 +15,12 @@ if conf_data.get('CONFIG_REPRODUCIBLE') else asciidoc_env = [] endif -doc_dir = get_option('prefix') / 'share/doc/elinks' + +doc_dir = get_option('docdir') + +if doc_dir == '' + doc_dir = get_option('prefix') / 'share/doc/elinks' +endif if pod2html.found() perl_html = custom_target('perl.html', diff --git a/meson_options.txt b/meson_options.txt index 3e410630..db10d2a7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -73,3 +73,4 @@ option('dgi', type: 'boolean', value: false, description: 'DOS Gateway Interface option('mujs', type: 'boolean', value: false, description: 'use mujs library') option('codepoint', type: 'boolean', value: true, description: 'whether check codepoints on Linux console') option('test', type: 'boolean', value: false, description: 'whether build test programs') +option('docdir', type: 'string', value: '', description: 'Documentation installation directory. Default $prefix/share/doc/elinks.') From 4a3fa85ee7ad7428349421b2bace9b9a2aa7928d Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 23 Apr 2023 15:00:05 +0200 Subject: [PATCH 05/15] [link] Convert href for anchor to terminal codepage, usually utf-8. Refs #221 --- src/document/html/parser/link.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/document/html/parser/link.c b/src/document/html/parser/link.c index 6e0051ce..fbce1578 100644 --- a/src/document/html/parser/link.c +++ b/src/document/html/parser/link.c @@ -54,13 +54,17 @@ html_a(struct html_context *html_context, char *a, char *href; href = get_url_val(a, "href", html_context->doc_cp); + if (href) { char *target; + char *href_converted = convert_string(renderer_context.convert_table, href, strlen(href), + html_context->options->cp, CSM_NONE, NULL, NULL, NULL); - mem_free_set(&elformat.link, - join_urls(html_context->base_href, - trim_chars(href, ' ', 0))); - + if (href_converted) { + mem_free_set(&elformat.link, + join_urls(html_context->base_href, trim_chars(href_converted, ' ', 0))); + mem_free(href_converted); + } mem_free(href); target = get_target(html_context->options, a); From 7a665d8de49236bf946efb25277bcd3612fc6242 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 23 Apr 2023 15:05:58 +0200 Subject: [PATCH 06/15] [uri] Introduced function encode_uri_string_percent. Refs #221 This function is similar to encode_uri_string, but does not encode percents. --- src/protocol/http/http.c | 21 ++++++++++++++++----- src/protocol/uri.c | 23 +++++++++++++++++++++++ src/protocol/uri.h | 2 ++ 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index 9f42b21a..7461c736 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -350,10 +350,22 @@ add_url_to_http_string(struct string *header, struct uri *uri, uri_component_T c * before. We should probably encode all URLs as early as * possible, and possibly decode them back in protocol * backends. --pasky */ - char *string = get_uri_string(uri, components); - char *data = string; + struct string encoded; + char *string; + char *data; - if (!string) return; + if (!init_string(&encoded)) { + return; + } + string = get_uri_string(uri, components); + + if (!string) { + done_string(&encoded); + return; + } + encode_uri_string_percent(&encoded, string, -1); + mem_free(string); + data = encoded.source; while (*data) { int len = strcspn(data, " \t\r\n\\"); @@ -369,8 +381,7 @@ add_url_to_http_string(struct string *header, struct uri *uri, uri_component_T c data += len; } - - mem_free(string); + done_string(&encoded); } /* Parse from @end - 1 to @start and set *@value to integer found. diff --git a/src/protocol/uri.c b/src/protocol/uri.c index 90d9df14..1e9c08c6 100644 --- a/src/protocol/uri.c +++ b/src/protocol/uri.c @@ -1422,6 +1422,29 @@ encode_uri_string(struct string *string, const char *name, int namelen, } } +void +encode_uri_string_percent(struct string *string, const char *name, int namelen) +{ + char n[4]; + const char *end; + + n[0] = '%'; + n[3] = '\0'; + + if (namelen < 0) namelen = strlen(name); + + for (end = name + namelen; name < end; name++) { + if (safe_char(*name) || (*name == '/') || (*name == '%')) { + add_char_to_string(string, *name); + } else { + /* Hex it. */ + n[1] = Hx((((int) *name) & 0xF0) >> 4); + n[2] = Hx(((int) *name) & 0xF); + add_bytes_to_string(string, n, sizeof(n) - 1); + } + } +} + void encode_win32_uri_string(struct string *string, char *name, int namelen) { diff --git a/src/protocol/uri.h b/src/protocol/uri.h index 837cd697..0337ae50 100644 --- a/src/protocol/uri.h +++ b/src/protocol/uri.h @@ -321,6 +321,8 @@ int get_uri_port(const struct uri *uri); void encode_uri_string(struct string *string, const char *name, int namelen, int convert_slashes); +void encode_uri_string_percent(struct string *string, const char *name, int namelen); + /* special version for Windows directory listing */ void encode_win32_uri_string(struct string *string, char *name, int namelen); From 63d8aead84cd47ee1d3957a73f8fbddbc1e0edeb Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 23 Apr 2023 15:52:12 +0200 Subject: [PATCH 07/15] [tables] Lower HTML_MAX_ROWSPAN. Refs #222 --- src/setup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup.h b/src/setup.h index 161cf8dc..8ae0e935 100644 --- a/src/setup.h +++ b/src/setup.h @@ -73,7 +73,7 @@ #define HTML_TABLE_2ND_PASS #define HTML_DEFAULT_INPUT_SIZE 20 #define HTML_MAX_COLSPAN 32768 -#define HTML_MAX_ROWSPAN 32768 +#define HTML_MAX_ROWSPAN 16384 #define HTML_MAX_CELLS_MEMORY 32*1024*1024 #define MAX_STR_LEN 1024 From 9ac7f48f197fe2422361e4f130fb83141352ff36 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 24 Apr 2023 09:32:10 +0200 Subject: [PATCH 08/15] [test] Removed gettext from dependencies. Refs #218 --- src/protocol/test/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/protocol/test/Makefile b/src/protocol/test/Makefile index 4eb6cd7c..706d0d24 100644 --- a/src/protocol/test/Makefile +++ b/src/protocol/test/Makefile @@ -9,8 +9,6 @@ TESTDEPS = \ $(top_builddir)/src/protocol/uri.o \ stub.o -TESTDEPS-$(CONFIG_NLS) += $(top_builddir)/src/intl/gettext/lib.o - CLEAN = stub.o uri-test:: stub.o From b3402e722475137ed44adad6c40d472975456476 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Wed, 26 Apr 2023 18:57:45 +0200 Subject: [PATCH 09/15] [dos] elinks.lsm meson version --- meson.build | 2 +- src/osdep/dos/elinks.lsm.in | 14 ++++++++++++++ src/osdep/dos/meson.build | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/osdep/dos/elinks.lsm.in diff --git a/meson.build b/meson.build index b22adaff..17a0d992 100644 --- a/meson.build +++ b/meson.build @@ -17,7 +17,7 @@ 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('DATE', run_command('date', '%Y-%m-%d', check:false).stdout().strip()) conf_data.set('CONFIG_LARGEFILE', get_option('largefile')) conf_data.set('CONFIG_BOOKMARKS', get_option('bookmarks')) diff --git a/src/osdep/dos/elinks.lsm.in b/src/osdep/dos/elinks.lsm.in new file mode 100644 index 00000000..7d6e7c1c --- /dev/null +++ b/src/osdep/dos/elinks.lsm.in @@ -0,0 +1,14 @@ +Begin3 +Title: @PACKAGE@ +Version: @VERSION@ +Entered-date: @DATE@ +Description: lynx-like alternative character mode WWW browser +Keywords: browser, internet, www +Author: +Maintained-by: Witold Filipczyk +Primary-site: https://github.com/rkd77/elinks +Alternate-site: +Original-site: +Platforms: DOS, FreeDOS +Copying-policy: GPLv2 +End diff --git a/src/osdep/dos/meson.build b/src/osdep/dos/meson.build index f5bab831..7236fce4 100644 --- a/src/osdep/dos/meson.build +++ b/src/osdep/dos/meson.build @@ -1 +1,5 @@ +configure_file(input : 'elinks.lsm.in', + output : 'elinks.lsm', + configuration : conf_data) + srcs += files('dos.cpp') From dc37be3b605287be6f997a945bfc31da4ffc1e73 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Thu, 27 Apr 2023 14:28:19 +0200 Subject: [PATCH 10/15] [uri] Encode only bytes with highest bit set. Refs #226 It is not good, but before it was worse. Characters like ? and = were encoded. --- src/protocol/uri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol/uri.c b/src/protocol/uri.c index 1e9c08c6..6ee4af65 100644 --- a/src/protocol/uri.c +++ b/src/protocol/uri.c @@ -1434,7 +1434,7 @@ encode_uri_string_percent(struct string *string, const char *name, int namelen) if (namelen < 0) namelen = strlen(name); for (end = name + namelen; name < end; name++) { - if (safe_char(*name) || (*name == '/') || (*name == '%')) { + if ((unsigned char)(*name) < 128) { add_char_to_string(string, *name); } else { /* Hex it. */ From 4fec042747d98b5fdd669ab10acb3c3fe2f2c93a Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 28 Apr 2023 09:34:00 +0200 Subject: [PATCH 11/15] [test] Added gettext files for mailcap tests. Refs #218 --- src/mime/backend/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mime/backend/Makefile b/src/mime/backend/Makefile index 9f9e2014..d6ed40f0 100644 --- a/src/mime/backend/Makefile +++ b/src/mime/backend/Makefile @@ -18,5 +18,6 @@ TESTDEPS = \ $(top_builddir)/src/osdep/osdep.o TESTDEPS-$(CONFIG_NLS) += $(top_builddir)/src/intl/gettext/lib.o +TESTDEPS-$(CONFIG_GETTEXT) += $(top_builddir)/src/intl/libintl.o $(top_builddir)/src/util/env.o include $(top_srcdir)/Makefile.lib From fa38a617f34e5bfaa9a3c1e62f14a06b13ad4d02 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 30 Apr 2023 13:22:55 +0200 Subject: [PATCH 12/15] [meson] Added boolean options apidoc, htmldoc and pdfdoc. Default enabled If these options are false, the given part of documentation is not built. On slower machines it takes some time to generate apidocs or manual.pdf. --- doc/meson.build | 6 +++--- meson_options.txt | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/meson.build b/doc/meson.build index 12570e70..965c4b7d 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -241,7 +241,7 @@ manual_html_chunked = [] man1_dir = join_paths(get_option('prefix'), get_option('mandir'), 'man1') man5_dir = join_paths(get_option('prefix'), get_option('mandir'), 'man5') -if xmlto.found() +if xmlto.found() and get_option('htmldoc') elinks_1 = custom_target('elinks.1', input: [], output: 'elinks.1', @@ -277,7 +277,7 @@ endif manual_pdf = [] -if dblatex.found() +if dblatex.found() and get_option('pdfdoc') manual_pdf = custom_target('manual.pdf', input: [], output: 'manual.pdf', @@ -288,7 +288,7 @@ if dblatex.found() endif doxygen_api = [] -if doxygen.found() +if doxygen.found() and get_option('apidoc') doxygen_api = custom_target('api', input: [], output: 'api', diff --git a/meson_options.txt b/meson_options.txt index db10d2a7..47c4a95f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -74,3 +74,6 @@ option('mujs', type: 'boolean', value: false, description: 'use mujs library') option('codepoint', type: 'boolean', value: true, description: 'whether check codepoints on Linux console') option('test', type: 'boolean', value: false, description: 'whether build test programs') option('docdir', type: 'string', value: '', description: 'Documentation installation directory. Default $prefix/share/doc/elinks.') +option('apidoc', type: 'boolean', value: true, description: 'whether to generate API docs with doxygen') +option('htmldoc', type: 'boolean', value: true, description: 'whether to build html docs') +option('pdfdoc', type: 'boolean', value: true, description: 'whether to build manual.pdf') From ac7132bda538678730fa11bfeeaee81ed8fccbf3 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 30 Apr 2023 19:05:29 +0200 Subject: [PATCH 13/15] [NEWS] Info about 0.16.1 --- NEWS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NEWS b/NEWS index 6711698f..748df831 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,20 @@ 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.16.1 +------------- + +Released on 2023-04-30 + +* handle SECTION html element #207 +* allocate more memory for BLOCKQUOTE #214 +* encode A href to terminal codepage and encode bytes with highest bit set as %HEX #221 +* Serbian translation update +* install doc by default in meson #224 +* tests fixes + ELinks 0.16.0 ------------- From c8e0dd9e47ec5688dc5e86c473a2ba856bf1cfe3 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 30 Apr 2023 20:14:33 +0200 Subject: [PATCH 14/15] [remote] Now addBookmark takes two parameters URL and title. Refs #227 title must be passed without quotes. Example: elinks --remote 'addBookmark(https://www.example.com/forum, Forum Example)' Implementation note: uri->post was reused and is title here. --- doc/remote.txt | 2 +- src/config/cmdline.c | 8 ++++++-- src/session/session.cpp | 13 +++++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/doc/remote.txt b/doc/remote.txt index d22732ea..e89321db 100644 --- a/doc/remote.txt +++ b/doc/remote.txt @@ -74,7 +74,7 @@ xfeDoCommand(openBrowser) Opens an ELinks instance in a new window. \ `-------------------------------`---------------------------------------------- Command Description ------------------------------------------------------------------------------- -addBookmark(URL) Bookmarks the passed URL. +addBookmark(URL, title) Bookmarks the passed URL and set title. infoBox(text) Show text in a message box. reload() Reload the document in the current tab. search(string) Search for the string in the current tab diff --git a/src/config/cmdline.c b/src/config/cmdline.c index a5808ff8..3adce9cc 100644 --- a/src/config/cmdline.c +++ b/src/config/cmdline.c @@ -405,7 +405,11 @@ remote_cmd(struct option *o, char ***argv, int *argc) case REMOTE_METHOD_ADDBOOKMARK: if (remote_argc < 1) break; - remote_url = stracpy(remote_argv[0]); + if (remote_argc == 2) { + remote_url = straconcat(remote_argv[0], POST_CHAR_S, remote_argv[1], NULL); + } else { + remote_url = stracpy(remote_argv[0]); + } remote_session_flags = SES_REMOTE_ADD_BOOKMARK; break; @@ -960,7 +964,7 @@ union option_info cmdline_options_info[] = { "\topenURL(URL) : open URL in current tab\n" "\topenURL(URL, new-tab) : open URL in new tab\n" "\topenURL(URL, new-window) : open URL in new window\n" - "\taddBookmark(URL) : bookmark URL\n" + "\taddBookmark(URL, title) : bookmark URL with title\n" "\tinfoBox(text) : show text in a message box\n" "\treload() : reload the document in the current tab\n" "\tsearch(string) : search in the current tab\n" diff --git a/src/session/session.cpp b/src/session/session.cpp index da06dcc9..20cf5b04 100644 --- a/src/session/session.cpp +++ b/src/session/session.cpp @@ -1144,9 +1144,18 @@ init_remote_session(struct session *ses, remote_session_flags_T *remote_ptr, * then have a function that reversibly converts them * to IRIs for display in a given encoding. */ uri_cp = get_cp_index("System"); - add_bookmark_cp(NULL, 1, uri_cp, struri(uri), struri(uri)); -#endif + if (uri->post) { + char *title = stracpy(uri->post); + char *url = get_uri_string(uri, URI_ORIGINAL); + + add_bookmark_cp(NULL, 1, uri_cp, title, url); + mem_free_if(url); + mem_free_if(title); + } else { + add_bookmark_cp(NULL, 1, uri_cp, struri(uri), struri(uri)); + } +#endif } else if (remote & SES_REMOTE_INFO_BOX) { char *text; From fe368c81815eead6bb27d43845a9f9db1575cd2a Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 30 Apr 2023 20:26:44 +0200 Subject: [PATCH 15/15] [bookmarks] null_or_stracpy to avoid NULL title. Refs #227 --- src/bookmarks/bookmarks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bookmarks/bookmarks.c b/src/bookmarks/bookmarks.c index 815fdccf..f5287d3d 100644 --- a/src/bookmarks/bookmarks.c +++ b/src/bookmarks/bookmarks.c @@ -312,7 +312,7 @@ init_bookmark(struct bookmark *root, const char *title, const char *url) bm = (struct bookmark *)mem_calloc(1, sizeof(*bm)); if (!bm) return NULL; - bm->title = stracpy(title); + bm->title = null_or_stracpy(title); if (!bm->title) { mem_free(bm); return NULL;