1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-01 02:05:33 +00:00
Commit Graph

173 Commits

Author SHA1 Message Date
Witold Filipczyk
2e2737e6de [select] Introduced get_handler_data 2022-02-21 19:03:54 +01:00
Witold Filipczyk
3978f3a930 [main] const arg 2022-02-18 15:33:51 +01:00
Witold Filipczyk
07a3a19b75 [main] const in report_af_unix_error 2022-02-17 19:24:30 +01:00
Witold Filipczyk
cba95b2b30 [event] union for const/non-const void * 2022-01-30 19:19:20 +01:00
Witold Filipczyk
0d2cbb8847 [event] const in trigger_event_name 2022-01-30 15:33:05 +01:00
Witold Filipczyk
5f56b97a34 [event] const char *name 2022-01-30 15:08:45 +01:00
Witold Filipczyk
44fc223840 [timer] cast 2022-01-29 12:26:56 +01:00
Witold Filipczyk
a579526325 [main] cast 2022-01-25 18:16:12 +01:00
Witold Filipczyk
e62b301657 [strrchr] Drop cast to const char * 2022-01-18 20:42:29 +01:00
Witold Filipczyk
53a860a3d6 [strchr] casting first parameter to const char * was not a good idea 2022-01-18 20:30:48 +01:00
Witold Filipczyk
881f896e85 [mem_calloc] Cast 2022-01-16 21:08:50 +01:00
Witold Filipczyk
be8a030fa7 [mem_realloc] cast return value 2022-01-16 19:38:30 +01:00
Witold Filipczyk
20c161559c [mem_alloc] cast return value 2022-01-16 19:09:27 +01:00
Witold Filipczyk
36a4fc1c2f [module] name - const char * 2022-01-14 21:08:04 +01:00
Witold Filipczyk
dfe9186c87 [main] Added --always-load-config command-line option. Refs #137
This option loads config on 2nd instance of ELinks and next.
It can be useful in alias.
2022-01-04 15:15:39 +01:00
Witold Filipczyk
33a9fea02a [version] Show version of libevent 2021-12-28 17:49:15 +01:00
Witold Filipczyk
571d275759 [version] Show runtime version of decompression libraries 2021-12-27 17:02:58 +01:00
Witold Filipczyk
0ed9511286 [c] compilation fixes on Pi 2021-12-22 16:12:09 +01:00
Witold Filipczyk
5a14b61c0d [register] Drop register
Compilers are smart and don't need such hints.
2021-12-03 12:34:00 +01:00
Witold Filipczyk
adddbf53fb [quickjs] clearTimeout 2021-12-01 19:27:50 +01:00
Witold Filipczyk
dc12c13244 [quickjs] Test commit. window.alert('Blabla') works. 2021-10-17 18:17:48 +02:00
Witold Filipczyk
4258e248d0 [gettext] Show info about gettext.
gettext (System) means gettext from the libc library.
gettext (ELinks) builtin from src/intl/gettext.
2021-08-15 17:52:54 +02:00
Witold Filipczyk
66305fcb50 [gettext] try system gettext. Refs #62
Now, only meson was changed.
-Dnls=true -Dgettext=true
2021-08-08 21:25:08 +02:00
Witold Filipczyk
36aa04ed12 [time.h] time.h can be included unconditionally 2021-03-19 14:22:04 +01:00
Witold Filipczyk
d20216cf53 [hash] const char * 2021-03-03 14:12:31 +01:00
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
ee5ec9c287 [dump] Removed silly debug statement. 2020-10-29 20:23:39 +01:00
Witold Filipczyk
d1ecd45828 [mozjs52] It compiles, but often segfaults. No idea yet how to fix it. 2020-10-27 14:53:24 +01:00
Witold Filipczyk
1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00
Witold Filipczyk
5f87bdbcb2 [meson] meson build scripts.
Not finished yet, but I added to motivate myself and others.
The goal is to get a few seconds faster builds.

autotools still will be available.
2020-09-05 22:06:01 +02:00
Witold Filipczyk
c56d11cfb9 [main] Fixed issue with scripting and fork_on_start 2020-05-22 21:52:36 +02:00
Witold Filipczyk
2dcac411a8 [sessions] New option ui.sessions.fork_on_start
Default value of this bool option is 0. Nothing changes in behaviour since 0.13.1.
If you set it to 1, one more process will be started. This main process will handle
only interlink connections, while other processes will be slaves to it.
This will allow to exit first started elinks session without breaking others.
2020-05-21 16:53:43 +02:00
Witold Filipczyk
f89b26d5b2 [interlink] Fixed elinks -remote 'ping()' 2020-05-20 18:35:40 +02:00
Witold Filipczyk
08138487a0 [interlink] Test commit. All terminals - slaves.
Before when master terminal quit session, all slave terminal stopped to work.
There is a workaround. ELinks on master terminal forks on start and becomes slave.
2020-05-17 16:35:58 +02:00
Witold Filipczyk
e532e348f8 [timer] set_event_for_timer is only for libevent 2019-11-16 11:35:18 +01:00
Witold Filipczyk
d56ad7ceb0 [select] restrict_fds was called only with LIBEVENT and POLL 2019-11-16 11:29:06 +01:00
Witold Filipczyk
21b8cf37d9 [select] Fixes based on links code
bittorrent code caused segmentation fault, because get_handler read
outside of current fd range. Workaround is to return NULL.
2019-11-16 09:40:01 +01:00
Witold Filipczyk
558baa830e [select] More code to avoid warning 2019-11-15 16:37:02 +01:00
Witold Filipczyk
90086599da [encoding] Experimental zstd encoding 2019-07-14 18:54:39 +02:00
Witold Filipczyk
3d96b0d7d7 Revert "Compile with C++."
This reverts commit 4f4df33638.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
Felix Janda
336e596a83 Rename VA_COPY to va_copy
With this, the C99 standard macro va_copy is used when available
instead of the prestandard __va_copy.
2017-11-23 19:18:20 -05:00
Felix Janda
bfb4733f39 Don't use <sys/signal.h>
This legacy header appears to be unused. Removing its includes
avoids numerous warnings when compiling with musl libc:

/usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Wcpp]
2017-11-23 17:51:41 -05:00
Witold Filipczyk
c4cb7ed8e5 Beginnings of terminfo support.
--with-terminfo must be added for configure
and --terminfo to command line.
terminfo is only used for output and not all sequences are changed.
2017-11-19 18:29:38 +01:00
Witold Filipczyk
d5261654f4 libev or libevent in About dialog. 2017-11-17 17:33:51 +01:00
Witold Filipczyk
21d36fcbd1 Add --with-libev, because libev is smaller.
When both --with-libev and --with-libevent are used, libev takes
precedence.
2017-11-17 16:34:03 +01:00
Witold Filipczyk
f52e3187e3 Add command line option -no-libevent 2017-11-16 18:23:47 +01:00
Witold Filipczyk
b6fd548049 threads might be NULL for --lookup 2017-11-13 14:44:24 +01:00
Witold Filipczyk
3b6ff1d22f Introduced --with-libevent based on links code
I don't know how to deal with select's exception fds in libevent,
so some functions may not work properly.
2017-11-12 13:41:31 +01:00
Witold Filipczyk
050f304161 poll and EINTRLOOP - added fragment from links 2017-11-11 21:37:08 +01:00
Witold Filipczyk
8c39acc277 Info about brotli. 2017-11-11 16:31:32 +01:00
Witold Filipczyk
da15322705 Cast to (const char *) in strrchr calls 2016-04-20 21:03:27 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
witekfl
91515990c8 Removed --with-gc and CONFIG_GC related code.
CONFIG_GC was added with SEE, but SEE support was removed, so
I don't see the reason to keep gc.
2013-05-14 15:36:32 +02:00
witekfl
26e41cb6c3 Redefine FD_SETSIZE on Windows. Set it to 4096.
There was hardcoded 4096 for threads size, but below there was:
	assertm(fd >= 0 && fd < FD_SETSIZE,
		"get_handler: handle %d >= FD_SETSIZE %d",
		fd, FD_SETSIZE);
	if_assert_failed return NULL;
which fails for fd > 1024 (1024 was previous value of FD_SETSIZE)
2013-01-05 13:42:35 +01:00
Kalle Olavi Niemitalo
8b00e1ef70 bug 764: Initialize the right member of union option_value
INIT_OPTION used to initialize union option_value at compile time by
casting the default value to LIST_OF(struct option) *, which is the
type of the first member.  On sparc64 and other big-endian systems
where sizeof(int) < sizeof(struct list_head *), this tended to leave
option->value.number as zero, thus messing up OPT_INT and OPT_BOOL
at least.  OPT_LONG however tended to work right.

This would be easy to fix with C99 designated initializers,
but doc/hacking.txt says ELinks must be kept C89 compatible.
Another solution would be to make register_options() read the
value from option->value.tree (the first member), cast it back
to the right type, and write it to the appropriate member;
but that would still require somewhat dubious conversions
between integers, data pointers, and function pointers.

So here's a rather more invasive solution.  Add struct option_init,
which is somewhat similar to struct option but has non-overlapping
members for different types of values, to ensure nothing is lost
in compile-time conversions.  Move unsigned char *path from struct
option_info to struct option_init, and replace struct option_info
with a union that contains struct option_init and struct option.
Now, this union can be initialized with no portability problems,
and register_options() then moves the values from struct option_init
to their final places in struct option.

In my x86 ELinks build with plenty of options configured in, this
change bloated the text section by 340 bytes but compressed the data
section by 2784 bytes, presumably because union option_info is a
pointer smaller than struct option_info was.
(cherry picked from elinks-0.12 commit e5f6592ee2)

Conflicts:
	src/protocol/fsp/fsp.c: All options had been removed in 0.13.GIT.
	src/protocol/smb/smb2.c: Ditto.
2012-11-03 22:16:32 +02:00
witekfl
9543ed96a4 Do not set FD_SETSIZE too high on Windows.
Alloc more space for threads in main/select.c instead.
2012-08-08 22:22:37 +02:00
witekfl
a140e1d79f Set FD_SETSIZE to 1024 on Mingw32.
The default value of FD_SETSIZE on Windows is 64,
but can be bigger if set before including winsock2.h
2012-05-25 17:54:46 +02:00
Kalle Olavi Niemitalo
b40736cafe Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS (merged)
	configure.in (merged)
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/fr.po (kept 0.13.GIT version)
	po/pl.po (kept 0.13.GIT version)
2008-09-27 16:28:28 +03:00
Kalle Olavi Niemitalo
a0d624cd61 Hurd bug 22861: Do not select() exceptions from pipes.
The GNU Hurd has a bug that can make select() report an exception in a
pipe even though none has actually occurred.  The typical result is
that ELinks closes the pipe through which it internally passes all
input events, such as keypresses.  It then no longer reacts to what
the user is trying to do.

Work around the Hurd bug by making set_handlers() check whether the
file descriptor refers to a pipe, and if so, pretend the caller did
not provide any handler for exceptions.  This is a minimal change that
avoids slowing down the select() loop itself and does not require
careful analysis of the callers to statically find out which file
descriptors might refer to pipes.  The extra stat() calls may slow
ELinks down somewhat, but anyway it'll work better than it did without
the patch, and if the Hurd bug is ever fixed, we can remove the
workaround at that time.
2008-09-07 22:52:47 +03:00
Kalle Olavi Niemitalo
988cec481b Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS
	configure.in

The following files also conflicted, but they had not been manually
edited in the elinks-0.12 branch after the previous merge, so I just
kept the 0.13.GIT versions:

	doc/man/man1/elinks.1.in
	doc/man/man5/elinks.conf.5
	doc/man/man5/elinkskeys.5
	po/fr.po
	po/pl.po
2008-07-11 22:28:45 +03:00
Kalle Olavi Niemitalo
8ee5e8c4a1 Bug 951: Revert "Garbage-collect SMJS objects before flushing caches."
This reverts commit c33d195ff4.
ELinks no longer needs to collect garbage in this situation
because it can now free cache entries even if the corresponding
SMJS objects remain.
2008-07-08 15:21:07 +03:00
Kalle Olavi Niemitalo
f19c948ca7 Bug 824: Disable combining characters unless --enable-combining.
Label this as an experimental feature because it has so many bugs
and it is not clear how they can be fixed.
2008-01-19 20:58:22 +02:00
Witold Filipczyk
560818568a combined: Added the option "combine" to terminal and screen driver options.
Note that, combining characters work only on XTerm with UTF-8 locale setings.
2008-01-19 20:49:47 +02:00
Laurent MONIN
e9e8639c8d Improve display of version and features.
Wrap on spaces when features are sent to console using -version,
and let Info dialog do the job in interactive mode.
Insert newlines and remove parenthesis in -version and Info box display.

Backported from master branch.
2007-09-14 10:34:42 +02:00
Jonas Fonseca
0240c469b7 Merge branch 'elinks-0.12'
Conflicts:

	src/document/dom/renderer.c
2007-09-09 18:25:49 +02:00
Kalle Olavi Niemitalo
cdf2d8181c More missing va_ends.
Somehow, these slipped from commit
af14d00d17 yesterday.
2007-09-04 10:26:57 +03:00
Miciah Dashiel Butler Masters
ea372bd0cd get_opt_*: Add ses parameter
Add a session parameter to get_opt_ and its wrappers in preparation for session-specific and domain-specific options.
2007-08-28 17:24:59 +00:00
Kalle Olavi Niemitalo
2437d35904 Merge commit 'pasky.or.cz/elinks-0.12' into elinks-0.13
There were conflicts in src/document/css/ because 0.12.GIT switched
to LIST_OF(struct css_selector) and 0.13.GIT switched to struct
css_selector_set.  Resolved by using LIST_OF(struct css_selector)
inside struct css_selector_set.
2007-07-28 03:22:29 +03:00
Kalle Olavi Niemitalo
96176a8c77 Declare element types of lists. 2007-07-26 22:47:23 +03:00
Laurent MONIN
c66a9d46a0 Insert newlines and remove parenthesis in -version and Info box display. 2007-04-27 15:08:28 +02:00
Laurent MONIN
132e06f136 Enhance version and features display. Wrap on spaces when features
are sent to console using -version, and let Info dialog do the job in
interactive mode.
2007-04-26 15:00:04 +02:00
Kalle Olavi Niemitalo
a495f6d26a Cast the NULL argument of string_concat to unsigned char *.
string_concat reads the args with va_arg(ap, const unsigned char *),
and the NULL macro may have the wrong type (e.g. int).

Many places pass string literals of type char * to string_concat.
This is in principle also a violation, but I'm ignoring it for now
because if it becomes a problem with some C implementation, then so
will the use of unsigned char * with printf "%s", which is so
widespread in ELinks that I'm not going to try fixing it now.
2007-03-11 13:01:50 +02:00
Kalle Olavi Niemitalo
801d520ddd Fix compiler errors without HAVE_VARIADIC_MACROS. 2007-03-11 12:22:02 +02:00
Kalle Olavi Niemitalo
bad1b588dd select_loop: If select fails, save its errno. 2006-12-25 10:09:13 +02:00
Kalle Olavi Niemitalo
c150331668 Bug 868: check_timers: Don't keep pointers to other timers past timer->func. 2006-12-02 21:00:32 +02:00
Kalle Olavi Niemitalo
bddafe5f7e Document how timer callbacks erase timer IDs; add some assertions.
Tangential to bug 868.
2006-12-02 18:35:03 +02:00
Witold Filipczyk
d2006fd3dd Always terminate ELinks when using -remote.
The side effect: ELinks doesn't clear screen with -remote 'openURL(...)'.
2006-10-27 18:59:36 +02:00
Kalle Olavi Niemitalo
c33d195ff4 Garbage-collect SMJS objects before flushing caches. 2006-09-25 23:43:32 +03:00
Kalle Olavi Niemitalo
359b131c6b Bug 810: Add a few comments pointing to the bug. 2006-09-24 00:21:03 +03:00
Kalle Olavi Niemitalo
92cb452a9e Rename CONFIG_UTF_8 to CONFIG_UTF8.
The configure script no longer recognizes "CONFIG_UTF_8=yes" lines
in custom features.conf files.  They will have to be changed to
"CONFIG_UTF8=yes".  This incompatibility was deemed acceptable
because no released version of ELinks supports CONFIG_UTF_8.

The --enable-utf-8 option was not renamed.
2006-09-17 16:12:47 +03:00
Witold Filipczyk
2a6125e3d0 Merge with utf8. src/document/plain/renderer.c replaced by utf8 version 2006-07-21 13:12:06 +02:00
Witold Filipczyk
a69ef92723 assertm(fd >= 0 && fd < FD_SETSIZE) always fails under Windows, so
this assertion is excluded on that platform
2006-06-25 12:36:46 +02:00
Laurent MONIN
1d3656a317 Pass a pointer to a hash pointer to free_hash() to ensure hash pointer
is NULL on return.
2006-05-31 19:33:36 +02:00
Laurent MONIN
54099f5286 Do not export init_hash(),strhash() and hash_size() anymore, use a
wrapper named init_hash8() instead.
2006-05-31 19:17:01 +02:00
Witold Filipczyk
5558284c08 win32: IMHO slightly better select implementation 2006-05-21 12:59:00 +02:00
Miciah Dashiel Butler Masters
7f312c546c Create a module for src/viewer, which subsumes some existing modules
as submodules
2006-05-20 15:01:24 +00:00
Miciah Dashiel Butler Masters
e91b46de5f Modularise viewer/text/marks 2006-05-20 15:01:24 +00:00
Miciah Dashiel Butler Masters
a0bcf254ae Modularise src/terminal 2006-05-20 15:01:24 +00:00
Miciah Dashiel Butler Masters
337958d4e4 Modularise HTTP authentication 2006-05-20 15:01:23 +00:00
Miciah Dashiel Butler Masters
4bb87288f8 Document the difference between builtin_modules and main_modules 2006-05-20 15:01:23 +00:00
Miciah Dashiel Butler Masters
5dcac5c32d Modularise config/kbdbind 2006-05-20 15:01:22 +00:00
Witold Filipczyk
cbb507a6b5 WIN32 port: introduced VT100 decoder. ELinks is able to display first page
of the document. Keyboard doesn't work, Windows style path either.
I tested it only under Wine.
2006-05-20 14:05:45 +02:00
Witold Filipczyk
3dc145bde2 Changes related to Win32 port. S_IRWXG and S_IRWXO were undefined
under crossmingw32. init_static_version must be called after init_options
because ELinks wanted to read "verbose" option before it was initialized.
2006-05-18 21:46:42 +02:00
Witold Filipczyk
55176d79de Added info about lzma to the "About" dialog 2006-03-31 20:35:08 +02:00
Pavol Babincak
5561437629 Added UTF-8 to ELinks version. 2006-02-18 20:28:01 +01:00
Miciah Dashiel Butler Masters
190259ca22 mem_alloc_align: drop the obj type parameter
Instead use the object itself, i.e., replace typeof(obj) with
typeof(**ptr).
2006-02-17 17:32:59 +00:00
Laurent MONIN
5860a44b7d Fix compilation under gcc 4.x. Backported from gentoo portage. 2006-02-10 21:27:25 +01:00
4aaafc4716 Inroduced garbage collector. Disabled by default 2006-01-30 22:09:13 +01:00
Jonas Fonseca
7e6f398602 Revert OBJECT_HEAD() part of tcc cleanups
The LIST_HEAD() change to OBJECT_HEAD() doesn't work when debuging is
enabled.

Fixes: d18809522e
2006-01-22 06:18:40 +01:00