Laurent MONIN
cf429c4ecc
FSP: trim trailing whitespaces.
2006-01-29 18:01:48 +01:00
Laurent MONIN
af2cc87054
FSP: display_entry() cleanup, and mark directories by an ending /
...
in lists.
2006-01-29 18:01:22 +01:00
Laurent MONIN
0c4bc5a362
FSP: reduce code redundancy, introducing display_entry().
2006-01-29 17:53:26 +01:00
Laurent MONIN
d07cf588bd
FSP: reduce code redundancy.
2006-01-29 17:48:09 +01:00
5511c5b748
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-29 16:51:11 +01:00
87e27b9b3e
goto_url_hook takes 2 params not 1. Some dumbprefixes defined in hooks.py
2006-01-29 14:58:03 +01:00
Jonas Fonseca
a236608554
Do not set the content type for FSP files
...
Simplify commit 8d4f44f2f1
, in particular
detecting MIME types for files. It is more consistent to do it the way
it was already done by the session/download code.
Instead, write a NUL byte to stderr when getting FSP files and only set
cache->content_type when the header string is non-empty.
Additionally it also moves close(stderr) after the fsp_error() in the
file handling part of do_fsp() so the error message is shown with the
correct type.
2006-01-29 14:27:14 +01:00
46aae704eb
Added slash to base href when directory didn't end with '/'
2006-01-29 13:22:05 +01:00
8cc828bf7c
Compilation fix
2006-01-29 12:28:05 +01:00
Jonas Fonseca
9fe0608bd2
DOM: Fix checking of out-of-bound access to scanned strings
2006-01-29 12:12:41 +01:00
Jonas Fonseca
ca5a5f230a
Make render_dom_node_source static
2006-01-29 12:11:35 +01:00
Jonas Fonseca
2e3e18595f
Normalize all links added by the plain renderer
...
Fixes problems with host or protocol parts not being lowercased. This
triggers an assertion failure when trying to download such links. Reported
by lindi-.
2006-01-29 09:04:52 +01:00
Jonas Fonseca
2918e3f595
DOM: Add STATIC_DOM_STRING macro and make INIT_DOM_STRING cleaner
2006-01-28 22:55:15 +01:00
Jonas Fonseca
58b8635caf
DOM: Add test to check that '\f' (form feed) counts as a newline
2006-01-28 22:51:52 +01:00
Miciah Dashiel Butler Masters
be07858b2b
Refactor the document.write routines
...
Factor js_document_write_do out of js_document_write and
js_document_writeln and document_write_do out of document_write and
document_write_ln.
2006-01-28 20:39:07 +00:00
Miciah Dashiel Butler Masters
5bcb1309da
Use enum connection_state
...
Use enum connection_state instead of int in load_uri,
proxy_uri, get_proxy_worker, and get_proxy_uri. See commit
d18809522e
. I hope that satisfies TCC.
2006-01-28 20:21:09 +00:00
669d4af154
Compilation fixes
2006-01-28 20:54:11 +01:00
645689f1aa
I have no idea why it is still crashing. This is last attempt
...
today to fix it
2006-01-28 19:57:40 +01:00
Jonas Fonseca
20f5b76bb2
ECMASCRIPT: Fix unused SEE specific variables when using spidermonkey
2006-01-28 18:26:45 +01:00
de468660f1
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-28 17:20:22 +01:00
71871edd43
Maybe this time it won't crash
2006-01-28 17:08:45 +01:00
Jonas Fonseca
c223f6ce94
Sed the expected output instead of the output from sgml-parser
2006-01-28 15:12:49 +01:00
Jonas Fonseca
03c467bcbf
Move URI normalization to the test library
2006-01-28 15:03:19 +01:00
7c7541f4d1
parent, self and top are the same since now
2006-01-28 14:15:55 +01:00
52d3a6411d
Sort links when necessary
2006-01-28 14:13:41 +01:00
dacb694e33
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-28 12:11:29 +01:00
997f61bb32
Use document_view instead of view_state. It is safer probably
2006-01-28 12:07:00 +01:00
9cc9db4e24
Handling onsubmit
2006-01-28 11:17:22 +01:00
6e4c80a29e
Avoid memleak
2006-01-28 08:37:58 +01:00
Jonas Fonseca
99067f0497
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-28 04:52:04 +01:00
Jonas Fonseca
b6b6d3c67e
DOM: Allocate all node strings when doing incremental rendering
...
This changes init_dom_node_() to take an allocated argument saying whether
to allocate or not. If the value is -1, node->allocated will be set to the
value of node->parent->allocated. This way the value is inherited like we
do it in the menu code. It should be a sane default since we eventually
want not to rely on the 'underlying' source of the document and there will
be less variables to pass around.
2006-01-28 04:51:25 +01:00
Jonas Fonseca
24a9d103b4
DOM: Add allocated flag to struct dom_node; replaces subtype flags
...
Prepare for handling of allocated strings in the various nodes.
2006-01-28 04:50:04 +01:00
Miciah Dashiel Butler Masters
495fb2805b
SMJS: Give user scripts access to the view_state
...
Introduce the view_state object to ECMAScript with properties .uri and
.plain and pass the current view_state to preformat hooks.
2006-01-28 03:27:45 +00:00
Jonas Fonseca
3b183c1685
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-28 03:36:47 +01:00
Jonas Fonseca
95c1de2315
Fix handling of incomplete processing instructions
...
When doing incremental rendering we now require the whole thing to be there
and that there is room for two tokens in the scanner token table. This is
necessary because we have to generate both a processing target token and a
processing data token to make life simpler for the parser.
Remove processing instruction data case label from the main parser loop. It
is safer this way since it already assumes that the processing target token
has been stored.
2006-01-28 03:35:36 +01:00
Jonas Fonseca
823c594524
Use ssize_t instead of size_t for length since it must carry a signed value
2006-01-28 03:24:16 +01:00
Jonas Fonseca
00c4e0bfa2
Do not attempt to read *string when string == scanner->end
...
There might be other places that needs to be reviewd for this.
2006-01-28 03:23:06 +01:00
Jonas Fonseca
d92a074e40
Fix parsing of '<a< b>' where the scanner didn't rewind to the proper place
...
Add test for this tag soup combo.
2006-01-28 03:21:27 +01:00
Laurent MONIN
5114c9d110
Trim trailing whitespaces.
2006-01-28 01:59:22 +01:00
Laurent MONIN
bae3b58146
Fix a potential memleak.
2006-01-28 01:58:00 +01:00
Jonas Fonseca
e5e06764c4
Improve checks for incompleteness when parsing attributes
...
Check whether there are '=' and value tokens before handling them. If there
is any doubt the whole attribute structure is 'pushed back' into the
stream. That way incremental parsing will not add the value as a new
attribute because the name token was handled in the previous parsing run.
2006-01-28 01:40:56 +01:00
Jonas Fonseca
4ab1dde874
Preserve the scanner state when it is not the 'default' state
...
This is necessary to make it possible to resume parsing of element
attributes. Allows the incomplete string in the parsing state struct to
be unset.
2006-01-28 01:24:30 +01:00
Jonas Fonseca
c6e83d1d9c
Assert parsing depth >= parser stack depth
...
Like the comment says popping parsing nodes during incremental parsing
might trigger this.
2006-01-28 01:12:03 +01:00
Jonas Fonseca
9e7b0d4fa3
Remove assertion logic from parse_sgml_attributes()
...
They are getting out of hand and making it hard to use the function in
'unusual' situations (like when resuming parsing inside elements).
2006-01-28 01:09:05 +01:00
Jonas Fonseca
1e104afbba
Improve error checking when adding nodes
...
Fail with SGML_PARSER_CODE_MEM_ALLOC.
2006-01-28 01:05:42 +01:00
Jonas Fonseca
74728cab05
Also set the node subtype for <?xml-stylesheet?>
2006-01-28 01:00:28 +01:00
Jonas Fonseca
bccf5512d6
Force an incomplete token for quoted attribute values when there's no end
2006-01-28 00:56:48 +01:00
Jonas Fonseca
a2376609e3
Expand the testing of incremental parsing
...
There are still some bugs to resolve.
2006-01-28 00:50:06 +01:00
1cd1786f9c
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-27 18:06:31 +01:00
b1b66db850
Success. document.write works for me.
2006-01-27 16:54:39 +01:00
9c9fa1d81c
Defined document.write and document.writeln for SEE
2006-01-27 14:55:53 +01:00
8bf45d0ece
Spidermonkey's document.write and document.writeln defined. They work,
...
but rendering doesn't work
2006-01-27 13:29:38 +01:00
2551fe3525
Render html written by document.write. I'm not sure if format_html_part
...
is called right way
2006-01-27 12:41:35 +01:00
62d42380f8
Added ret param for document.write
2006-01-27 12:07:45 +01:00
2f0490cb04
Eval embedded scripts at once
2006-01-27 10:26:58 +01:00
6761b3995d
Avoided code duplication
2006-01-27 10:08:19 +01:00
Jonas Fonseca
0f8aa77ebb
Add test for incremental SGML parsing
...
It is a loop that parses the same small document with various read sizes.
The sgml-parser program is updated to take --stdin option taking a the read
size as a required parameter.
2006-01-27 07:49:15 +01:00
Jonas Fonseca
b25cd27232
Add support incremental parsing
...
That is, add the last parts that saves and resumes previous incomplete
parsing states. Now the parsing stack push handler checks if the parent has
a resume flag set. When set, the incomplete fragment to resume is restored
and the new source fragment appended and parsing is continued.
2006-01-27 07:47:17 +01:00
Jonas Fonseca
9d91994f3c
Propone updating the scanner->state until incompleteness has been checked
...
That way the scanner state is meaningful when resuming during incremental
parsing.
2006-01-27 07:41:42 +01:00
e8030e09fd
Set text/plain for errors
2006-01-26 18:35:58 +01:00
8d4f44f2f1
Content-Type handling
2006-01-26 18:20:13 +01:00
f47daa2291
Use slashes after directories. Blocks are not used where there is only
...
one instruction
2006-01-26 14:34:11 +01:00
Jonas Fonseca
20498d7140
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-25 23:17:13 +01:00
Jonas Fonseca
bea1a0c559
Handle <base href=""> for HTML source rendering
...
Requested by witekfl.
2006-01-25 23:16:30 +01:00
Jonas Fonseca
89a95a5fc5
Rename enum html_element_type to html_element_mortality_type
...
This name is reserved for DOM.
2006-01-25 23:13:10 +01:00
witekfl
e5dbbff398
Set returned value.
2006-01-25 22:22:10 +01:00
witekfl
ea2d7a3325
Simplification.
2006-01-25 20:19:55 +01:00
Jonas Fonseca
afb45aace5
Add support for scanning comment endings such as '--!>' correctly
2006-01-25 18:18:01 +01:00
Laurent MONIN
cf8de45782
Cleanup and tidy up window.open workaround.
2006-01-25 17:20:47 +01:00
Laurent MONIN
f6f66a28c8
Fix warning: variable xxx might be clobbered by longjmp or vfork, that
...
occur with gcc 2.95.3.
2006-01-25 17:03:15 +01:00
witekfl
c204af75fe
Because of gradual rendering window.open is called many times with the same
...
arguments. This workaround remembers 8 last opened URLs and do not let
open them again.
2006-01-25 11:50:46 +01:00
c75fdeec39
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-22 10:27:13 +01:00
Jonas Fonseca
7e6f398602
Revert OBJECT_HEAD() part of tcc cleanups
...
The LIST_HEAD() change to OBJECT_HEAD() doesn't work when debuging is
enabled.
Fixes: d18809522e
2006-01-22 06:18:40 +01:00
Jonas Fonseca
ba3e4a611d
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-21 23:38:15 +01:00
61c43faacc
Do not include see/see.h in header files
2006-01-21 22:19:22 +01:00
d18809522e
Make elinks tcc (tiny C compiler) friendly.
...
If you want to try tcc use CC=tcc ./configure and make LD=tcc.
I built ELinks with tcc, but ELinks segfaults.
2006-01-21 21:33:23 +01:00
Jonas Fonseca
384a2d66e5
Fix inclusion of header files after CONFIG_{MD5,SHA1} were removed
...
Fixes: 206037eaa4
2006-01-21 08:44:19 +01:00
Jonas Fonseca
3f659f7876
Fix the mailcap test program's dependency on gettext
2006-01-21 08:32:17 +01:00
Jonas Fonseca
91e8fdf34b
Fix the EPLF FTP parser test to run FreeBSD
2006-01-21 08:28:57 +01:00
Jonas Fonseca
4570c4976e
Use CONFIG_ECMASCRIPT_SMJS in favour of CONFIG_SPIDERMONKEY, specificity!
2006-01-20 15:56:40 +01:00
Jonas Fonseca
2eba71d95b
Add support for testing normalization using the DOM configuration module
2006-01-20 02:08:46 +01:00
Jonas Fonseca
cc61578fcb
Fix node pushing in walk_dom_nodes()
2006-01-20 02:07:24 +01:00
Jonas Fonseca
22e647813e
Fix DOM_CONFIG_NORMALIZE_WHITESPACE comment
2006-01-20 02:06:41 +01:00
Jonas Fonseca
7fe214fbb2
Fix text node appending; fix DOM configuration parser
2006-01-19 04:54:30 +01:00
Jonas Fonseca
fe43bf8a4f
Fix leaks in the DOM stack tracer
2006-01-19 04:51:33 +01:00
Jonas Fonseca
126ae8c764
#include dom/node.h instead of dom/stack.h
2006-01-19 04:50:10 +01:00
Jonas Fonseca
cbee566144
Increase the max length of filenames to 15 for the LOG_* system
2006-01-19 04:25:11 +01:00
Jonas Fonseca
206037eaa4
Handle the logic for util/{md5,sha1} in the Makefile
2006-01-19 02:08:07 +01:00
Jonas Fonseca
359d835050
Handle the logic for util/scanner in the Makefile; less CONFIG_* variables
2006-01-19 01:24:42 +01:00
Jonas Fonseca
ba45514339
Change the SMJS scripting module name to Spidermonkey ECMAScript
2006-01-19 00:14:50 +01:00
Jonas Fonseca
c97b4be9b9
Move SUBDIRS and OBJS defining before their conditional defining
2006-01-18 21:53:13 +01:00
Jonas Fonseca
7f076a8832
Also compile in protocol/common when CGI is enabled
2006-01-18 21:50:43 +01:00
Miciah Dashiel Butler Masters
3b5724edd5
look_for_link: simplify string
...
Use stracpy(empty_string_or_(target_base)) instead of
null_or_stracpy(target_base) and then stracpy("") if that returns NULL.
2006-01-18 20:38:33 +00:00
Miciah Dashiel Butler Masters
958b0d308d
Re-introduce the stracpy in the correct place
...
See commit 836744ea84
and commit
bf3faa5c2b
.
2006-01-18 20:26:01 +00:00
witekfl
1d65718ace
When there is no frame with given name do goto_uri_frame using static
...
buffer.
2006-01-18 20:16:17 +01:00
witekfl
bf3faa5c2b
There is no reason to "stracpy" already allocated string.
2006-01-18 20:08:50 +01:00
witekfl
095e440270
Used protocol/common.h in CGI
2006-01-18 18:11:29 +01:00
Jonas Fonseca
b8230326ce
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-18 00:26:21 +01:00
2de1a840a6
I was wrong. self is function object, thisobj is peculiar object
2006-01-17 20:29:48 +01:00
Jonas Fonseca
34b12d21bd
Upgrade to use dom_stack_codes in the callbacks
2006-01-17 16:58:19 +01:00
Jonas Fonseca
2cd151c5c5
Add parse_dom_config() which converts a textual config list to flags
2006-01-17 16:55:10 +01:00
Miciah Dashiel Butler Masters
836744ea84
js_window_open: Fix extra free that I just introduced
...
Assign deo->target a copy of target instead of target itself because
delayed_goto_uri_frame frees deo->target and SpiderMonkey owns target.
Reported by Jonas.
2006-01-17 03:15:56 +00:00
Laurent MONIN
dab904cff5
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-17 01:19:17 +01:00
Laurent MONIN
3133db3474
Use elinks_ulongcat() instead of snprintf().
2006-01-17 01:18:45 +01:00
Jonas Fonseca
c7bdf62152
Remove unused fsp_info struct; use sizeof(*table); fix dir entry hiliting
2006-01-17 00:54:06 +01:00
Laurent MONIN
864745b55e
Make 8-bytes buffer more obvious.
2006-01-17 00:48:25 +01:00
Jonas Fonseca
28fbb9317b
Simplify URI string grapping; make dir listing more like FTP; use READ_SIZE
2006-01-17 00:40:27 +01:00
Laurent MONIN
a9907297b4
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-17 00:22:40 +01:00
Jonas Fonseca
54863e537f
Minor space cleanups; use pid_t; abort_connection() will close_socket()
2006-01-17 00:06:24 +01:00
Laurent MONIN
491654975d
Trim trailing whitespaces.
2006-01-16 23:51:02 +01:00
Laurent MONIN
8fe86eac0b
Typo fix.
2006-01-16 23:50:34 +01:00
Jonas Fonseca
bb12fbca37
Add protocol/common files ;)
2006-01-16 23:42:17 +01:00
Jonas Fonseca
0955086a6f
Move close_all_non_term_fd() shared by SMB and FSP to protocol/common
...
Stick a note near the OBJS sorting that it is there also to filter out
duplicates, which are now occuring with SMB and FSP compiled in.
2006-01-16 23:32:27 +01:00
Miciah Dashiel Butler Masters
466bb18be0
Move delayed_open to src/terminal/tab.c
...
The two copies of delayed_open in src/ecmascript/spidermonkey/window.c
and in src/ecmascript/see/window.c are identical, so move them
to src/terminal/tab.c and eliminate the duplication.
2006-01-16 19:28:03 +00:00
Miciah Dashiel Butler Masters
1f68492d57
Move delayed_goto_uri_frame to src/session/task.c
...
Until the last change in src/ecmascript/see/window.c, the two copies
of delayed_goto_uri_frame in src/ecmascript/spidermonkey/window.c and
in src/ecmascript/see/window.c were identical. That change applies to
both versions, so move the newer one to src/session/task.c and eliminate
the duplication. Also move struct delayed_open to src/session/session.h.
2006-01-16 19:18:33 +00:00
178c50cf40
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-16 16:18:52 +01:00
6cd9a11fdc
Use frame->name instead of target avoiding possible segfault.
2006-01-16 14:32:13 +01:00
b8126ea9de
Introduced ecmascript submodules
2006-01-16 14:14:14 +01:00
8782b01659
thisobj is for function object, self is for
...
object
2006-01-16 13:51:08 +01:00
04b253eef9
Make PHP 5 happy.
2006-01-16 11:45:17 +01:00
bb9b4437fa
- FSP protocol
2006-01-16 11:40:13 +01:00
Jonas Fonseca
1d52d67e50
Add get_dom_node_child() which searches for a node with given type
2006-01-16 07:11:02 +01:00
Jonas Fonseca
6c85c0f009
Add DOM configuration inspired module
...
It add support for normalizing a DOM document in various ways, such as
removing comments, converting CDATA section nodes to text nodes, cleanup
whitespace, etc.
Use it in the RSS renderer to sanitize the text to be rendered.
2006-01-16 05:12:34 +01:00
Jonas Fonseca
768f97c38e
Add get_dom_node_prev() which gets the previous sibling of a DOM node
2006-01-16 05:10:22 +01:00
Jonas Fonseca
4e6b05394d
ADD DOM_STACK_CODE_FREE_NODE so callbacks can remove nodes when popping
2006-01-16 05:09:45 +01:00
Jonas Fonseca
eecc22751d
Use dom_stack_code enum for dom_stack_callback_T
2006-01-16 00:55:58 +01:00
Jonas Fonseca
4a2cde1c00
Introduce dom_stack_code enum and use it for push_dom_node()
2006-01-16 00:40:51 +01:00
Jonas Fonseca
6deb090b48
Blast some more .vimrc files which for some strange reason was uncommitable
2006-01-15 19:14:10 +01: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
Kalle Olavi Niemitalo
5a5d223020
Merge with http://elinks.cz/elinks.git
2006-01-15 15:06:08 +02:00
Laurent MONIN
c1305b3e5b
#define filenames.
2006-01-15 09:56:19 +01:00
Jonas Fonseca
53dea9c89e
Change the Guile hooks file name from internal-hooks.scm to hooks.scm
2006-01-14 22:36:23 +01:00
Kalle Olavi Niemitalo
a7e465d785
Merge with http://elinks.cz/elinks.git
2006-01-14 21:38:13 +02:00
Kalle Olavi Niemitalo
5ab2a1ef6e
Merge with 0fae27fc27
...
(via http://elinks.cz/elinks.git )
Resolved conflicts in src/osdep/newwin.c.
2006-01-14 21:37:33 +02:00
Kalle Olavi Niemitalo
556f933728
Merge with 80b0607167
...
(via http://elinks.cz/elinks.git )
2006-01-14 21:33:04 +02:00
Kalle Olavi Niemitalo
c31450e862
Merge with 76751d1935
...
(via http://elinks.cz/elinks.git )
2006-01-14 21:31:24 +02:00
Kalle Olavi Niemitalo
89fe822f70
Merge with 6a9ea02f3a
...
(via http://elinks.cz/elinks.git )
2006-01-14 21:30:12 +02:00
Kalle Olavi Niemitalo
df4bf7f9ec
Merge with cd493ae7a8
...
(via http://elinks.cz/elinks.git )
2006-01-14 21:12:49 +02:00
Jonas Fonseca
082031c10c
Fix SGML parser test program
2006-01-14 12:44:06 +01:00
Jonas Fonseca
c8aa6c2360
Move struct sgml_parsing_state near the parsing state managing
2006-01-14 12:11:35 +01:00
Jonas Fonseca
e70b779366
Add code member to struct sgml_parser and simplify parsing state setup
...
parse_sgml() now just pushes a text node on the parsing state and the push
handler will now call parse_sgml_plain() and save the return code in
parser->code so parse_sgml() can return it. Much simpler.
2006-01-14 12:09:17 +01:00
Jonas Fonseca
b9316b3a9c
Fix a few possible leaks
2006-01-14 12:06:10 +01:00
Jonas Fonseca
0950996dd8
Change parse_sgml() to take buf+bufsize instead of DOM string
2006-01-14 11:32:11 +01:00
Jonas Fonseca
0c866fd8ae
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-14 11:01:28 +01:00
Jonas Fonseca
5d38e99465
Sort Makefile conditionals
2006-01-14 10:41:58 +01:00
Jonas Fonseca
af564bb101
Fix typo
2006-01-14 08:24:11 +01:00
Jonas Fonseca
aecfb28711
Cleanup SGML info backends #includes and description
2006-01-14 08:07:00 +01:00
Laurent MONIN
b7b33bae9b
Fix a memleak that may occur on systems without alloca(), backport from
...
gettext 0.14.5.
2006-01-13 13:58:13 +01:00
Laurent MONIN
f7e435fcf3
Upgrade config.charset to latest version from gnu gettext.
2006-01-13 13:22:09 +01:00
Laurent MONIN
5685221512
Trim trailing whitespaces.
2006-01-13 00:11:39 +01:00