mirror of https://github.com/rkd77/elinks.git synced 2024-06-22 00:35:32 +00:00
Commit Graph

139 Commits

Author SHA1 Message Date
Witold Filipczyk
c15dc0da66 [mailcap] Fix in test. Refs #241
mailcap test failed on s390x arch.
Better fix would require much more elinks code included in this test.
For example call to register_options(...).
2023-06-28 12:19:38 +02:00
Witold Filipczyk
a67188413c [lists] LIST_HEAD -> LIST_HEAD_EL to not clash with libevent's LIST_HEAD. Also added curl implementation of ftpes and sftp
Implementation of ftpes and sftp is based on curl's hiperfifo example. It requires libevent.
ftpes only encrypts control channel. There were problems when both control and data were encrypted. It stucked on SIZE.
Only successful connections work, errors are not handled properly.
2023-06-19 18:43:53 +02:00
Witold Filipczyk
4fec042747 [test] Added gettext files for mailcap tests. Refs #218 2023-04-28 09:34:00 +02:00
Witold Filipczyk
f03d1ea44d [meson] Do not build test programs by default
If you want run tests, pass -Dtest=true to meson
and run "meson test" at the end.
2022-11-30 10:17:49 +01:00
Witold Filipczyk
f73503cb7a [meson] Do not build mailcap test when mailcap is not enabled 2022-11-21 18:01:33 +01:00
Witold Filipczyk
39b914dee3 [tests] fixed build with -Dx=true 2022-10-13 16:56:40 +02:00
Witold Filipczyk
766d0d655c [tests] fixes in mime/backend 2022-10-08 11:10:54 +02:00
Witold Filipczyk
6e83bbf23c [tests] build_by_default: false for executables.
It does not work, but this as a meson issue.
2022-10-07 19:56:54 +02:00
Witold Filipczyk
5d28a98a03 [tests] Small fixes 2022-10-05 14:41:58 +02:00
Witold Filipczyk
ed6ec6ae2e [test] mailcap test 2022-10-04 21:37:26 +02:00
Witold Filipczyk
7ea04c7f0f [isspace] Some implementations of isspace require unsigned char 2022-06-28 20:25:06 +02:00
Witold Filipczyk
3d1280fd2a [mailcap] Fixed tests 2022-06-05 15:29:04 +02:00
Witold Filipczyk
09e3f044da [test] Fix building tests
mailcap test was too hard to build, so skip for now.
2022-06-03 15:09:12 +02:00
Witold Filipczyk
443d42608d [dgi] Experimental DGI support.
Dos Gateway Interface was introduced by Arachne browser.
I tested two cases:
file/cdplayer.dgi   |[7]$ecdplayer.exe $s
application/pdf pdf>txt|$epdftotext $1 $2
2022-05-21 18:18:55 +02:00
Witold Filipczyk
2c2cf97e03 [options] No need for C_ macro in INIT_OPT_* 2022-03-02 19:02:47 +01:00
Witold Filipczyk
95bd39ff72 [mailcap] explicit cast to char * 2022-02-21 16:30:42 +01:00
Witold Filipczyk
b0c64563c2 [mime] cast to char * 2022-02-18 17:09:54 +01:00
Witold Filipczyk
d6d891c5de [mime] const in get_real_opt 2022-02-17 19:54:37 +01:00
Witold Filipczyk
d124b9bff0 [option] union of const and non-const char * in option 2022-01-29 18:17:43 +01:00
Witold Filipczyk
6c83455ab7 [options] these can be const 2022-01-29 17:49:38 +01:00
Witold Filipczyk
cea2521b91 [encoding] enum stream_encoding -> stream_encoding_T 2022-01-28 16:17:25 +01:00
Witold Filipczyk
3ca726ac98 [mime] cast 2022-01-25 18:25:58 +01:00
Witold Filipczyk
2fa67c5730 [char] Introduced macro C_
C_("aaaa") -> (char *)("aaaa")
2022-01-19 22:49:13 +01:00
Witold Filipczyk
de2a787900 [strstr] no cast 2022-01-18 20:55:08 +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
20c161559c [mem_alloc] cast return value 2022-01-16 19:09:27 +01:00
Witold Filipczyk
b434b11309 [options] 0 (option_flags) -> OPT_ZERO 2022-01-15 20:10:37 +01:00
Witold Filipczyk
36a4fc1c2f [module] name - const char * 2022-01-14 21:08:04 +01: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
5ed65c8733 [gemini] text/gemini 2021-07-01 20:18:29 +02: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
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
d6ccb1813b update the "What to do?" dialog to the new format with %f for the file 2020-09-13 17:23:51 +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
153ea907a8 also pass the uri as %u to external handlers 2020-07-25 13:29:47 +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

- 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
أحمد المحمودي (Ahmed El-Mahmoudy)
dbab898f38 Fix spelling mistakes 2019-01-14 04:51:10 +01:00
Arjen Stolk
e957e60d5c mailcap: prevent segfault on test entry with %s
When a mailcap entry with a testcommand containing %s is encountered, it is ignored. The
entry was freed, but not set to NULL, leading to a segfault later on.
2016-12-28 14:22:01 +01:00
Witold Filipczyk
2fc9b0bf5a Better handling of content-disposition (line without semicolon)
This time it was copied from links2.
2016-08-21 22:02:46 +02:00
Witold Filipczyk
ab63ee8f82 Revert "Fix saving files from speccy.pl archives"
This reverts commit 29d85fdb3b.
2016-08-21 18:22:33 +02:00
Witold Filipczyk
29d85fdb3b Fix saving files from speccy.pl archives 2016-05-28 17:58:17 +02:00
Witold Filipczyk
da15322705 Cast to (const char *) in strrchr calls 2016-04-20 21:03:27 +02:00
Witold Filipczyk
96e65c105f Explicit cast in strstr for C++ 2016-04-20 20:46:33 +02:00
Witold Filipczyk
1b06539694 Explicit cast to (const char *) in strcasestr for C++ 2016-04-20 20:11:08 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Witold Filipczyk
67673f5fe5 new -> new_ for C++ compatibility 2016-04-20 18:42:22 +02: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)

	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