1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-06 23:44:43 -04:00
Commit Graph

151 Commits

Author SHA1 Message Date
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
d8be2c505e Rename struct box to struct el_box.
In the future I want to copy some code from netsurf, so I'm preparing.
2018-09-09 19:14:56 +02:00
Witold Filipczyk
6f001ea50f Check for NULL to avoid segmentation fault.
Entering in cookie dialog expires:
123456789012345678
and then Info button, caused segfault.
2018-08-18 20:53:40 +02:00
Felix Janda
336e596a83 Rename VA_COPY to va_copy
With this, the C99 standard macro va_copy is used when available
instead of the prestandard __va_copy.
2017-11-23 19:18:20 -05:00
Felix Janda
9555619c50 Remove __va_copy configure test
__va_copy is a macro and can be detected via #ifdef.
2017-11-23 19:15:35 -05:00
Witold Filipczyk
257422f28c Reorganisation of code to make C++ happy 2016-04-20 22:21:31 +02: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
Witold Filipczyk
67673f5fe5 new -> new_ for C++ compatibility 2016-04-20 18:42:22 +02:00
Witold Filipczyk
2e721e051a template -> template_ for C++ compatibility 2016-04-20 18:05:00 +02:00
witekfl
91515990c8 Removed --with-gc and CONFIG_GC related code.
CONFIG_GC was added with SEE, but SEE support was removed, so
I don't see the reason to keep gc.
2013-05-14 15:36:32 +02:00
witekfl
e58fc7e2cb Show fractions of MiBs in download progress dialogs.
It is useful especially for slow links.
2012-05-08 13:29:20 +02:00
witekfl
d94d9720a1 Use snprintf instead of sprintf. One warning less. 2010-09-19 14:13:28 +02:00
Witold Filipczyk
00ebb8ef4b SMB directory listing looks like normal directory listing. 2010-09-06 18:38:36 +02:00
Witold Filipczyk
f60d85c4c1 Use long long in place of long in conv.c to allow show size of files bigger
than 2GiB in the download dialog. Also let regetting big files.
Previously the Content-Length variable in http.c was int, what is
not enough. Now it is long long.
2010-09-04 14:10:51 +02:00
Witold Filipczyk
b10144e5b4 Working implementation of mkstemp on Windows. 2010-03-21 21:44:57 +01: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
Kalle Olavi Niemitalo
683cfe4c86 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS: merged
	configure.in: VERSION changed in elinks-0.12; kept 0.13.GIT
	doc/man/man1/elinks.1.in: regenerated
	doc/man/man5/elinks.conf.5: regenerated
	doc/man/man5/elinkskeys.5: regenerated
	po/fr.po: kept 0.13.GIT
	po/pl.po: kept 0.13.GIT
2009-05-31 16:18:23 +03:00
Kalle Olavi Niemitalo
5aae1b81cc Define die() with __attribute__((noreturn))
This will prevent some compiler warnings in the test I'm about to
commit.
2009-05-27 01:11:03 +03:00
Kalle Olavi Niemitalo
34f8f6a58f Merge branch 'elinks-0.12' into master
Conflicts:
	NEWS (merged)
	configure.in (merged)
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/af.po (used elinks-0.12)
	po/be.po (used elinks-0.12)
	po/bg.po (used elinks-0.12)
	po/ca.po (used elinks-0.12)
	po/cs.po (used elinks-0.12)
	po/da.po (used elinks-0.12)
	po/de.po (used elinks-0.12)
	po/el.po (used elinks-0.12)
	po/es.po (used elinks-0.12)
	po/et.po (used elinks-0.12)
	po/fi.po (used elinks-0.12)
	po/fr.po (used master)
	po/gl.po (used elinks-0.12)
	po/hr.po (used elinks-0.12)
	po/hu.po (used elinks-0.12)
	po/id.po (used elinks-0.12)
	po/is.po (used elinks-0.12)
	po/it.po (used elinks-0.12)
	po/lt.po (used elinks-0.12)
	po/nb.po (used elinks-0.12)
	po/nl.po (used elinks-0.12)
	po/pl.po (used master)
	po/pt.po (used elinks-0.12)
	po/pt_BR.po (used elinks-0.12)
	po/ro.po (used elinks-0.12)
	po/ru.po (used elinks-0.12)
	po/sk.po (used elinks-0.12)
	po/sr.po (used elinks-0.12)
	po/sv.po (used elinks-0.12)
	po/tr.po (used elinks-0.12)
	po/uk.po (used elinks-0.12)
2009-03-29 18:26:20 +03:00
Kalle Olavi Niemitalo
d7d18e4e43 bug 1047: inline functions C99 conformance
C99 6.7.4p3 and 6.7.4p6 set some constraints on what can be done in
inline functions and how they can be declared.  In particular, any
function declared inline must also be defined in the same translation
unit.  To comply with that, remove inline specifiers from function
declarations in header files when the functions are not also defined
in those header files.

Sun Studio 11 on Solaris 9 is stricter than C99 and does not allow
references to static identifiers in extern inline functions.  Make the
configure script detect this and define NONSTATIC_INLINE accordingly
in config.h.  Then use that in the definitions of all non-static
inline functions.

Document the restrictions and this scheme in doc/hacking.txt.
2009-03-28 20:15:08 +02:00
Kalle Olavi Niemitalo
d2854dca8d Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bookmarks/backend/default.c
	src/bookmarks/bookmarks.c
	src/session/session.c
	src/terminal/event.c
	src/viewer/text/search.c
2009-02-08 22:02:57 +02:00
Kalle Olavi Niemitalo
03b112796d bug 153, 1066: Add codepage parameter to update_bookmark().
This also makes the bookmark-update event carry strings in UTF-8.
The only current consumer of that event is bookmark_change_hook(),
which ignores the strings, so no changes are needed there.
2009-02-08 18:26:18 +02:00
Kalle Olavi Niemitalo
687f19dbde Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bfu/dialog.c
	src/bfu/hotkey.c
	src/bfu/inpfield.c
	src/dialogs/options.c
	src/document/renderer.c
	src/intl/gettext/libintl.h
	src/protocol/http/codes.c
	src/session/task.c
	src/terminal/event.c
	src/terminal/terminal.h
	src/viewer/text/form.c
	src/viewer/text/link.c

And a semantic conflict in src/terminal/terminal.c.
2009-01-01 19:14:01 +00:00
Kalle Olavi Niemitalo
8f4d7f9903 Define cp_to_unicode() even without CONFIG_UTF8.
And make its last parameter point to const.  add_cp_html_to_string()
no longer needs to pretend UTF-8 is ISO-8859-1.
2009-01-01 16:17:03 +00:00
Peter Collingbourne
93ba527924 Fixed compiler errors and warnings in src/util/random.c where CONFIG_SSL undefined
The patch also adds the name of the author of the patch to the
contributor list.
2008-11-09 20:04:02 +02:00
Kalle Olavi Niemitalo
88315a7112 Merge branch 'elinks-0.12' into elinks-0.13 2008-11-02 22:38:22 +02:00
Kalle Olavi Niemitalo
c56f3928ec Bug 1004: Rewrite FSF code to avoid GPLv2 2. c)
c_strcasecmp and c_strncasecmp were taken from GNU coreutils 6.9,
which is copyrighted by the Free Software Foundation and licensed
under GNU GPL version 2 or later.  It seems the programs in coreutils
do not normally read commands interactively.  So, including coreutils
code in an interactive program such as ELinks could trigger GPLv2
section 2. c), which would require ELinks to display a copyright
notice and a warranty disclaimer each time it is started.  Rewrite
those functions to remove the FSF-copyrighted code and make ELinks
not a work based on GNU coreutils.

Avoiding FSF code has the additional benefit that we won't have to ask
FSF for permission if we want to add a licence exception that allows
linking ELinks with OpenSSL.  So it seems a good idea even if my
interpretation of GPLv2 2. c) is overly strict.  I haven't checked
though whether there are other FSF-copyrighted portions in ELinks.
2008-11-02 22:15:38 +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
20a7a6c460 Patch 3: Further fixes including strcasestr and convert_to_lowercase 2008-11-01 22:32:43 +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
M. Vefa Bicakci
85c26ddc45 Patch 0: Partial modification of the HTML parser and modification of the FastFind subsystem
[Forward ported to 0.12 from bug 1004 attachment 500.  --KON]
2008-10-26 16:13:38 +02:00
Kalle Olavi Niemitalo
7a72a685e5 1008: Centralize random numbers.
If ELinks is being linked with SSL library, use its random number
generator.

Otherwise, try /dev/urandom and /dev/prandom.  If they do not work,
fall back to rand(), calling srand() only once.  This fallback is
mostly interesting for the Hurd and Microsoft Windows.

BitTorrent piece selection and dom/test/html-mangle.c still use rand()
(but not srand()) directly.  Those would not benefit from being
unpredictable, I think.
2008-05-25 18:44:21 +03:00
Kalle Olavi Niemitalo
d26c8cf836 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS (bug 939 was listed twice)
	doc/man/man5/elinks.conf.5 (regenerated)
	po/fr.po (only in comments and such)
	po/pl.po (only in comments and such)
	src/protocol/fsp/fsp.c (the relevant changes were already here)
2008-04-28 22:08:19 +03:00
Witold Filipczyk
f994ef4335 mkalldirs: Reset ret when errno is EEXIST.
This bug was revelead while using bittorrent.
For filenames started with a dot and two slashes .//
the open_bittorrent_file returned -1 and set errno to EEXIST.
2008-03-29 18:41:22 +02:00
Kalle Olavi Niemitalo
dae9b988f6 const in scanner
So that render_dom_document_start() is better assured that
default_colors[] won't be modified by the CSS code.
2008-01-26 18:20:17 +02:00
Kalle Olavi Niemitalo
4138b401ca Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	src/document/css/stylesheet.c
	src/document/css/stylesheet.h
2008-01-26 18:15:33 +02:00
Kalle Olavi Niemitalo
0689443ad2 const in map_scanner_string 2008-01-26 17:57:14 +02:00
Kalle Olavi Niemitalo
f02e471762 const in decode_color 2008-01-26 17:53:14 +02:00
Kalle Olavi Niemitalo
3f508a9803 const in fastfind_search 2008-01-26 17:52:22 +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
Kalle Olavi Niemitalo
e2cc0bd434 Don't cast qsort comparison function pointers.
Instead, convert the element pointers inside the comparison functions.

The last argument of qsort() is supposed to be of type
int (*)(const void *, const void *).  Previously, comp_links() was
defined to take struct link * instead of const void *, and the type
mismatch was silenced by casting the function pointer to void *.
This was in principle not portable because:

(1) The different pointer types may have different representations.
    In a word-oriented machine, the const void * might include a byte
    selector while the struct link * might not.

(2) Casting a function pointer to a data pointer can lose bits in some
    memory models.  Apparently this does not occur in POSIX-conforming
    systems though, as dlsym() would fail if it did.

This commit also fixes hits_cmp() and compare_dir_entries(), which
had similar problems.  However, I'm leaving alias_compare() in
src/intl/gettext/localealias.c unchanged for now, so as not to diverge
from the GNU version.

I also checked the bsearch() calls but they were all okay, apart from
one that used the alias_compare() mentioned above.
2007-10-06 23:05:05 +03:00
Laurent MONIN
b389d1b20e Revert "Use the new OBJS-unless$(CONFIG_FOO) instead of $(call not,...)"
This reverts commit e07354f5d5.
2007-09-14 17:43:36 +02:00
Jonas Fonseca
e07354f5d5 Use the new OBJS-unless$(CONFIG_FOO) instead of $(call not,...) 2007-09-14 16:48:26 +02:00
Laurent MONIN
6c6e75a71d Trim trailing whitespaces. 2007-09-14 15:14:34 +02:00
Laurent MONIN
f0e66866f5 Trim trailing whitespaces. 2007-09-14 15:12:32 +02:00
Laurent MONIN
ee503f6c00 Prevent internal errors when terminal width or height are very small
(1x1 was fatal).
2007-09-14 11:49:03 +02:00
Jonas Fonseca
0240c469b7 Merge branch 'elinks-0.12'
Conflicts:

	src/document/dom/renderer.c
2007-09-09 18:25:49 +02:00
Kalle Olavi Niemitalo
af14d00d17 Add missing va_ends.
I'm not sure they're needed anywhere nowadays, but still.
2007-09-03 21:01:11 +03:00