1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-27 01:25:34 +00:00
Commit Graph

44 Commits

Author SHA1 Message Date
Witold Filipczyk
2c2cf97e03 [options] No need for C_ macro in INIT_OPT_* 2022-03-02 19:02:47 +01:00
Witold Filipczyk
fe516f532c [nntp] explicit cast to char * 2022-02-21 17:42:35 +01:00
Witold Filipczyk
cc56055f1f [nntp] const protocol 2022-02-21 17:18:35 +01:00
Witold Filipczyk
fd1ba62f1b [nntp] enum nntp_code -> nntp_code_T 2022-01-28 17:07:51 +01:00
Witold Filipczyk
05e65b0878 [nntp] cast 2022-01-25 19:45:16 +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
b434b11309 [options] 0 (option_flags) -> OPT_ZERO 2022-01-15 20:10:37 +01:00
Witold Filipczyk
ee06a871c3 [c] More fixes related to redefined PF_INET 2021-12-22 16:27:29 +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
ab758c79b5 [nntp] crash on nntp://news.neodome.net . Refs #114 2021-03-31 14:01:49 +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
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
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
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
Petr Baudis
9a001f051a Remove variables that were set but not used
Required to make new gcc with default warning settings happy.
2011-09-24 02:25:51 +02: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
Kalle Olavi Niemitalo
a73fe73cd2 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	src/document/document.h
	src/encoding/encoding.c
	src/network/connection.c
	src/protocol/bittorrent/bittorrent.c
	src/protocol/bittorrent/bittorrent.h
	src/protocol/bittorrent/common.h
	src/protocol/bittorrent/connection.c
	src/protocol/bittorrent/dialogs.c
	src/protocol/bittorrent/tracker.c
	src/protocol/file/cgi.c
	src/protocol/http/http.c
2008-08-03 22:18:53 +03:00
Kalle Olavi Niemitalo
6c2e8cd7b2 Bug 1013: Don't assume errno is between 0 and 100000
Replace almost all uses of enum connection_state with struct
connection_status.  This removes the assumption that errno values used
by the system are between 0 and 100000.  The GNU Hurd uses values like
ENOENT = 0x40000002 and EMIG_SERVER_DIED = -308.

This commit is derived from my attachments 450 and 467 to bug 1013.
2008-08-03 17:56:41 +03:00
Kalle Olavi Niemitalo
291a913d1e 1008: Call and reset conn->done when freeing conn->info.
In the places that set conn->info without freeing the original value,
assert that both conn->info and conn->done are NULL.
2008-05-22 03:59:33 +03:00
Jonas Fonseca
8dbd38eded NNTP: Improve listing of articles for groups
It now uses ordered list with the message number as the list item
number. Only the message subject and from field are shown.
2007-09-11 17:01:06 +02:00
Jonas Fonseca
0b0222d64f NNTP: Add support for handling RFC2047 encoded words
Code adapted from git's builtin-mailinfo.c file.
2007-09-11 16:59:56 +02:00
Jonas Fonseca
5d5f7fc078 NNTP: Fix group listing links having bad URL syntax due to double slashes 2007-09-11 13:50:17 +02:00
Jonas Fonseca
1961a0ca50 NNTP: HTML escape header field values 2007-09-11 13:21:00 +02:00
Jonas Fonseca
4bfd40ec10 NNTP: Use state instead of conn->state, since it hasn't been updated yet
Fixes: 1735f96a87
2006-02-08 21:04:19 +01:00
Jonas Fonseca
1735f96a87 FTP, NNTP: Normalize the cache entry before setting the connection state
... so it is normalized when the download callbacks are called.
2006-02-08 20:45:15 +01:00
Jonas Fonseca
2748d043f9 Autogenerate .vimrc files and put the master in config/vimrc
This changes the init target to be idempotent: most importantly it will now
never overwrite a Makefile if it exists. Additionally 'make init' will
generate the .vimrc files. Yay, no more stupid 'added fairies' commits! ;)
2006-01-15 18:38:58 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Jonas Fonseca
c88afeb1c2 path_to_top -> top_builddir 2005-10-20 04:00:35 +02:00
Jonas Fonseca
e39a4342d6 Include $(top_srcdir)/Makefile.lib instead of $(path_to_top)/Makefile.lib
A step towards out of tree builds ...
2005-10-20 01:11:47 +02:00
Jonas Fonseca
1efab31581 Simplify building of and linking with directories
Ditch the building of an archive (.a) in favour of linking all objects in a
directory into a lib.o file. This makes it easy to link in subdirectories
and more importantly keeps the build logic in the local subdirectories.

Note: after updating you will have to rm **/*.a if you do not make clean
before updating.
2005-09-27 21:38:58 +02:00
Jonas Fonseca
b30064c0d0 Rename targets: *-l -> *-local 2005-09-27 21:11:28 +02:00
Petr Baudis
1f0cd14e91 Converted another bunch of submakefiles to ELBuild 2005-09-16 04:07:37 +02:00
Jonas Fonseca
7462f22635 Remove now obsolete .cvsignore files. 2005-09-15 18:33:20 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00