1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00
Commit Graph

66 Commits

Author SHA1 Message Date
Witold Filipczyk
fe8d8d6af0 [cache] Renamed cache.cpp -> cache.c 2023-11-25 13:29:23 +01: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
172c32a64c [cpp] All files suspected for any C++ relation renamed to cpp
Now (in meson) .c files are compiled by C compiler and .cpp by C++ compiler.
2022-07-31 16:44:11 +02:00
Witold Filipczyk
a576245561 [cache] const in redirect_cache 2022-02-21 17:13:14 +01:00
Witold Filipczyk
44f0adb1cb [cache] enum cache_mode -> cache_mode_T 2022-01-28 17:32:27 +01:00
Witold Filipczyk
86a40432e0 [cache] cast 2022-01-25 17:08:06 +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
022a066201 [mem_mmap_alloc] cast 2022-01-17 16:07:44 +01:00
Witold Filipczyk
881f896e85 [mem_calloc] Cast 2022-01-16 21:08:50 +01:00
Witold Filipczyk
0e8ee7876a [uri] 0 -> URI_NONE in get_uri to decrease number of warnings 2022-01-14 20:52:17 +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
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
5b2efc8976 Compilation fix for C++ 2016-04-20 20:33:32 +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
Miciah Dashiel Butler Masters
4eb7827fe5 Call follow-url hook on redirects
In redirect_cache, call the follow-url hook so that scripts can modify
URIs in redirects.
2011-11-14 04:34:50 +00:00
Miciah Dashiel Butler Masters
2b1aedf6d1 Cache manager: Add 'Search contents' button
Add a 'Search contents' button to the cache manager that searches
through the cache items' data rather than their metadata.

Add match_cache_entry_contents.

Add push_cache_hierbox_search_button and
push_cache_hierbox_search_contents_button, which call
push_hierbox_search_button after setting box->ops to either
cache_entry_listbox_ops or cache_entry_listbox_ops_match_contents,
respectively, which define the appropriate match callback for the
hierbox search code.

Add strlcasestr, used in the new match_cache_entry_contents routine.
2009-06-18 18:09:19 +00:00
Miciah Dashiel Butler Masters
0ad5b642b4 Cache manager: Add "Invalidate" button
Add an "Invalidate" button to the cache manager, which is useful when
a cache entry is locked and cannot be deleted but one does not want
ELinks to use that cache entry.
2009-06-18 17:59:37 +00: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
20a7a6c460 Patch 3: Further fixes including strcasestr and convert_to_lowercase 2008-11-01 22:32:43 +02:00
Kalle Olavi Niemitalo
018af50f1d Rename cache_entry.id and related members.
cache_entry.id => cache_entry.cache_id
document.id => document.cache_id
ecmascript_interpreter.onload_snippets_owner => .onload_snippets_cache_id

This is a combination of:

commit 232c07aa7f
bug 1009: id variables renamed, added document_id to the document.

commit 6007043458bf8f14abfc18b9db60785bdc0279f6
Revert addition of document.document_id
2008-08-03 21:27:56 +03:00
Kalle Olavi Niemitalo
988cec481b Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS
	configure.in

The following files also conflicted, but they had not been manually
edited in the elinks-0.12 branch after the previous merge, so I just
kept the 0.13.GIT versions:

	doc/man/man1/elinks.1.in
	doc/man/man5/elinks.conf.5
	doc/man/man5/elinkskeys.5
	po/fr.po
	po/pl.po
2008-07-11 22:28:45 +03:00
Kalle Olavi Niemitalo
314a41588c Bug 951: weaken pointer from JSObject to cache_entry
The SpiderMonkey scripting module handles the "pre-format-html" event
by constructing a JSObject for the struct cache_entry and then calling
elinks.preformat_html(cache_entry, view_state) if such a function
exists.  The problem with this was that each such JSObject kept the
struct cache_entry locked until SpiderMonkey garbage-collected the
JSObject, even if the user had not defined an elinks.preformat_html
function and the JSObject was thus never needed at all.  To work
around that, the SpiderMonkey scripting module ran a garbage
collection whenever the user told ELinks to flush caches.

Remove the SpiderMonkey scripting module's use of object_lock and
object_unlock on struct cache_entry, and instead make the pointers
weak so that ELinks can free the cache_entry whenever it wants even if
a JSObject is pointing to it.  Each cache_entry now has a pointer back
to the JSObject; done_cache_entry calls smjs_detach_cache_entry_object,
which follows the pointer and detaches the cache_entry and the JSObject
from each other.

This commit does not yet remove the workaround mentioned above.
2008-07-07 23:24:43 +03:00
Witold Filipczyk
1544b5f4b9 bug 991: fix crash when the file is already cached
If the user opens the same file again after it is in the cache, then
ELinks does not always open a new connection, so download->conn can be
NULL in init_type_query(), and download->conn->cgi would crash.
Don't read that, then; instead add a new flag cache_entry.cgi, which
http_got_header() sets or clears as soon as possible after the cache
entry has been created.
(cherry picked from commit 81f8ee1fa2)
2008-06-15 13:53:34 +03:00
Witold Filipczyk
232c07aa7f bug 1009: id variables renamed, added document_id to the document.
cached->id => cached->cache_id
document->id => document->cache_id
onload_snippets_owner => onload_snippets_document_id
Added the distinct document->document_id.
Always reset ecmascript when a document changes for example a next chunk
of it is loaded.
2008-04-27 23:22:08 +03:00
Witold Filipczyk
81f8ee1fa2 bug 991: fix crash when the file is already cached
If the user opens the same file again after it is in the cache, then
ELinks does not always open a new connection, so download->conn can be
NULL in init_type_query(), and download->conn->cgi would crash.
Don't read that, then; instead add a new flag cache_entry.cgi, which
http_got_header() sets or clears as soon as possible after the cache
entry has been created.
2008-03-15 20:49:15 +02:00
Kalle Olavi Niemitalo
3c861fd530 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	configure.in
	src/protocol/http/http.c
2008-02-24 22:49:47 +02:00
Kalle Olavi Niemitalo
61019c3130 Debian bug 464384: fix OFF_T_FORMAT mismatches on amd64
On AMD64 apparently, off_t is long but ELinks detected SIZEOF_OFF_T == 8
and defined OFF_T_FORMAT as "lld", which expects long long and so causes
GCC to warn about a mismatching format specifier.  Because --enable-debug
adds -Werror to $CFLAGS, this warning breaks the build.  When both
SIZEOF_LONG and SIZEOF_LONG_LONG are 8, ELinks cannot know which type
it should use.

To fix this, do not attempt to find a format specifier for off_t itself.
Instead cast all printed off_t values to a new typedef off_print_T that
is large enough, and replace OFF_T_FORMAT with OFF_PRINT_FORMAT which
is suitable for off_print_T altough not necessarily for off_t.  ELinks
already had a similar scheme with time_print_T and TIME_PRINT_FORMAT.
2008-02-10 11:30:27 +02:00
Miciah Dashiel Butler Masters
34c9389e9b Display cache mode in the cache manager's info box for cache entries 2007-09-04 11:54:18 +00: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
96176a8c77 Declare element types of lists. 2007-07-26 22:47:23 +03:00
Kalle Olavi Niemitalo
d3d2bb26c5 New macro LIST_OF for better Doxygen support. 2007-07-26 22:45:51 +03:00
Kalle Olavi Niemitalo
d7e4b57146 Make instances of struct listbox_ops const. 2007-02-04 15:17:49 +02:00
Kalle Olavi Niemitalo
a5e321cb2b Make instances of struct hierbox_browser_button const.
And explicitly disable the "Save" buttons in anonymous mode,
even though they are currently inside #if 0.
2007-02-04 13:54:07 +02:00
Miciah Dashiel Butler Masters
33ba13fcbc Comment fix: s/stricktest/strictest/
Fix a spelling error in a comment noted by Quiznos on IRC.
2006-11-26 12:43:45 +00:00
Petr Baudis
c7863324e0 Support for document.cache.interval (set it to -1) and rename it
...to document.cache.revalidation_interval. Moreover, -1 is the default
now.
2006-11-03 19:56:55 +01:00
Witold Filipczyk
4bf3e2693b "If-Modified-Since" second approach.
Added document.cache.interval option. When time elapsed since previous access
to the document is less than interval then the document is taken from
the cache. Otherwise the request with filled "If-Modified-Since" and/or
"If-None-Match" header field is sent. By default interval is set to 10 minutes.
This requires the correct time to be set on your machine.
2006-10-26 11:53:30 +02:00
Witold Filipczyk
8d6a73646b Commented code related to "If-Modified-Since" (infinite loop). 2006-10-12 14:07:58 +02:00
Witold Filipczyk
cc6c59d932 Handling If-Modified-Since. 2006-10-08 16:24:47 +02:00
Jonas Fonseca
b9908b4622 Use internal OFF_T_FORMAT instead of PRId64
... since the latter is for printing int64_T and we don't check for that and
we use PRId64 only for printing values having the off_t types.

Besides off_t has it's own ELinks specific defaults so it should be safer
to use an internal format string. If off_t is 8 bytes use "lld" else use
"ld".

Reported-by: Andy Tanenbaum <ast@cs.vu.nl>
2006-08-05 00:43:34 +02:00
Witold Filipczyk
cad9bf3010 osdep/osdep.h was superfluos 2006-07-02 09:16:28 +02:00
Witold Filipczyk
3fd1ac87bd STRING_DIR_SEP in file redirects 2006-07-02 09:01:14 +02:00
Kalle Olavi Niemitalo
d10a489a14 BFU: Mark format strings in struct listbox_ops_messages.
With regular comments in the definition of the structure itself,
and with xgettext:c-format comments in constants of that type,
if xgettext would otherwise guess wrong; so that translators
will know they'll have to double any percent signs they add.
I didn't regenerate PO files, though.
2006-06-02 19:08:09 +00:00
Witold Filipczyk
b3acfd79f2 Fixes cache-control issue. See elinks-users mail from 28 Oct 2005 2006-03-21 16:17:56 +01:00
Kalle Olavi Niemitalo
b1f8756c59 Merge with http://elinks.cz/elinks.git 2006-02-05 17:48:43 +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