1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00
Commit Graph

222 Commits

Author SHA1 Message Date
Witold Filipczyk
257422f28c Reorganisation of code to make C++ happy 2016-04-20 22:21:31 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +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
Witold Filipczyk
d2513cdfbb Added $(EXEEXT) for executables. 2010-03-22 09:35:15 +01:00
Kalle Olavi Niemitalo
6dfc25f5d2 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS
	src/config/options.c (session-specific options vs. TERM_* constants)
2009-04-26 17:16:00 +03:00
Kalle Olavi Niemitalo
b4567b402b Bug 1071: Add precautionary assertions and recovery 2009-04-05 20:59:41 +03:00
Kalle Olavi Niemitalo
b7f45ca80b Bug 1071: Add NULL check in get_dom_node_list_index
If the parent parameter of get_dom_node_list_index referred to a node
that did not have children, then get_dom_node_list called by it could
return the address of a null pointer, and get_dom_node_list_index would
then pass that null pointer to get_dom_node_list_pos, which would crash.
That would be the same kind of crash as the one in get_dom_node_child.
It never happened in practice though: because all calls are in the form
get_dom_node_list_index(node->parent, node), the list must contain at
least the given node, and the pointer cannot be null.  The documentation
of get_dom_node_list_index allows arbitrary nodes as arguments however,
so it's best to add a check.
2009-04-04 22:41:43 +03:00
Kalle Olavi Niemitalo
0c1a27ee99 Bug 1071: Document get_dom_node_value return values 2009-04-04 22:38:56 +03:00
Kalle Olavi Niemitalo
8465b19d0c Bug 1071: Fix null-ptr crash in get_dom_node_child
struct dom_node contains a union that contains various structs that
have members of type struct dom_node * in them.
get_dom_node_list_by_type returns the address (struct dom_node **) of
one of those members, or NULL.  However the member itself can also be
NULL if no nodes have been added to the list and the list has thus not
yet been allocated.  (add_to_dom_node_list lazily allocates the lists.)
get_dom_node_child did not expect a null pointer there and crashed, as
shown in bug 1071.  Fix by adding a check so that it treats a NULL list
as an empty list.
2009-04-04 21:56:53 +03:00
Kalle Olavi Niemitalo
ece4bfcc28 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/document/dom/renderer.c (split into rss.c, source.c)
2009-02-15 05:08:06 +02:00
Kalle Olavi Niemitalo
eb820a57a6 bug 1067: Assertions and comments about done_dom_node().
In bug 1067, dom_rss_pop_document() freed a node with done_dom_node()
even though call_dom_node_callbacks() was still using that node.  This
made call_dom_node_callbacks() read a function pointer from beyond the
end of an array and call that.  Add assertions to detect out-of-range
node types, and comments to warn about the bug.
2009-02-15 03:39:00 +02:00
Miciah Dashiel Butler Masters
aedc4c3e37 CSS: do not fail assertion on "url( )"
A style-sheet containing the string "url( )" with 1 or more characters of
whitespace in between the parentheses triggered an assertion failure in
scan_css_token.

scan_css_token would find the left parenthesis, find the right parenthesis,
and then scan forwards from the left parenthesis for a non-whitespace
character to find the start of the URL and backwards from the right
parenthesis to find the end of the URL.  If there were whitespace and
nothing else, the start would be past the end, the routine would compute a
negative length for the URL, and then the routine would trigger an
assertion failure.  Now the routine simply enforces a lower bound of length
0 for the URL.
2008-12-25 07:16:02 +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
Kalle Olavi Niemitalo
aaf6be8a36 Bug 1004: Fix implicit declarations of c_* functions
Add #include directives to fix these errors:

      [CC]   src/intl/gettext/l10nflist.o
cc1: warnings being treated as errors
.../src/intl/gettext/l10nflist.c: In function ‘_nl_normalize_codeset’:
.../src/intl/gettext/l10nflist.c:352: error: implicit declaration of function ‘c_tolower’

      [CC]   src/dom/css/scanner.o
cc1: warnings being treated as errors
In file included from .../src/dom/scanner.h:4,
                 from .../src/dom/css/scanner.h:4,
                 from .../src/dom/css/scanner.c:12:
.../src/dom/string.h: In function ‘dom_string_casecmp’:
.../src/dom/string.h:34: error: implicit declaration of function ‘c_strncasecmp’
2008-11-01 22:27:08 +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
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
Jonas Fonseca
26e8e52f23 Fix sgml-parser so it compiles
The test does however segfault in the incremental parsing test.
2008-07-03 01:45:45 +02:00
Jonas Fonseca
1bd98053b0 Fix memory leak in the DOM configuration module
... by making the (only) user (which is the RSS renderer) responsible
allocation of the dom_config structure.
2008-06-21 00:19:15 +02:00
Jonas Fonseca
0240c469b7 Merge branch 'elinks-0.12'
Conflicts:

	src/document/dom/renderer.c
2007-09-09 18:25:49 +02:00
Jonas Fonseca
bbd7c8354a Move get_test_opt to util/test.h and use throughout test programs 2007-08-28 20:34:17 +02:00
Jonas Fonseca
c6a223c8dd dom/test: properly test test option matches in get_test_opt 2007-08-28 20:22:29 +02:00
Jonas Fonseca
5d88ea78f9 dom/test: rename get_opt to get_test_opt to avoid namespace problems 2007-08-28 20:16:27 +02:00
Jonas Fonseca
0f53941fef Introduce test library in util/test.h containing the die() function
Fix the die() function to exit with EXIT_FAILURE value as pointed
out by Kalle on elinks-dev in <87tzqkxhlp.fsf@Astalo.kon.iki.fi>.
2007-08-28 20:14:08 +02:00
Miciah Dashiel Butler Masters
3975d28bce Merge commit 'origin/elinks-0.12'
Conflicts:

	doc/Doxyfile.in
	src/protocol/bittorrent/common.h
2007-08-28 14:47:39 +00:00
Jonas Fonseca
b831ee64aa Fix dom_node_attribute comment mentioning non-existant struct
Noticed by kon.
2007-07-31 14:37:41 +02:00
Kalle Olavi Niemitalo
2437d35904 Merge commit 'pasky.or.cz/elinks-0.12' into elinks-0.13
There were conflicts in src/document/css/ because 0.12.GIT switched
to LIST_OF(struct css_selector) and 0.13.GIT switched to struct
css_selector_set.  Resolved by using LIST_OF(struct css_selector)
inside struct css_selector_set.
2007-07-28 03:22:29 +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
585f8b426b Doxygen syntax fixes
Fix warnings:
dom/stack.h:70: Warning: explicit link request to 'pop_dom_node' could not be resolved
dom/stack.h:71: Warning: explicit link request to 'pop_dom_nodes' could not be resolved
dom/stack.h:71: Warning: explicit link request to 'pop_dom_state' could not be resolved
dom/stack.h:115: Warning: explicit link request to 'done_dom_node' could not be resolved

Use @returns instead of \return in src/document/css/parser.c,
and other such things.
2007-07-26 14:14:27 +03:00
Kalle Olavi Niemitalo
eccc8c23f0 Merge with http://elinks.cz/elinks.git#elinks-0.12 2007-07-09 16:03:06 +03:00
Jonas Fonseca
ba66ff37db Simplify TESTDEPS maintainance by adding common objects in Makefile.lib 2007-05-26 14:04:29 +02:00
Jonas Fonseca
56f692ef08 DOM test: add test/ to SUBDIRS so DOM test is run for 'make test' 2007-05-26 13:10:55 +02:00
Jonas Fonseca
67188584ea DOM test: make die() in sgml-parser static 2007-05-26 13:08:03 +02:00
Jonas Fonseca
ad6addbd92 DOM test: refactor options parsing in sgml-parser
Introduce get_opt() to do the tedious work of getting the right
argument for options expecting them and handles both '--opt=arg'
and '--opt arg'. As a side effect it also removes an unneeded
assignment of the source string for stdin.
2007-05-26 12:40:06 +02:00
Jonas Fonseca
17a76257f8 Use printf to handle test string containing escapes more portable
Works with both bash and dash. This reintroduces the fix to the
test-sgml-parser-basic test, and also fixes test-sgml-parser-incremental
and test-sgml-parser-lines, which Witek has reported as failing.
2007-05-26 10:42:51 +02:00
Jonas Fonseca
113077ce00 Revert "Refactor test-sgml-parser-basic to work with non-bash shells"
This reverts commit 3f93148c9b.
2007-05-26 10:26:38 +02:00
Jonas Fonseca
3f93148c9b Refactor test-sgml-parser-basic to work with non-bash shells
A problem with \n replacement caused test no. 19 to fail.
Fix it by also allowing expected output to be prepared in a
file by introducing a new backend: test_output_equals_file,
also used test_output_equals.

Tested on Ubuntu Feisty Fawn with both /bin/bash and /bin/sh
where /bin/sh failed before the fix. Reported by Witek.
2007-05-05 11:39:23 +02:00
Jonas Fonseca
1d62835148 Make non-standard pluginspage attribute to embed hyperlinkable
Appears on page reachable from links on
http://www.gilbertogil.com.br/sec_discografia_view.php?id=17
2007-04-27 16:25:36 +02:00
Kalle Olavi Niemitalo
976f06ddf8 ELinks 0.13.GIT.
There is a now separate elinks-0.12 branch for the upcoming 0.12.0 release.
2007-04-22 19:50:15 +03:00
Kalle Olavi Niemitalo
801d520ddd Fix compiler errors without HAVE_VARIADIC_MACROS. 2007-03-11 12:22:02 +02:00
Jonas Fonseca
47d27a4d39 DOM: rename init_dom_node_ to init_dom_node_at and cleanup the declaration
Only use the __FILE__ and __LINE__ parameters when DEBUG_MEMLEAK is defined
so that they do not end up in the generated documentation.
2006-12-11 21:21:30 +01:00
Jonas Fonseca
1435211cf6 DOM: add Doxyfile for generating DOM implementation documentation
Optimized for Doxygen version 1.5.1 ...
2006-12-11 21:04:38 +01:00
Jonas Fonseca
6df4df9cc4 DOM: start documenting the node module 2006-12-11 20:59:52 +01:00
Jonas Fonseca
a89ab52ebd Start writing a DOM stack 101 2006-12-10 18:24:34 +01:00
Jonas Fonseca
93e9cf089e DOM: Change code documentation to be Doxygen "compliant" 2006-12-10 01:17:35 +01:00
Jonas Fonseca
4d248638be Remove empty first lines; a remnant from when CVS Id tags was in play 2006-12-09 22:54:22 +01:00
Jonas Fonseca
640d73b7db Cast indentation counter to int to fix compilation on Mac OS X
The error was:

sgml-parser.c: In function 'print_indent':
sgml-parser.c:99: warning: field precision should have type 'int', but argument 2 has type 'long unsigned int'
2006-12-03 20:45:01 +01:00
Laurent MONIN
5acb5e6663 Trim trailing whitespaces. 2006-05-31 19:34:49 +02:00
Miciah Dashiel Butler Masters
190259ca22 mem_alloc_align: drop the obj type parameter
Instead use the object itself, i.e., replace typeof(obj) with
typeof(**ptr).
2006-02-17 17:32:59 +00:00
Jonas Fonseca
1b4bee7a82 DOM: Change struct dom_string length member from size_t to unsigned int
Requested-by: Miciah
2006-02-10 01:25:48 +01:00
Jonas Fonseca
4a27637529 DOM: Cleanup the unused parts of the node interface
Take a quick stroll through the unchartered corners of the DOM node data
structures:

 - Remove ununsed struct dom_node_id_item.
 - Make the document node reference a future struct dom_document.
 - Describe ideas for node data, e.g. the entity reference node should use
 it for storing the unicode_val_T.
2006-02-03 10:44:27 +01:00