Miciah Dashiel Butler Masters
30ccbaaf21
Add the elinks.alert method.
2005-12-18 17:49:21 +00:00
Miciah Dashiel Butler Masters
6e0d4374c1
Add the "elinks" object.
2005-12-18 17:47:54 +00:00
Miciah Dashiel Butler Masters
acb2bb80be
Create a global object.
2005-12-18 17:40:13 +00:00
Miciah Dashiel Butler Masters
60d40b7f50
Initial skeleton for SpiderMonkey scripting backend.
2005-12-18 17:40:00 +00:00
Miciah Dashiel Butler Masters
a96c0250c3
Merge textarea updates
2005-12-18 16:26:05 +00:00
Miciah Dashiel Butler Masters
d11dc65320
If the user edits a textarea with an external editor but exceeds the
...
maximum length, do not simply drop the changes, but instead truncate them,
warn the user, and provide the user with the path to the temporary file
from which the full changes can be recovered.
2005-12-18 16:23:52 +00:00
Witold Filipczyk
d09bdf7c28
Fix problem with double decompression of local files
...
ELinks tries decompress local gziped files twice, which causes problems
with some files eg. with this README.gz. This patch prevents it.
2005-12-18 17:03:34 +01:00
Miciah Dashiel Butler Masters
69f38bcbcc
After editing a textarea in an external editor, do not unlink the file
...
if it was too large to fit into the textarea.
2005-12-18 16:02:37 +00:00
Miciah Dashiel Butler Masters
9959f4d788
Fold load_textarea_file into textarea_edit.
2005-12-18 16:00:48 +00:00
Miciah Dashiel Butler Masters
517bb03da4
Add routine add_file_to_string and use it in load_textarea_file.
2005-12-18 15:56:59 +00:00
Miciah Dashiel Butler Masters
dc29fa0a0b
Add a missing bracket in report_scripting_error.
2005-12-18 15:32:11 +00:00
Jonas Fonseca
3dadc0ad46
Fix order of args passed to SEE_string_sprintf("%.*s")
2005-12-17 19:19:42 +01:00
Jonas Fonseca
6251884765
One more compile fix for evhook_use_param() macro usage
2005-12-17 18:36:46 +01:00
Jonas Fonseca
1e60feacb4
Compile fix for arg usage macro
2005-12-17 18:27:49 +01:00
Miciah Dashiel Butler Masters
5145ae266a
Follow-up for commit fdacffd113
: change
...
the Python, Ruby, and SEE hooks for pre-format-html to work properly
now that they are given a non-NUL-terminated string. Thanks to fonseca
for noticing this problem as well as that fixed by the previous commit.
2005-12-17 16:38:24 +00:00
Miciah Dashiel Butler Masters
fdacffd113
Change the pre-format event so that hooks are given the cache entry
...
instead of the URI, content, and length of the entry. Change the hooks
to use add_fragment. This should fix the memory leakage when multiple
hooks change the same document, closing bug 703.
2005-12-17 06:32:08 +00:00
Miciah Dashiel Butler Masters
35aa8119e3
In run_lua_func, pass handle_ref 0 for the unref flag so that bindings
...
will work more than once.
2005-12-17 01:42:20 +00:00
Miciah Dashiel Butler Masters
717b440f62
Add an unref flag to handle_ref so that the unreferencing is optional.
2005-12-17 01:36:26 +00:00
Miciah Dashiel Butler Masters
8edcb292cb
In l_set_option, use lua_toboolean for boolean options instead of
...
lua_tonumber. Now set_option(opt, not get_option(opt)) will always work
to toggle a boolean option.
2005-12-17 00:31:45 +00:00
Miciah Dashiel Butler Masters
35e5ec74d2
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-17 00:09:02 +00:00
Miciah Dashiel Butler Masters
fa0ce83f24
Recomment do_tab_compl_unambiguous.
2005-12-17 00:02:15 +00:00
Miciah Dashiel Butler Masters
093800d6fb
Only set match the first time since we are only interested in the common
...
substring at the start, which will be the same for all matches.
2005-12-16 23:59:04 +00:00
Miciah Dashiel Butler Masters
aad46173ae
Refactor.
2005-12-16 23:50:17 +00:00
Miciah Dashiel Butler Masters
63a71348f2
Refactor.
2005-12-16 23:48:41 +00:00
Miciah Dashiel Butler Masters
5279ea97da
Drop a funny comment.
2005-12-16 23:47:25 +00:00
Miciah Dashiel Butler Masters
20ee738904
Stop using a special value of 0 for longest_common_match to check whether
...
a match has been found and just check whether match is NULL.
2005-12-16 23:37:52 +00:00
Miciah Dashiel Butler Masters
0f8fe3f919
Define a new routine strcommonlen and use it in do_tab_compl_unambiguous.
2005-12-16 23:35:11 +00:00
Jonas Fonseca
45861c68e1
pop_dom_state(): Drop unused left-over argument
2005-12-15 22:05:30 +01:00
Jonas Fonseca
ef5d5fc27a
dom_node_cmp(): Only use element or attribute type ID if both are set
2005-12-15 22:02:02 +01:00
Jonas Fonseca
c2d27a33d8
Rename: nav -> stack
2005-12-15 17:24:20 +01:00
Jonas Fonseca
87c8a5cee4
Merge with 5ef041c051
...
Which mysteriously didn't get auto-merged when updating.
2005-12-13 20:26:06 +01:00
Jonas Fonseca
5ef041c051
Redo the assertm() message to just show the type of the node and parent
2005-12-13 20:08:58 +01:00
Miciah Dashiel Butler Masters
13f4464151
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-13 18:03:55 +00:00
Laurent MONIN
1ca88c9147
encode_multipart(): move @rd to inner scope.
2005-12-13 17:04:24 +01:00
Laurent MONIN
10aa67fb32
sort_submitted_values(): move @change abd @next to inner scope.
2005-12-13 17:01:45 +01:00
Laurent MONIN
dbcc033edb
draw_frames(): move @more to inner scope.
2005-12-13 16:59:10 +01:00
Laurent MONIN
4a930507e4
process_file_requests(): move @more, @ftl and @doc_view variables to
...
inner scope.
2005-12-13 16:57:17 +01:00
Laurent MONIN
1c7b27c99f
abort_files_load(): make @more and @ftl variables local to the loop.
2005-12-13 16:53:56 +01:00
Laurent MONIN
f331c7ac85
sort_bittorrent_peer_connections(): make @resort variable local to
...
the loop.
2005-12-13 16:52:08 +01:00
Laurent MONIN
852bdaec88
sort_queue(): make @swp variable local to the loop.
2005-12-13 16:50:04 +01:00
Jonas Fonseca
2eebef098d
Prepare the CSS scanner for tokenizing ~ and + as char tokens
...
They are used for "E ~ F" and "E + F" element relations.
2005-12-13 16:35:41 +01:00
Jonas Fonseca
d1635d6970
Fix wrong assertion message string
...
You just cannot print dom_string structs with %s.
2005-12-13 16:33:50 +01:00
Jonas Fonseca
be3223b38e
Don't try MIME handlers for application/x-bittorrent
...
It is an internally supported protocol, so it should be all internal. The
other thing was just causing headacks. Thanks to Neuromancer for suggesting
not to endeavor into another configuration nightmare. And thanks to arcatan
for requesting this for the n-th time. ;)
2005-12-13 16:32:53 +01:00
Jonas Fonseca
cd4fd51438
Compile fix, reported by zas
2005-12-13 16:28:14 +01:00
Jonas Fonseca
b2c1af1611
Add key parameter to the tracker announce URI
...
If non-empty it will be sent to the tracker. A short description of the
purpose:
* key: Optional. An additional identification that is not shared
with any users. It is intended to allow a client to prove their
identity should their IP address change.
Reported by Toksyuryel.
2005-12-13 16:16:55 +01:00
Jonas Fonseca
f35026ecfb
Add DOM_NODE_UNKNOWN node type for internal purposes only
2005-12-13 04:52:47 +01:00
Jonas Fonseca
771a2eea82
Prepare the CSS scanner for parsing [foo{|,*,^,$,}=bar] selectors
2005-12-13 04:50:30 +01:00
Miciah Dashiel Butler Masters
db5b9be213
Convert the body of activate_link to a single switch statement.
2005-12-13 00:00:08 +00:00
Miciah Dashiel Butler Masters
b191247894
Reflow some code to reduce indentation in activate_link.
2005-12-12 23:57:37 +00:00
Miciah Dashiel Butler Masters
73e3cdecd0
Factor activate_link out of enter, which now just acquires the link
...
reference, calls activate_link, and triggers the onClick event.
2005-12-12 22:58:05 +00:00
Jonas Fonseca
5ff0849eb3
set_dom_string(): take length as size_t; -1 means use strlen() to get size
2005-12-12 17:42:26 +01:00
Jonas Fonseca
27116d6385
Make the DOM stack and the SGML parser interface more general
...
They now both hold a single private data member. This means the parser now
holds the renderer data.
2005-12-12 17:41:09 +01:00
Laurent MONIN
c769b81f93
send_event(): initialize @doc_view only when needed, and prevent a
...
useless test for mouse event when event is of keyboard type.
2005-12-12 17:11:28 +01:00
Laurent MONIN
59c8dcc473
get_current_link_info(): simplify code flow.
2005-12-12 17:05:43 +01:00
Laurent MONIN
ac5441db9e
Prevent successive calls to time(), since it doesn't have much impact.
2005-12-12 17:00:08 +01:00
Jonas Fonseca
458fc5ee79
Review and change dom_string specific uint16_t value to size_t
2005-12-10 22:24:30 +01:00
Jonas Fonseca
c1136b8791
Use dom_string for storing sgml_node_info data
...
Reduces code redundancy for node searching. Oh, comment the purpose
of the special SGML_NODE_HEAD() macro.
2005-12-10 21:58:59 +01:00
Jonas Fonseca
cdc749def3
get_dom_node_value(): indent switch
2005-12-10 21:50:40 +01:00
Jonas Fonseca
86c9a37810
Factor out dom_string_casecmp()
2005-12-10 21:49:33 +01:00
Jonas Fonseca
87aad88c96
Use dom_string throughout the DOM stack interface
2005-12-10 21:42:49 +01:00
Jonas Fonseca
0fab644bee
get_dom_node_value(): move non-compliant functionality to the tree renderer
...
Entity references are supposed to have a null value and the string
compression is for improving the tree view.
2005-12-10 21:37:47 +01:00
Jonas Fonseca
52f5276f92
get_dom_node_name(): indent switch statement
2005-12-10 20:05:01 +01:00
Jonas Fonseca
295679a5e6
get_dom_node_name(): return struct dom_string *
...
Also, simplify the rendering a bit for now.
2005-12-10 20:03:43 +01:00
Jonas Fonseca
7d6db6b152
Update the DOM tree renderer to support dom_strings
2005-12-10 19:44:01 +01:00
Jonas Fonseca
2aedeb0a67
get_dom_node_type_name(): return struct dom_string *
2005-12-10 19:28:37 +01:00
Jonas Fonseca
5f69255cbc
get_dom_node_map_entry(): take name as a dom_string
...
Requires that dom_string->length becomes a size_t.
2005-12-10 19:21:12 +01:00
Jonas Fonseca
0546759b4b
Use struct dom_string for node->proc_instruction.instruction
2005-12-10 18:59:17 +01:00
Jonas Fonseca
9935bf2083
Convert some yet unused strings to use the dom_string struct
...
Also remove the unneeded path member from the dom_node_id_item struct. It
was obsoleted by the addition of dom_node->parent.
2005-12-10 18:51:08 +01:00
Jonas Fonseca
ed7a292966
Use struct dom_string for node->attribute.value
2005-12-10 18:42:54 +01:00
Jonas Fonseca
ce3778c3c0
Add struct dom_string
...
In time it should be used for all strings in the DOM engine.
For now it is just used for node->string.
2005-12-10 18:37:47 +01:00
Miciah Dashiel Butler Masters
f9dea85126
Drop a line that should have been dropped with commit
...
3719e75068
, 'Reduce code redundancy.'
2005-12-10 16:24:54 +00:00
Petr Baudis
0281f732ab
Fix broken onClick on checkboxes etc.
...
onClick on checkbox would get triggered before actually ticking the
checkbox, which is not the expected behaviour (apparently). This change
makes sure that we call the onClick event handler only after actually
doing our work with the checkbox/select widget (for the other widgets,
things should stay the same).
2005-12-10 03:48:42 +01:00
Russ Rowan
588ba7db30
fonseca: We don't do that for other downloaded files, so why add bt links?
...
(global history)
2005-12-09 19:25:06 -05:00
Jonas Fonseca
f9c8838465
The not so short BitTorrent TODO list
2005-12-09 22:43:28 +01:00
Russ Rowan
9bd00e0ad8
Added a short TODO list for fonseca.
2005-12-09 16:29:02 -05:00
Laurent MONIN
20cb9ad9ee
html_option(): optimize code.
2005-12-08 16:33:37 +01:00
Laurent MONIN
8fe86a1a63
Drop trailing spaces.
2005-12-08 16:27:51 +01:00
Laurent MONIN
3719e75068
Reduce code redundancy.
2005-12-08 16:26:37 +01:00
Laurent MONIN
1f7aa841aa
Simplify tests.
2005-12-08 16:25:22 +01:00
Laurent MONIN
d9f0de82f8
Use closing_tag variable in tests.
2005-12-08 16:22:53 +01:00
Laurent MONIN
37ec65247d
Minor code reordering.
2005-12-08 16:20:13 +01:00
Laurent MONIN
279f2bec93
Goto see instead of se.
2005-12-08 16:19:20 +01:00
Laurent MONIN
a499bf5a61
Introduce closing_tag variable.
2005-12-08 16:16:28 +01:00
Laurent MONIN
ae00f391f2
t_name -> name, t_namelen -> namelen.
2005-12-08 16:13:21 +01:00
Laurent MONIN
5f66f98b66
Prevent useless tests when @namelen is 0.
2005-12-08 16:11:19 +01:00
Jonas Fonseca
8aa078393a
Move dom_node_data union outside the dom_node struct
2005-12-08 03:26:34 +01:00
Jonas Fonseca
45958b773a
Merge with dom-stack-keep-nodes
2005-12-08 03:07:20 +01:00
Jonas Fonseca
4480a9a4cd
Removes node from the DOM tree when using the SGML stream parser
...
That should free up some short-term memory.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 03:02:27 +01:00
Jonas Fonseca
8f97dc8403
done_dom_node(): remove the node from all parent lists
...
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 02:59:40 +01:00
Jonas Fonseca
93fb17ea2a
Indent switch statement
...
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 02:32:23 +01:00
Jonas Fonseca
ce5bf8c6f8
Fix DOM node list iterators macros
...
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 02:04:13 +01:00
Jonas Fonseca
1c2f271782
Add parent member to dom_node
...
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 01:35:48 +01:00
Laurent MONIN
a1284ccd1f
skip_table(): simplify code.
2005-12-07 20:51:09 +01:00
Laurent MONIN
f3838bac5b
parse_table(): cache to_upper() result.
2005-12-07 20:36:07 +01:00
Laurent MONIN
485e16c6c9
parse_table(): optimize code a bit.
2005-12-07 20:32:36 +01:00
Laurent MONIN
53cbf3e3df
parse_table(): introduce a local variable @is_header to cache test result.
2005-12-06 15:38:34 +01:00
Laurent MONIN
90d843e8fc
parse_table(): re-order code.
2005-12-06 15:35:52 +01:00
Laurent MONIN
a00dfbecf9
parse_table(): fix missing goto see.
2005-12-06 15:32:02 +01:00
Laurent MONIN
29a80ce4eb
parse_table(): optimize even more using @closing_tag.
2005-12-06 15:19:44 +01:00
Laurent MONIN
b63dd28500
parse_table(): use strlcasecmp() instead of strncasecmp().
2005-12-06 15:17:56 +01:00