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

39 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
c2182097a9 [dumb] removed freshmeat , added freshcode.club (fc) 2022-02-27 16:50:52 +01:00
Witold Filipczyk
47364e12f2 [rewrite] const in rewrite_uri 2022-02-21 17:36:39 +01:00
Witold Filipczyk
cba95b2b30 [event] union for const/non-const void * 2022-01-30 19:19:20 +01:00
Witold Filipczyk
2fa67c5730 [char] Introduced macro C_
C_("aaaa") -> (char *)("aaaa")
2022-01-19 22:49:13 +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
b434b11309 [options] 0 (option_flags) -> OPT_ZERO 2022-01-15 20:10:37 +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
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
Guido Cella
0d8d834af3 [rewrite] Update prefixes 2020-07-05 05:58:25 +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
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Kalle Olavi Niemitalo
642e164ec3 rewrite: update default dumb and smart prefixes
DELETED:

* dumb {b}, smart {bb, bb_fr_en, bb_en_fr}: Redirects to Microsoft
  Translator, which I can't get to work without JavaScript.  Deleted.

* dumb {pyhelp}, smart {py, pydev}: Deleted as recommended by the
  author of the CGI script.

* dumb {pyvault, lyrics}, smart {pyvault}: Can't find a new URL for the
  service.  Deleted.

* smart {gd}: Google Directory has been shut down.  Deleted.

* smart {sd, sdc, sdu, sdp, sdj, whatis}: These don't seem to work
  without JavaScript.  Deleted.

* smart {id, draft}: The search still exists but I can't get it to
  take the words from the URL.  Deleted.

UPDATED:

* dumb {cia}: Had changed its URL, and the service is down, but they
  intend to restore it.  Updated and kept.

* dumb {lua}: ELinks no longer supports Lua 4.0.  Changed to 5.1 as
  installed by Debian.

* smart {cliki, foldoc, gwho, gwhat, gwhere, gwhen, a, imdb, wn, fsd,
  rfcs, cr}: Updated URLs.
2012-11-30 09:24:53 +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
Kamil Dudka
a96d8a17e5 rewrite: add default "ddg" dumb/smart prefixes for DuckDuckGo
... and mention that URI rewriting rules may leak ELinks' identity
in the documentation of protocol.http.user_agent.

Originally requested at <https://bugzilla.redhat.com/856348>.
2012-10-05 14:05:13 +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
bff789d421 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	doc/elinks.conf.5.txt
	src/mime/dialogs.c (resolved by Witold Filipczyk)
2008-03-08 15:35:12 +02:00
Jonas Fonseca
e04b420897 Minor fixes and improvements to option strings
This syncs some changes (ie. -> e.g. etc.) from elinks-0.12 or beyond.
I noticed them while updating the web pages, and apologize that I will
not spent the time to attribute it to the individual commits.

(cherry picked from commit 2bfc7b3724,
 omitting generated files)
2008-03-06 10:31:20 +02:00
Kalle Olavi Niemitalo
af9ed54c0f Merge branch 'elinks-0.12' into elinks-0.13 2008-03-01 17:28:37 +02:00
Kalle Olavi Niemitalo
8b5de30f72 Bug 1001: fix uninitialized-pointer crash in URI rewriting
(cherry picked from commit 6d2e034007)
2008-03-01 16:09:41 +02:00
Miciah Dashiel Butler Masters
13523248ed Merge commit 'origin/elinks-0.12'
Conflicts:

	po/fr.po
	src/document/dom/renderer.c
	src/document/html/parser.c
	src/document/options.c
	src/document/refresh.c
2007-10-09 14:05:03 +00:00
Laurent MONIN
11e477a63e ELINKS_HOMEPAGE -> ELINKS_WEBSITE_URL 2007-10-03 11:23:29 +02: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
fd902e81da Rewrite wiki to en.wikipedia.org, avoid server bug.
<http://www.wikipedia.org/w/wiki.phtml?search=sue%20lawley>
incorrectly redirects to
<http://en.wikipedia.org/w/wiki.phtml?search=sue%2520lawley>
which searches for "sue%20lawley" rather than "sue lawley".
By using en.wikipedia.org directly, we avoid the server bug.
Prompted by an elinks-users post on 2007-07-27.

I asked on #wikimedia-tech, and www.wikipedia.org does always
redirect to en.wikipedia.org; it does not guess any other
language based on headers or IP addresses or such.  Also, the
redirection exists only for compatibility, and skipping it
avoids a few roundtrips to the server.  So this change is good
even if the server is eventually fixed.
2007-07-30 15:07:20 +03:00
Kalle Olavi Niemitalo
87431832be Document the syntax of protocol.rewrite.default_template. 2007-03-10 12:15:06 +02: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
Miciah Dashiel Butler Masters
59ffb72b8f Drop .or from elinks.or.cz. 2005-12-29 04:35:02 +00: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