1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

514 Commits

Author SHA1 Message Date
Witold Filipczyk
4bd5106745 Killed warning. 2007-11-03 14:55:08 +01:00
Witold Filipczyk
dfceeaf99b ecmascript: Do not initialize an ecmascript interpreter unnecessarily. 2007-10-26 17:46:34 +02:00
Kalle Olavi Niemitalo
e4f0efd923 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-07 15:44:45 +02:00
Witold Filipczyk
959d94b71c ELinks no longer crash on clearTimeout. 2007-09-22 18:59:49 +02:00
Witold Filipczyk
c06122a029 Revert "Moved timeouts from document to the ecmascript_interpreter."
This reverts commit fa0fd41c94.
2007-09-21 20:18:38 +02:00
Laurent MONIN
25536d1e2f Fix compilation with --disable-css.
Compilation failed due to missing DEBUG_CSS test.
This was introduced in commit 98260f7970
2007-09-21 18:29:39 +02:00
Witold Filipczyk
fa0fd41c94 Moved timeouts from document to the ecmascript_interpreter.
This simplifies the code.
2007-09-21 01:06:20 +02:00
Witold Filipczyk
05fe38b7b2 Revert "format_html_part(): save and restore renderer_context.last_tag_for_newline too."
This reverts commit f9f149f6cc.
2007-09-19 18:42:45 +02:00
Laurent MONIN
a19239ad9a Fix compilation using --enable-html-highlight.
It was broken by commit 09cf904814.
Reported by witekfl.
2007-09-17 18:33:47 +02:00
Miciah Dashiel Butler Masters
b1ccdc9788 Introduce start_document_refreshes()
start_document_refreshes() performs the NULL-pointer checks that
previously all callers to start_document_refresh() must perform
and then calls start_document_refresh().
2007-09-14 21:08:29 +02:00
Jonas Fonseca
0da7f5a670 Move find_tag to document/document 2007-09-14 21:08:15 +02:00
Jonas Fonseca
4e9982332e Compile fix for commit e876df70d8 2007-09-14 21:05:49 +02:00
Petr Baudis
2c6afbe5e8 document/html: Make HTML parser state transparent
Before, *_html_parser_state() operated with struct html_element *. Now, it is
transparent for the renderer (just void *), so that DOM won't have to provide
this struct but will be able to use something internal.

Backported from master.
2007-09-14 21:05:34 +02:00
Petr Baudis
f8b9992674 document/html: Move enum html_special_type from parser.h to renderer.h
...since it is renderer interface.
2007-09-14 21:05:13 +02:00
Laurent MONIN
ab6e3388d9 Backport Pasky's changes concerning text_style-related stuff.
It partially includes changes made in following commits:

document/html: struct text_attrib_style -> struct text_style
commit    e133941206

document: struct format_attr -> struct text_style_format
commit    070d335796

document: Unify text style -> screen attribute handling
commit    b66d2bec67

document: Move text_style-related stuff to dedicated format.*
commit    db9431465f
2007-09-14 21:04:59 +02:00
Laurent MONIN
241b7a803c format_html_part(): group int variables declarations 2007-09-14 21:02:35 +02:00
Laurent MONIN
f9f149f6cc format_html_part(): save and restore renderer_context.last_tag_for_newline too. 2007-09-14 21:02:17 +02:00
Laurent MONIN
e01e67d546 Use explicit names for variables in format_html_part().
llm -> saved_last_link_to_move
ltm -> saved_last_tag_to_move
ef  -> saved_empty_format
lm  -> saved_margin
2007-09-14 21:01:53 +02:00
Laurent MONIN
ed21e3275c Drop useless goto/label. 2007-09-14 21:01:28 +02:00
Laurent MONIN
942fde534d Fix get_opt_bool() call and finish backport of process_head() split. 2007-09-13 20:50:51 +02:00
Miciah Dashiel Butler Masters
fe8f24b877 Reflow check_head_for_cache_control 2007-09-13 20:50:46 +02:00
Miciah Dashiel Butler Masters
0137eb6638 Factor check_head_for_cache_control out of process_head 2007-09-13 20:50:40 +02:00
Miciah Dashiel Butler Masters
be043561d1 Factor check_head_for_refresh out of process_head 2007-09-13 20:50:34 +02:00
Miciah Dashiel Butler Masters
d74dfe97b5 Fix process_head to check for cache-control information even if no refresh
Previously, process_head immediately returned if there was no refresh, never giving the cache-control check further down a chance to run.

Also add new tests:

   nocache.html
   refresh+nocache.html
2007-09-13 20:50:28 +02:00
Laurent MONIN
c01c475ede Extend Use of LWS() macro to parse_old_meta_refresh(). 2007-09-11 19:06:54 +02:00
Laurent MONIN
7f909680c4 Make meta refresh content attribute parsing more tolerant.
Simply search for 'url' marker ignoring anything
before it.
ELinks is now able to follow incorrectly written
meta refresh content attribute with missing ; before
url= parameter.
As an example, try http://akkada.tivi.net.pl/
2007-09-11 19:06:46 +02:00
Kalle Olavi Niemitalo
8cbfbe5f56 Doxygen: Escape some HTML tags. 2007-07-31 18:44:26 +02:00
Kalle Olavi Niemitalo
491f09246b Doxygen: Begin commands with @ not \. 2007-07-31 18:44:17 +02:00
Kalle Olavi Niemitalo
db13653fb0 Bug 968: Don't use copy_chars in justify_line.
All the needed memory has been allocated before the loop so we can use
copy_screen_chars() directly.  This avoids the assertion failure in
copy_chars() for width==0 and should be a bit faster too.  According
to ISO/IEC 9899:1999 7.21.1p2, memcpy() doesn't copy anything if n==0
(but the pointers must be valid).
2007-07-30 19:00:42 +02:00
Witold Filipczyk
eecba4a96c Revert "bug 968: fixed."
This reverts commit cd8008225c.
2007-07-30 19:00:21 +02:00
Witold Filipczyk
cd8008225c bug 968: fixed. 2007-07-29 16:17:11 +02:00
Kalle Olavi Niemitalo
d524b6ee6d const in css_appliers[] 2007-07-28 12:56:08 +02:00
Kalle Olavi Niemitalo
880747575a Doxygenate src/document/css/ 2007-07-28 12:56:02 +02:00
Kalle Olavi Niemitalo
9254af74ed Doxygenate src/document/ (but not subdirs)
[ With some adjustments for my branch --witekfl ]
2007-07-28 12:55:55 +02:00
Witold Filipczyk
91e143efb2 Removed one line to let the patch apply. 2007-07-28 12:55:52 +02:00
Witold Filipczyk
0e2d5fadbc Ecmascript: Use LIST_OF for timeouts. 2007-07-28 12:43:05 +02:00
Kalle Olavi Niemitalo
646e6b5c49 Declare element types of lists. 2007-07-27 18:54:13 +02:00
Kalle Olavi Niemitalo
93f8ea24f7 New macro LIST_OF for better Doxygen support. 2007-07-27 18:53:58 +02:00
Kalle Olavi Niemitalo
31dc46544d 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 20:04:08 +02:00
Witold Filipczyk
07b0598064 scan_http_equiv: Added missing CRLF to the header.
Noticed when viewing Russian docs of the flac.
2007-07-26 13:14:20 +02:00
Kalle Olavi Niemitalo
ef198d2105 CSS: Count nested blocks when skipping.
When skipping "@media print { #foo {bar: baz} pre {white-space: normal} }",
the previous code would look for the first "{" and then the first "}", and
fail to skip the "pre" rule.  Seen at support.microsoft.com.

I originally posted this change as part of attachment 383 to bug 722.
2007-07-22 18:32:07 +02:00
Kalle Olavi Niemitalo
175e26c4ea Preserve underlines in links when justifying. 2007-07-20 21:12:58 +02:00
Kalle Olavi Niemitalo
b7618e7335 CSS bug 766: Parse the id and class attributes in advance.
time elinks -no-connect -no-home 'http://rss.slashdot.org/Slashdot/slashdot/to?m=5878'
Wait until finished loading, then press q and Enter.

before	19.96user 0.16system 0:25.97elapsed 77%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3630minor)pagefaults 0swaps
after	6.46user 0.12system 0:12.66elapsed 52%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3630minor)pagefaults 0swaps
before	18.02user 0.19system 0:23.86elapsed 76%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3572minor)pagefaults 0swaps
after	5.73user 0.15system 0:10.02elapsed 58%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3628minor)pagefaults 0swaps
before	19.80user 0.15system 0:25.14elapsed 79%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3461minor)pagefaults 0swaps
after	6.28user 0.13system 0:11.91elapsed 53%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3626minor)pagefaults 0swaps
2007-07-16 21:57:39 +02:00
Kalle Olavi Niemitalo
8785ffc980 CSS: Document reparent_selector and make it static. 2007-07-16 11:32:08 +02:00
Kalle Olavi Niemitalo
abd900eeff CSS: Don't call list_empty within args of DBG. 2007-07-16 11:32:03 +02:00
Kalle Olavi Niemitalo
83d870a6d9 CSS: Move /* #define DEBUG_CSS */ to stylesheet.h.
That's where src/document/css/README says it should be.
2007-07-16 11:31:58 +02:00
Witold Filipczyk
82c832f514 DOM ecmascript: Removed unused functions. register_row does the job. 2007-07-02 11:46:01 +02:00
Witold Filipczyk
f0c720c19b DOM ecmascript: Defined getElementById. 2007-06-29 17:37:33 +02:00
Witold Filipczyk
fc8c5fa024 DOM ecmascript: register/unregister anchors, applets, forms, images and links. 2007-06-28 15:25:45 +02:00
Witold Filipczyk
6efff6f21d DOM ecmascript: Defined properties of HTMLDocument. 2007-06-28 14:47:35 +02:00