1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-26 01:15:37 +00:00
Commit Graph

105 Commits

Author SHA1 Message Date
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
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
6c83455ab7 [options] these can be const 2022-01-29 17:49:38 +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
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
sgerwk
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
sgerwk
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

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
أحمد المحمودي (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
96e65c105f Explicit cast in strstr for C++ 2016-04-20 20:46:33 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +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)

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
Kalle Olavi Niemitalo
9e4d7d1883 mailcap bug 1113: Don't leak values of duplicate fields
If a mailcap entry has two test commands or two descriptions,
free the first one before replacing it with the second one.
2011-04-17 21:26:08 +03:00
Witold Filipczyk
16ff310884 One of mailcap tests failed because of changed implementation
of copiousoutput. Now tests passed, by I'm not sure whether
they work properly.
2010-08-08 09:44:37 +02:00
Ahmed El-Mahmoudy
dfd399c370 Fixes to make test target to work 2010-07-25 20:32:37 +02:00
Witold Filipczyk
7dfb20d11f Handle mailcap's copiousoutput without an external pager.
I tested it only on local PDFs.
I don't know if temporary files are deleted or not.
2010-07-24 17:07:18 +02:00
Witold Filipczyk
d2513cdfbb Added $(EXEEXT) for executables. 2010-03-22 09:35:15 +01:00
Kalle Olavi Niemitalo
1bb71f3732 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/config/conf.c
	src/network/ssl/ssl.c
2009-03-12 08:46:02 +02:00
Kalle Olavi Niemitalo
5a43c55c9e Rewrap lines in option documentation.
Documentation strings of most options used to contain a "\n" at the
end of each source line.  When the option manager displayed these
strings, it treated each "\n" as a hard newline.  On 80x24 terminals
however, the option description window has only 60 columes available
for the text (with the default setup.h), and the hard newlines were
further apart, so the option manager wrapped the text a second time,
resulting in rather ugly output where long lones are interleaved with
short ones.  This could also cause the text to take up too much
vertical space and not fit in the window.

Replace most of those hard newlines with spaces so that the option
manager (or perhaps BFU) will take care of the wrapping.  At the same
time, rewrap the strings in source code so that the source lines are
at most 79 columns wide.

In some options though, there is a list of possible values and their
meanings.  In those lists, if the description of one value does not
fit in one line, then continuation lines should be indented.  The
option manager and BFU are not currently able to do that.  So, keep
the hard newlines in those lists, but rewrap them to 60 columns so
that they are less likely to require further wrapping at runtime.
2009-03-08 15:18:10 +02:00
Kalle Olavi Niemitalo
5c2fada371 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/session/download.c
2008-11-01 22:39:17 +02:00
M. Vefa Bicakci
96b3093519 Patch 2: Modifications to the remaining parts of ELinks
[Forward ported to 0.12 from bug 1004 attachment 499.  --KON]
2008-11-01 22:20:25 +02:00