1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

5099 Commits

Author SHA1 Message Date
Witold Filipczyk
f8d08d1db3 [osdep] os_get_free_mem_in_mib
DOS and Linux implementation. Called in bfu/leds.c
2024-05-02 14:31:27 +02:00
Witold Filipczyk
f48cec877e [spidermonkey] URL
A few getters passed tests.
2024-04-29 19:44:31 +02:00
Witold Filipczyk
1c9c30ad75 [types] %ld is for long 2024-04-26 22:41:39 +02:00
Witold Filipczyk
110cdef5c2 [anonymous] about:config was available in anonymous mode 2024-04-25 17:29:39 +02:00
Witold Filipczyk
23c5c8b866 [status] Boolean option ui.show_mem
Display available memory from /proc/meminfo.
2024-04-25 16:44:39 +02:00
Witold Filipczyk
0f1e056875 [options] Minor optimisation. Store value of "test" option in variable 2024-04-23 16:07:35 +02:00
Witold Filipczyk
af20c0e7e8 [css] execute old css code, when libcss is disabled, but compiled-in 2024-04-22 20:59:30 +02:00
Witold Filipczyk
d86ce27523 [css] Add to the end of list. Refs #301
It needs more testing.
2024-04-20 20:06:45 +02:00
Witold Filipczyk
e136d663c9 [idn2] This else does not make sense 2024-04-18 20:33:52 +02:00
Witold Filipczyk
ac7292ef82 [idn] one variable less 2024-04-18 19:31:48 +02:00
Witold Filipczyk
4d7e94c5e4 [idn2] Warnings when built with -Didn=false . Spotted by jon 2024-04-18 19:08:23 +02:00
Witold Filipczyk
cdf02f5e0c [libcss] Removed unused function 2024-04-18 17:12:27 +02:00
Witold Filipczyk
9ee4ebfa46 [bfu] clang's warning 2024-04-18 17:09:11 +02:00
Witold Filipczyk
77addf7277 [scripting] silence warning 2024-04-18 09:15:10 +02:00
Witold Filipczyk
ebe3672e10 [select] unused function 2024-04-18 08:57:52 +02:00
Witold Filipczyk
324bd02aa9 [encoding] compilation fix (unsigned int bitfields) 2024-04-18 08:51:56 +02:00
Witold Filipczyk
98e82717ea [curl] Option protocol.ftp.curl_tls13_ciphers
ciphers for ftpes.
2024-04-16 12:41:18 +02:00
Witold Filipczyk
f17f2d75ad [curl] option protocol.https.curl_tls13_ciphers
It is a colon separated list of ciphers. Mainly for testing.
See https://curl.se/docs/ssl-ciphers.html
2024-04-16 12:30:56 +02:00
Witold Filipczyk
141ad11ad5 [curl] Added bandwith limit for ftp and http.
protocol.ftp.curl_max_recv_speed
protocol.ftp.curl_max_send_speed
protocol.http.curl_max_recv_speed
protocol.http.curl_max_send_speed

Unit is byte per second. 0 - unlimited.
2024-04-15 19:52:23 +02:00
Witold Filipczyk
ea9d93d44b [test] Make compilable test mailcap-cache. Refs #298 2024-04-15 08:34:08 +02:00
Witold Filipczyk
26815e829a Merge branch 'assert' 2024-04-13 13:56:54 +02:00
Scott Mcdermott
3d1f020a3b [interlink] speed up first elinks, and use pipe trigger for fork_on_start
When the first elinks session starts (whether fork_on_start or not), it
tries to connect on AF_UNIX socket, to see if an existing master is
present.  The current code implements a retry loop with linear-increase
retry backoff, 50ms *= attempts, with 3 attempts, total delay 300ms,
before concluding master is not present.

After forking for fork_on_start, we do have to wait for the new master
to finish setup, so we can connect to it.  This is the case where retry
loop might be useful.  However in fork_on_start=0 case, there should be
no reason to ever wait: if we get ECONNREFUSED or ENOENT, the master
simply is not there, we can go on about our business as the master.

With fork_on_start=1 however, we will race with the child (that will
become the new master), which has to complete its socket/bind/listen
sequence.  Therefore we typically have to wait another 50ms (first
attempt delay), for a total of 350ms delay.

In both cases, there does not seem to be a purpose to the initial
connection attempt retry.  Conclusion after connect() failure should be
authoritative: there is no master.  We do not race with anyone.

If we have done fork_on_start and have to wait, we can instead open a
pipe before forking, and wait for the "new" master (its child) to send
us a byte over the pipe.  Thus, we do not need to poll, but can simply
block until we get the trigger, to indicate that AF_UNIX socket setup
has completed.

This speeds up the first start of elinks by 300ms for fork_on_start=0,
and between 300-350ms for fork_on_start=1 (or possibly more, if the
machine is loaded and child did not finish AF_UNIX setup in first 50ms).
2024-04-12 22:51:01 -07:00
Scott Mcdermott
b482b9e069 [interlink] do not nest retries for connect_to_af_unix(), it has already
Not sure why a retry loop using MAX_BIND_TRIES / BIND_TRIES_DELAY
surrounds connect_to_af_unix(), since bind() is done elsewhere in the
code, and connect_to_af_unix() already has its own retry loop inside the
function, with its own set of defines for retries, i.e. MAX_CONNECT_TRIES
/ CONNECT_TRIES_DELAY, surrounding the connect().  No need to have two
levels of retry; if it's not successful within connect_to_af_unix() it
will never be.
2024-04-12 20:05:53 -07:00
Witold Filipczyk
3f9af02ff6 [ecmascript] Do not rewrite html when testing 2024-04-12 16:17:41 +02:00
Witold Filipczyk
86b621966e [mujs] console.exit 2024-04-11 19:17:10 +02:00
Witold Filipczyk
58515c8df4 [quickjs] console.exit 2024-04-11 19:10:41 +02:00
Witold Filipczyk
6adca27072 [test] Added command line option --test
If --test 1, then elinks is headless. Display is /dev/null.
console.exit(0); or console.exit(1);
terminates elinks session.

console.exit is implemented for spidermonkey only.
2024-04-11 18:58:07 +02:00
Witold Filipczyk
e9ad5b4d70 [mujs] console.assert 2024-04-11 17:52:29 +02:00
Witold Filipczyk
43fb1e84bc [quickjs] console.assert 2024-04-11 17:38:49 +02:00
Witold Filipczyk
4190613ed2 [spidermonkey] console.assert 2024-04-11 17:27:15 +02:00
Witold Filipczyk
7545b8093d [getpid] Removed check for HAVE_GETPID
It is assumed that every supported system has getpid().
2024-04-11 11:17:30 +02:00
Witold Filipczyk
1489e4002a [style] shorter 2024-04-11 08:07:48 +02:00
Scott Mcdermott
b2556aa953 [fg] track master proc for suspend via pids, not term fds, for fork_on_start
When ui.sessions.fork_on_start, we fork a process that has a different
fdout than get_output_handle() (which has hardcoded fdout of 1), so it
will never be considered term->master, yet this is the process we want
to wake up in SIGTSTP handler.

Since we cannot rely on term->master to determine if we are the master
process, we instead move master_pid to be set explicitly at the places
where we have information about whether our process is a master or a
slave: first on start, then once the interlink determination has been
made.

master_pid has to be set in both parent and child, because both will get
suspended and need to know which one needs to resume in background with
SIGCONT (the master).  We can't inherit from the parent because it's
unknown at the time of fork.

Previously, master_pid worked correctly with fork_on_start=0,
-no-connect or -dump, but not with fork_on_start=1.

See #287 for background.
2024-04-10 15:14:23 -07:00
Witold Filipczyk
5886cad776 [curl] Once again disable FOLLOWLOCATION
The issue with curl is that it does not work with rememberred passwords.
2024-04-09 20:27:30 +02:00
Witold Filipczyk
e183bc7bab [style] perl-like {} 2024-04-08 15:01:58 +02:00
Scott Mcdermott
dbdd49718d [mailcap] allow to run 'mailcap-cache' test with --display=0/1 or yes/no
the tests do not allow ever matching the entries with DISPLAY=:0 test,
since it's hardcoded to force $DISPLAY unset

leave default unchanged, (forced unset), but just add a command line
flag if user wants to match the entry with $DISPLAY set in mailcap
2024-04-08 02:22:43 -07:00
Scott Mcdermott
afc5ac5deb [mailcap] silence compiler warning about get_mailcap_path() const qualifier
it's declared "const char *path" in "struct option_init", but we're
using it as char *, so cast it
2024-04-08 02:14:19 -07:00
Scott Mcdermott
d1621e7230 [mailcap] make a meson 'test-mailcap' option that only builds mailcap tests
Not all 'test' compiled, and only needed to test mailcap, so separated
it out.  It will still be built with 'test' option like before.
2024-04-08 01:55:25 -07:00
Witold Filipczyk
4c3d7ecbc4 [win32] Check if cmdline_options is not NULL 2024-04-07 19:57:59 +02:00
Witold Filipczyk
a1b438a140 [types] get rid of longptr_T 2024-04-07 19:55:02 +02:00
Witold Filipczyk
699531f541 [options] intptr_t instead of longptr_T
longptr_T was not long enough on Windows
2024-04-07 19:50:11 +02:00
Witold Filipczyk
d09f8060ee [types] Define OFFT_MAX somehow 2024-04-04 15:30:09 +02:00
Witold Filipczyk
41724fb217 [config] Compilation fix 2024-04-04 15:27:56 +02:00
Witold Filipczyk
3ca409f53f [curl] Send Accept-Language 2024-03-29 19:13:53 +01:00
Witold Filipczyk
674fa3c907 [curl] duplicate 2024-03-29 18:52:51 +01:00
Witold Filipczyk
085c87edbc [curl] Reset string with headers
When following urls, headers were added to previous values.
2024-03-29 13:38:32 +01:00
Witold Filipczyk
d10108751f [curl] FOLLOWLOCATION 1
It does not execute follow-url-hook, but works.
2024-03-29 11:50:04 +01:00
Witold Filipczyk
d12dacf6ab [config] mkdir_with_parents for config directory
Based on glib2 code
2024-03-27 15:47:32 +01:00
Witold Filipczyk
f2690c3e21 [loop] check_bottom_halves after starting libevent and curl
dump with curl enabled did not work
2024-03-18 18:19:12 +01:00
Witold Filipczyk
88de3ca754 [perl] ses can be NULL for pre_format_html_hook. Refs #291 2024-03-18 12:44:02 +01:00