Laurent MONIN
202965d338
CONFIG_WIN32 -> CONFIG_OS_WIN32
2006-01-11 20:10:27 +01:00
Laurent MONIN
86f5f2cf48
CONFIG_UNIX -> CONFIG_OS_UNIX
2006-01-11 20:10:27 +01:00
Laurent MONIN
9eafa94fd9
CONFIG_RISCOS -> CONFIG_OS_RISCOS
2006-01-11 20:10:26 +01:00
Laurent MONIN
b6ccfc0e07
CONFIG_OS2 -> CONFIG_OS_OS2
2006-01-11 20:10:26 +01:00
Laurent MONIN
a9b8abb70c
2006-01-11 14:14:11 +01:00
Laurent MONIN
52537b6733
2006-01-11 14:10:58 +01:00
Laurent MONIN
76751d1935
2006-01-11 14:10:51 +01:00
Laurent MONIN
5805586f0f
2006-01-11 14:10:41 +01:00
Laurent MONIN
4b2b5798ab
2006-01-11 14:07:17 +01:00
Laurent MONIN
f7a2dfc12a
CONFIG_LUA -> CONFIG_SCRIPTING_LUA
2006-01-11 14:06:13 +01:00
Laurent MONIN
043e6aa4e7
More white lines.
2006-01-11 13:45:09 +01:00
witekfl
6a9ea02f3a
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-11 13:20:38 +01:00
witekfl
179fdf2bb1
Global open() and alert(). Both ECMAScript engines has similar state.
...
Both doesn't work with my bank account :(
2006-01-11 13:19:51 +01:00
Jonas Fonseca
2d80258f72
Mark doc'd headers with: /* API Doc :: <api-name> */
2006-01-11 11:03:59 +01:00
witekfl
c2e9448f49
Fixed focus() in SEE ecmascript.
2006-01-11 09:17:17 +01:00
Jonas Fonseca
1d2a6e4d1b
Introduce CONFIG_ECMASCRIPT_SMJS used for Spidermonkey document scripting
...
It makes it possible to build with SEE document scripting and Spidermonkey
browser scripting.
2006-01-11 02:21:53 +01:00
Jonas Fonseca
d160a9993e
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-11 01:59:04 +01:00
Jonas Fonseca
4b132e0f63
A few compile fixes
...
You should _always_ #include "elinks.h" before other ELinks header files,
to take care of CONFIG_DEBUG. Drop unused variable.
2006-01-11 01:57:03 +01:00
Jonas Fonseca
ccc6527bba
Fix smjs scripting #ifdefs to use CONFIG_SM_SCRIPTING
2006-01-11 01:55:24 +01:00
Laurent MONIN
3efe402722
Complete the list of S_I* macros.
2006-01-10 23:59:14 +01:00
Laurent MONIN
b8e64a5ee0
Simplify secure_open() call, make it a wrapper around secure_open_umask().
2006-01-10 23:49:35 +01:00
Laurent MONIN
151bcbd3a2
Prefer S_I?USR and S_IRWXU over obsolete S_IREAD, S_IWRITE, S_IEXEC.
2006-01-10 23:40:39 +01:00
Laurent MONIN
88de36b8d2
Use mode_t and mode macros everywhere.
2006-01-10 23:36:06 +01:00
Laurent MONIN
9b88da873a
Use mode_t and mode macros everywhere.
2006-01-10 23:35:22 +01:00
Jonas Fonseca
cd493ae7a8
Remove see.o
2006-01-10 20:38:43 +01:00
Kalle Olavi Niemitalo
9deceafa0b
Merge with http://elinks.cz/elinks.git
2006-01-10 21:02:21 +02:00
witekfl
d8592e4f99
Alternative experimental ECMAScript engine.
2006-01-10 19:17:29 +01:00
Jonas Fonseca
d2e346436a
Hmm, seem b.delta decided not to become 0x03B4 like it should
2006-01-10 15:39:11 +01:00
Jonas Fonseca
b673e64e10
As a stop gap measure avoid using NULL entry->nonce and realms
...
Reported by xmath. Obviously needs to be looked into.
2006-01-10 15:35:15 +01:00
Jonas Fonseca
63d754f85b
Convert the RSS title string
2006-01-09 19:14:28 +01:00
Jonas Fonseca
9877579c63
This years batch of Gopher fixes
...
Two crash fixes, and really make the directory 'view' the default.
2006-01-09 15:13:44 +01:00
Jonas Fonseca
dd2516f597
Oops, someone added stuff he wuz not s'posed to
2006-01-09 14:11:29 +01:00
Jonas Fonseca
620730e642
Document the DOM scanner
2006-01-09 14:01:48 +01:00
Jonas Fonseca
3b166b0633
Document the DOM stack
2006-01-09 12:44:57 +01:00
Jonas Fonseca
938c8a80b4
Support more implicit markup of source files
2006-01-09 11:01:36 +01:00
Jonas Fonseca
4dd9db446b
init_html_parser_state(): Drop local html_element variable
2006-01-09 02:56:44 +01:00
Jonas Fonseca
20bd19e4c5
The RSS document title to channel->title
2006-01-09 02:18:57 +01:00
Kalle Olavi Niemitalo
7c80c67759
Don't include <sys/param.h> in util/math for MAX/MIN
...
<sys/param.h> includes <linux/param.h>, which includes <asm/param.h>, which
includes <asm-i486/param.h>, which includes <linux/config.h>, which
includes <linux/autoconf.h>, which includes <asm-i486/autoconf.h>, which
undefines CONFIG_IPV6.
2006-01-09 02:09:59 +01:00
Jonas Fonseca
5339525f1d
Oops, kill_html_stack_top() -> pop_html_element()
2006-01-09 01:40:16 +01:00
Jonas Fonseca
fe10af364d
Introduce pop_html_element(); wraps kill_html_stack_item(..., html_top)
2006-01-09 01:29:40 +01:00
Jonas Fonseca
94fd9303f3
Introduce html_bottom; similar to html_top
2006-01-09 01:24:54 +01:00
Jonas Fonseca
27283098f4
Clearify code a little
2006-01-09 01:24:38 +01:00
Jonas Fonseca
5808b4ae0c
Make html_top have a pointer type; use it to declare format and par_format
2006-01-09 01:22:33 +01:00
Kalle Olavi Niemitalo
2cfd0a9bb4
Merge with http://elinks.cz/elinks.git
2006-01-09 02:20:27 +02:00
Jonas Fonseca
db11b6452f
Fix a typo and a ref:[]
2006-01-09 01:20:03 +01:00
Jonas Fonseca
5b818b20ba
Use the new asciidoc code markup to document the DOM sgml parser
2006-01-08 23:36:07 +01:00
Laurent MONIN
8fe7eb0357
check_uri_file(): use strcspn().
2006-01-08 19:06:46 +01:00
Miciah Dashiel Butler Masters
5525339901
Fix add_document_to_string to add all chars in a line, not just the first
...
Revision 1.82 of src/scripting/lua/core.c and revision 1.42
of src/viewer/dump/dump.c (2 years, 2 months ago), which moved
add_document_to_string from the former to the latter, introduced
a logic error: the local variable pos was set in the outer loop,
which iterates thru the lines in the document, whereas it should be
(and had been) set in the inner loop, which iterates thru the columns.
This brings us all the way back to a working current_document_formatted
for Lua scripts.
2006-01-08 07:43:44 +00:00
Miciah Dashiel Butler Masters
38fe0f7292
Fix add_document_to_string to actually add stuff
...
Revision 1.147 (14 months, 2 weeks ago) broke the logic so that only
frame characters were added. This fixes that change, getting us halfway
back to a working current_document_formatted function for Lua.
2006-01-08 07:34:59 +00:00
Jonas Fonseca
bc55cd55cb
Add the basic support for rendering RSS documents
...
It is very simple for now, so it only displays headlines and doesn't
support a whole lot of RSS flavours.
2006-01-08 03:44:23 +01:00
Jonas Fonseca
2f9c406ef1
Introduce add_to_dom_string() and turn init_dom_string() into its user
2006-01-08 03:40:54 +01:00
Jonas Fonseca
acb1f7e74d
Refactor computation of scanner error string length to get_sgml_error_end()
2006-01-07 23:51:19 +01:00
Jonas Fonseca
534a16fff1
Improve error detection
2006-01-07 23:40:21 +01:00
Laurent MONIN
8f2d4860bc
Trim trailing whitespaces.
2006-01-07 21:02:51 +01:00
Laurent MONIN
eda6529ced
check_uri_file(): optimize by not using strlen() more than needed.
2006-01-07 21:00:51 +01:00
Laurent MONIN
9183e0cf04
check_whether_file_exists(): optimize by not using strlen() more than
...
needed.
2006-01-07 20:59:34 +01:00
Jonas Fonseca
d0be89a16c
When requested to open local files with a handler use the file in place
...
Everything else is really stupid, i.e. to go through the callback-infested
download code. A parly fix of bug 238 (caching of local files).
2006-01-07 20:19:37 +01:00
Jonas Fonseca
21f9b59130
Use check_whether_file_exists() when encoding a file URI string
...
The file URI encoding is done in translate_url() immediately after the call
to find_uri_protocol() [which also uses check_whether_file_exists()]. So it
only makes sense to use check_whether_file_exists() also here since this is
a potential ambiguous URL from the user.
This fixes handling of files like 'a?b' given the command line, reported by
rrowan. It broke (for the n-th time ;) in CVS version 1.317->1.318 back in
August. The fix preserves the intend of that patch, namely the intend to
optimize the number of calls to file_exists().
2006-01-07 19:16:51 +01:00
Jonas Fonseca
0c1e8a713d
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-07 05:19:06 +01:00
Jonas Fonseca
3835bf8449
A handful of fixes related to error detection
...
- Fix assertion failure by breaking the switch if an error token is next
when previous was a processing instruction.
- Fix <!notation parsing by skipping ident chars instead of spaces.
- Improve checking of processing instruction 'target'-end and what error
string is generated.
- For now put all of the processing instruction data in the error token.
- Remove a DBG()-print.
2006-01-07 05:18:43 +01:00
Jonas Fonseca
97f403a9d9
Add a test file for checking detection of errors by the SGML parser
2006-01-07 05:15:16 +01:00
Jonas Fonseca
03ee543e21
Make sgml-parser request error detection when passed --error option
2006-01-07 04:27:08 +01:00
Jonas Fonseca
c993a0012e
Add basic support for detection errors while scanning
...
It mostly uses the checking for incompleteness already in place. Tested
lightly so it will definately need some more work.
2006-01-07 04:26:08 +01:00
Jonas Fonseca
5defc48eb3
Add basic support for requesting error detection; SGML scanner part missing
2006-01-07 04:21:39 +01:00
Jonas Fonseca
a1e5122183
Drop unnneeded URL argument and simplify test helpers
2006-01-07 02:14:45 +01:00
Laurent MONIN
6182b50679
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-07 02:04:04 +01:00
Jonas Fonseca
f1c3c90a4f
Move line counting tests to own file; simplifies a few things
2006-01-07 02:02:21 +01:00
Laurent MONIN
ee0dc57771
exec_on_master_terminal(): tidy up.
2006-01-07 01:57:11 +01:00
Laurent MONIN
2e67ca1df9
exec_on_master_terminal(): drop old commented code.
2006-01-07 01:55:18 +01:00
Laurent MONIN
16e2724c12
exec_on_master_terminal(): move code to caller instead.
2006-01-07 01:54:44 +01:00
Laurent MONIN
df138c775a
exec_on_master_terminal(): reduce code redundancy a bit and use
...
fmem_alloc() instead of mem_alloc().
2006-01-07 01:52:35 +01:00
Laurent MONIN
b09d2c7a3f
exec_on_slave_terminal(): reduce indentation level and use fmem_alloc()
...
instead of mem_alloc().
2006-01-07 01:49:12 +01:00
Jonas Fonseca
dee8ac5b45
Move test for incompleteness to own file
2006-01-07 01:48:51 +01:00
Laurent MONIN
a2b9d8bb78
Explode exec_on_terminal() to new exec_on_master_terminal() and
...
exec_on_slave_terminal().
2006-01-07 01:47:36 +01:00
Jonas Fonseca
7ff2cb2607
Improve a comment a bit
2006-01-07 01:41:07 +01:00
Jonas Fonseca
7c65c06b41
Move up enum sgml_parser_code declaration
2006-01-07 01:29:44 +01:00
Laurent MONIN
450e44a598
exec_on_terminal(): simplify code.
2006-01-07 01:28:54 +01:00
Jonas Fonseca
c9c41e38a2
test_expect_incomplete(): Put sgml-parser output to /dev/null
2006-01-07 01:27:48 +01:00
Jonas Fonseca
f8d44ffe32
scan_sgml_tokens(): Drop local variable and use scanner->current
...
... so lower level scanners can change the next token to use.
2006-01-07 01:25:42 +01:00
Jonas Fonseca
bca330fcbd
Simplify incomplete test helper and fix quoting problem
2006-01-07 01:22:14 +01:00
Jonas Fonseca
2a11525d1a
Fix a few typos
2006-01-06 22:32:07 +01:00
Jonas Fonseca
3fd2828fb0
Add a simple test script of the mailcap cache
...
It has a few nasty hacks to reduce the dependencies on defined symbols.
2006-01-06 22:18:11 +01:00
Jonas Fonseca
215d7ec158
Append memdebug to test dependencies in Makefile.lib
2006-01-06 22:11:45 +01:00
Laurent MONIN
d767650585
check_hotkeys_common(): @res -> @found.
2006-01-06 21:37:36 +01:00
Laurent MONIN
c08d932433
Merge is_hotkey(), is_not_so_hotkey() and check_hotkeys_common() to
...
reduce code redundancy and speed up things.
2006-01-06 21:34:57 +01:00
Jonas Fonseca
5f5c78a87f
Realign the test docs with reality
2006-01-06 18:32:22 +01:00
Petr Baudis
a637349b32
Prevent complaining about leaking clipboard
2006-01-06 17:08:38 +01:00
Jonas Fonseca
0c40ff05c9
Fix compilation of get_clipboard_text()
2006-01-06 15:48:15 +01:00
Petr Baudis
f18de1d3f3
Internal clipboard support
2006-01-06 12:02:51 +01:00
Petr Baudis
173e68ccfa
Support for pasting from GNU screen clipboard
2006-01-06 12:00:30 +01:00
Kalle Olavi Niemitalo
93714a3e35
Merge with http://elinks.cz/elinks.git
2006-01-06 02:13:11 +02:00
Miciah Dashiel Butler Masters
a645bb2ead
Do return EVENT_NOT_PROCESSED from hierbox_ev_init and hierbox_ev_abort
...
hierbox_ev_init and hierbox_ev_abort must return EVENT_NOT_PROCESSED
so that the generic dialog code runs and initialises the widgets and stuff.
This commit reverts commit f8310de64b
to fix
a segfault and also adds comments to explain the unintuitive return value.
2006-01-05 23:41:18 +00:00
Laurent MONIN
18649c8988
connect_socket(): simplify code a bit.
2006-01-05 18:36:22 +01:00
Laurent MONIN
c6dfce8ad8
connect_socket(): set @pf at appropriate time.
2006-01-05 18:29:42 +01:00
Laurent MONIN
9e55cb0d2a
connect_socket(): cache options values.
2006-01-05 18:28:16 +01:00
Jonas Fonseca
ab8a4b2847
Add more tests based on test/comments.html
2006-01-05 15:36:18 +01:00
Laurent MONIN
77156c021a
Drop unused listbox widget height stuff.
2006-01-05 11:50:42 +01:00
Laurent MONIN
f8310de64b
hierbox_ev_[init|abort](): it makes more sense to return EVENT_PROCESSED.
2006-01-05 11:44:29 +01:00
Laurent MONIN
a05b6c0636
hierbox_ev_kbd(): use a switch().
2006-01-05 11:41:26 +01:00
Laurent MONIN
9dc2a7ffb7
Merge code from create_bittorrent_path() and mkalldirs(). Suggested by
...
Jonas. Simpler and better.
2006-01-05 10:49:05 +01:00
Laurent MONIN
c39a30ca49
Autocreate directories needed to download a file.
2006-01-04 21:52:15 +01:00
Laurent MONIN
73a99b6b99
Introduce functions to make directories, partly borrowed to wget. Not
...
yet used.
2006-01-04 21:43:42 +01:00
Laurent MONIN
2a71adda10
Revert
...
http://cvsweb.elinks.cz/cvsweb.cgi/elinks/src/util/file.c.diff?r1=1.44;r2=1.45
patch, which has to be reworked, without modifying file_exists().
2006-01-04 21:41:56 +01:00
Jonas Fonseca
84523875b3
Use get_opt_codepage_tree() and kill warning
2006-01-04 18:55:39 +01:00
Laurent MONIN
31c30864e0
Trim trailing whitespaces.
2006-01-04 18:08:48 +01:00
Laurent MONIN
88730120ba
Define EL_PF_INET and EL_PF_INET6 to identify protocol in use instead
...
of numeric values.
2006-01-04 18:06:53 +01:00
Jonas Fonseca
359a29bb40
Make it possible to use more CSS properties with the source highlighting
2006-01-04 00:50:40 +01:00
Laurent MONIN
26e1ee5810
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-04 00:36:05 +01:00
Laurent MONIN
8b7657deaf
Use PF_* instead of AF_* as first parameter of socket(2).
2006-01-04 00:32:58 +01:00
Jonas Fonseca
0bfb1d7742
Free nodes created on the SGML parsing stack
2006-01-04 00:29:10 +01:00
Jonas Fonseca
aa75cade23
Reinsert part of comment for nVDash; fixes 8e0eda5e4d
2006-01-03 23:38:37 +01:00
Jonas Fonseca
66cf866ab6
Cleanup the DOM stack flags; s/KEEP_NODES/FREE_NODES/
2006-01-03 20:35:32 +01:00
Jonas Fonseca
7a5f699a88
Drop unneeded -b arg to cmp, which isn't available in FreeBSD's version
2006-01-03 20:00:06 +01:00
Jonas Fonseca
146ca09c43
Improve support for running 'make test' when srcdir != builddir
...
Additionally, also make TESTDEPS conditionally contain memdebug object
binary only if CONFIG_DEBUG is yes.
2006-01-03 19:04:17 +01:00
Jonas Fonseca
8f18d1c6c8
Rebuild the entity table with Unicode/gen-ent
2006-01-03 17:14:33 +01:00
Jonas Fonseca
a5d71488a2
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-03 15:20:47 +01:00
Jonas Fonseca
638e0406f1
Drop empty lines from option descriptions; doc/tools/help2doc don't like em
2006-01-03 15:15:36 +01:00
Laurent MONIN
208d2b50fe
Update year to 2006 in Copying message.
2006-01-03 13:37:15 +01:00
Laurent MONIN
0c9d2c5a6f
Let ftp-parser displays usage information when called with no arg or
...
empty string, instead of core dump in debug mode.
2006-01-03 13:33:11 +01:00
Jonas Fonseca
50183bf5d8
Add support for recursively running all tests
2006-01-03 02:07:51 +01:00
Jonas Fonseca
5c091720f7
Sort TESTDEPS
2006-01-03 01:55:26 +01:00
Jonas Fonseca
c1eb5aa24f
Also test parsing of EPLF FTP reponses
2006-01-03 01:55:18 +01:00
Jonas Fonseca
feb076a84a
Add the ftp-parser test program
2006-01-03 01:32:43 +01:00
Jonas Fonseca
513c06f2d0
Remove last remains of the built-in FTP parser testing
2006-01-03 01:30:46 +01:00
Jonas Fonseca
90a1440c03
Make a test-ftp-parser test script and remove the 'built-in' one
2006-01-03 01:28:44 +01:00
Jonas Fonseca
ba5bdfec00
Move the 'make test' handling to Makefile.lib
...
The test rule is defined when TEST_PROGS is defined. Users should also set
TESTDEPS to get the correct object files linked in.
2006-01-03 00:45:22 +01:00
Jonas Fonseca
23f0085842
Move src/dom/test/libtest test/libtest.sh, put path to it in TEST_LIB
2006-01-03 00:34:10 +01:00
Jonas Fonseca
f88cbe6761
Add check of incomplete text
2006-01-02 22:35:03 +01:00
Jonas Fonseca
42156f4477
Change one test description to start with 'Parse ...'
2006-01-02 22:31:28 +01:00
Jonas Fonseca
c3c4dd12df
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-02 21:05:18 +01:00
Jonas Fonseca
f75ccffbc7
Fix SGML parsing and scanning so that all tests succeeds
...
This includes checking the return token of get_next_dom_scanner_token() and
fixing the calculated size of recovered processing instruction data tokens.
2006-01-02 21:04:51 +01:00
Jonas Fonseca
0160c0a464
Make it possible to test how incomplete input is parsed
...
Also fix the expected output of proc. instruction test.
2006-01-02 21:02:41 +01:00
Miciah Dashiel Butler Masters
97b5b9cfe1
Check for hooks.js before trying to load it.
...
Check file_exists(path) before calling smjs_do_file(path)
in smjs_load_hooks to fix an error message when there is no hooks.js,
reported by zas.
2006-01-02 18:53:13 +00:00
Jonas Fonseca
e78d43f1ac
Add mode where the SGML scanner checks for completeness
2006-01-02 17:46:09 +01:00
Jonas Fonseca
af72dd8435
Make parse_sgml() return the sgml_parser_code enum
...
It is mostly just ignored for now. The SGML parser test tool will however
return parser code.
2006-01-02 17:40:42 +01:00
Jonas Fonseca
29279e71b7
Add SGML_TOKEN_INCOMPLETE and handle it in the parser
2006-01-02 17:20:39 +01:00
Jonas Fonseca
2d813f2cbf
Introduce enum sgml_parser_code and make the parsers return something
2006-01-02 17:14:51 +01:00
Jonas Fonseca
fcf7677584
Skip spaces immediately when recognising '<?ident'
2006-01-02 16:58:48 +01:00
Jonas Fonseca
8c9324cc37
Add test for SGML such as, e.g. '<parent<child/></parent>'
2006-01-02 16:26:01 +01:00
Jonas Fonseca
0071ea696c
Fix logic in update_number_of_lines() and tell parse_sgml() src is complete
2006-01-02 14:59:54 +01:00
Jonas Fonseca
2664a11a68
Merge with git+ssh://pasky/srv/git/elinks.git
2006-01-02 14:59:42 +01:00
Laurent MONIN
3f3b18e53b
Indentation fix.
2006-01-02 10:50:49 +01:00
Jonas Fonseca
58c31f44a0
Clearify the code a bit
2006-01-02 03:06:47 +01:00
Jonas Fonseca
dc10be626e
The attribute parsing of proc. instruction nodes has the complete source
2006-01-02 02:44:01 +01:00
Jonas Fonseca
f608e2a0ae
Add the concept of completeness to strings being parsed and scanned
...
... not used yet.
2006-01-02 02:08:20 +01:00
Jonas Fonseca
6e9a18b444
fix a few bugs for line counting in plain text
2006-01-02 01:49:12 +01:00
Jonas Fonseca
7717862401
Make it possible to pass --print-lines to test line counting
2006-01-02 01:48:08 +01:00
Jonas Fonseca
247debe34f
Add get_sgml_parser_line_number(), and fix a copy/paste error
2006-01-02 01:47:02 +01:00
Jonas Fonseca
275ba0b789
Use common print_indent() to simplify printf()-strings
2006-01-02 00:32:22 +01:00
Jonas Fonseca
b83bbf9c4a
Add sgml_parser_flag which can be used to specify SGML_PARSER_COUNT_LINES
2006-01-02 00:29:37 +01:00
Jonas Fonseca
1801a21b50
init_sgml_parser(): Rename flags to stack_flags
2006-01-02 00:29:36 +01:00
Kalle Olavi Niemitalo
eb99af7a33
Merge with http://elinks.cz/elinks.git
2006-01-02 01:27:11 +02:00
Laurent MONIN
54997c506f
Drop trailing whitespaces.
2006-01-02 00:15:20 +01:00
Jonas Fonseca
43b34dcb2f
Add DocBook element and attribute definitions and drop a bogus file
2006-01-01 23:59:57 +01:00
Laurent MONIN
4ced25779d
Add missing b flag to fopen() call.
2006-01-01 23:47:34 +01:00
Jonas Fonseca
021af4e87c
Although aware ELinks doesn't need another sgml/doctype here is DocBook
...
It was created a long time ago so (I think) it deserves to survive. It
maps .sgml files to applicatino/docbook+xml and uses the highlighter.
2006-01-01 23:22:10 +01:00
Jonas Fonseca
7d64cb893c
Improve (or rather fix) how document types are matched in the DOM renderer
2006-01-01 23:14:16 +01:00
Jonas Fonseca
c656a96a73
Use the simpler strcasecmp() instead of strcaselcmp()
2006-01-01 23:05:34 +01:00
Jonas Fonseca
479039fb9e
Also highlight HTML if the MIME type is application/xhtml+xml
2006-01-01 23:02:41 +01:00
Jonas Fonseca
9c50072c97
Fix more problems when $(srcdir) is empty
...
Thanks to Kalle Olavi Niemitalo and Adam Golebiowski.
2006-01-01 22:54:44 +01:00
Kalle Olavi Niemitalo
21f61c5c06
Specify accelerator contexts for "Form f~ields".
2006-01-01 23:31:41 +02:00
Kalle Olavi Niemitalo
345ba7afcd
Merge with http://elinks.cz/elinks.git
2006-01-01 19:05:44 +02:00
Kalle Olavi Niemitalo
4c2831677a
Here is a framework that detects cases where a PO file assigns
...
the same accelerator key to multiple buttons in a dialog box or
to multiple items in a menu. ELinks already has some support for
this but it requires the translator to run ELinks and manually
scan through all menus and dialogs. The attached changes make it
possible to quickly detect and list any conflicts, including ones
that can only occur on operating systems or configurations that
the translator is not currently using.
The changes have no immediate effect on the elinks executable or
the MO files. PO files become larger, however.
The scheme works like this:
- Like before, accelerator keys in translatable strings are
tagged with the tilde (~) character.
- Whenever a C source file defines an accelerator key, it must
assign one or more named "contexts" to it. The translations in
the PO files inherit these contexts. If multiple strings use
the same accelerator (case insensitive) in the same context,
that's a conflict and can be detected automatically.
- The contexts are defined with "gettext_accelerator_context"
comments in source files. These comments delimit regions where
all translatable strings containing tildes are given the same
contexts. There must be one special comment at the top of the
region; it lists the contexts assigned to that region. The
region automatically ends at the end of the function (found
with regexp /^\}/), but it can also be closed explicitly with
another special comment. The comments are formatted like this:
/* [gettext_accelerator_context(foo, bar, baz)]
begins a region that uses the contexts "foo", "bar", and "baz".
The comma is the delimiter; whitespace is optional.
[gettext_accelerator_context()]
ends the region. */
The scripts don't currently check whether this syntax occurs
inside or outside comments.
- The names of contexts consist of C identifiers delimited with
periods. I typically used the name of a function that sets
up a dialog, or the name of an array where the items of a
menu are listed. There is a special feature for static
functions: if the name begins with a period, then the period
will be replaced with the name of the source file and a colon.
- If a menu is programmatically generated from multiple parts,
of which some are never used together, so that it is safe to
use the same accelerators in them, then it is necessary to
define multiple contexts for the same menu. link_menu() in
src/viewer/text/link.c is the most complex example of this.
- During make update-po:
- A Perl script (po/gather-accelerator-contexts.pl) reads
po/elinks.pot, scans the source files listed in it for
"gettext_accelerator_context" comments, and rewrites
po/elinks.pot with "accelerator_context" comments that
indicate the contexts of each msgid: the union of all
contexts of all of its uses in the source files. It also
removes any "gettext_accelerator_context" comments that
xgettext --add-comments has copied to elinks.pot.
- If po/gather-accelerator-contexts.pl does not find any
contexts for some use of an msgid that seems to contain an
accelerator (because it contains a tilde), it warns. If the
tilde refers to e.g. "~/.elinks" and does not actually mark
an accelerator, the warning can be silenced by specifying the
special context "IGNORE", which the script otherwise ignores.
- msgmerge copies the "accelerator_context" comments from
po/elinks.pot to po/*.po. Translators do not edit those
comments.
- During make check-po:
- Another Perl script (po/check-accelerator-contexts.pl) reads
po/*.po and keeps track of which accelerators have been bound
in each context. It warns about any conflicts it finds.
This script does not access the C source files; thus it does
not matter if the line numbers in "#:" lines are out of date.
This implementation is not perfect and I am not proposing to
add it to the main source tree at this time. Specifically:
- It introduces compile-time dependencies on Perl and Locale::PO.
There should be a configure-time or compile-time check so that
the new features are skipped if the prerequisites are missing.
- When the scripts include msgstr strings in warnings, they
should transcode them from the charset of the PO file to the
one specified by the user's locale.
- It is not adequately documented (well, except perhaps here).
- po/check-accelerator-contexts.pl reports the same conflict
multiple times if it occurs in multiple contexts.
- The warning messages should include line numbers, so that users
of Emacs could conveniently edit the conflicting part of the PO
file. This is not feasible with the current version of
Locale::PO.
- Locale::PO does not understand #~ lines and spews warnings
about them. There is an ugly hack to hide these warnings.
- Jonas Fonseca suggested the script could propose accelerators
that are still available. This has not been implemented.
There are three files attached:
- po/gather-accelerator-contexts.pl: Augments elinks.pot with
context information.
- po/check-accelerator-contexts.pl: Checks conflicts.
- accelerator-contexts.diff: Makes po/Makefile run the scripts,
and adds special comments to source files.
2006-01-01 18:55:18 +02:00
Miciah Dashiel Butler Masters
34588e976d
Change the keyboard accelerator for the cookie browser's Clear button
...
from C to L for great consistency.
2006-01-01 09:16:42 +00:00
Miciah Dashiel Butler Masters
290a03787b
Redo a small comment.
2006-01-01 08:07:14 +00:00
Miciah Dashiel Butler Masters
227150d100
Merge the definition and initialisation of msg in
2006-01-01 08:07:14 +00:00
Miciah Dashiel Butler Masters
127b27bd49
Use listbox_message.
2006-01-01 08:07:14 +00:00
Miciah Dashiel Butler Masters
2ee5b85b9e
Introduce and use local variable ops, assigned the value of box->ops,
2006-01-01 08:07:14 +00:00
Miciah Dashiel Butler Masters
985efb99b6
Introduce a macro listbox_message(msg) that tries ops->messages->msg
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
6114066803
Replace unsigned char *delete_messages[2][DELETE_ERRORS] with struct
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
4e83efb6d3
Drop a comment that should have gone with revision 1.129.
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
eeed2cd4a8
Use the local variable item instead of context->item, which is assigned
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
247fe95fea
In hierbox_ev_kbd, use the local variable selected, which is assigned
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
4eb0cbf271
Introduce and use local variable item, assigned the value of
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
5042a48750
Re-indent recursively_goto_listbox.
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
6aed6ff96f
Factor recursively_goto_listbox out of recursively_goto_each_listbox.
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
a4209b02fe
Rename recursively_goto_listbox to recursively_goto_each_listbox.
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
ceb9222ee4
Drop a silly 'Setup box_item' comment in add_bookmark.
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
963452c65f
Rename done_listbox_item parameter box_item to item.
2006-01-01 08:07:13 +00:00
Miciah Dashiel Butler Masters
fca29e75f8
Drop some unneeded comments.
2006-01-01 08:07:13 +00:00
Jonas Fonseca
6b62e0cb77
Declare struct sgml_parser_state above struct sgml_parser
...
... and describe the info member.
2005-12-31 20:02:39 +01:00
Jonas Fonseca
f0148c2ecf
Keep struct sgml_parsing_state private to the parser
2005-12-31 19:59:11 +01:00
Jonas Fonseca
4a766f350b
Just for fun also parse <?xml-stylesheet attributes
2005-12-31 03:13:39 +01:00
Jonas Fonseca
a578ed4667
Make the SGML scanner (optionally) keep track of line numbers
...
A new line is either \n or \f. The main logic for counting lines is in
skip_sgml{,_chars,_space}. For the general case where line numbers are not
wanted the code tries to avoid the extra checks for newlines.
This will be useful for reporting errors when loading the XBEL file.
2005-12-31 02:46:56 +01:00
Jonas Fonseca
b23beed031
Rename skip_comment() and skip_cdata_section() to conform to skip_sgml_*()
2005-12-31 02:00:09 +01:00
Jonas Fonseca
0891cda51e
Introduce skip_sgml_space() that wraps scan_sgml(..., SGML_SCAN_WHITESPACE)
2005-12-31 01:57:54 +01:00
Jonas Fonseca
9264221635
Make init_dom_scanner() take the state arg and drop a macro
2005-12-31 01:55:38 +01:00
Jonas Fonseca
7489c134f7
Make non-terminated comments and cdata sections have 'the rest' as content
2005-12-31 01:47:57 +01:00
Jonas Fonseca
8f7f6abc16
Use skip_sgml_chars() in skip_comment() and skip_cdata_section()
2005-12-31 01:40:52 +01:00
Jonas Fonseca
4e10bcf772
Drop useless code for proc. instruction scanning
2005-12-31 01:18:49 +01:00
Jonas Fonseca
e8ff8bd5f0
Fix another off-by-one error similar to the SGML comment parsing
2005-12-31 01:14:52 +01:00
Jonas Fonseca
ab7ba39d42
Introduce skip_sgml_chars() to avoid usage of memchr()
2005-12-31 00:06:12 +01:00
Jonas Fonseca
14a3f9c0fd
Disable dom-select building since it requires defining of DOM_STACK_TRACE
2005-12-31 00:05:49 +01:00
Jonas Fonseca
9a0bf83756
Add basic stuff for XBEL parsing/highlighting using the DOM engine
2005-12-30 22:19:32 +01:00
Jonas Fonseca
aa07b3edf4
Fix old (non) problem with using VERSION identifier by #undef'ing it first
2005-12-30 22:13:13 +01:00
Miciah Dashiel Butler Masters
9d713ff41d
Write the bookmarks whether or not they are dirty if the backend has
...
changed since reading.
2005-12-30 21:08:50 +00:00
Jonas Fonseca
c0ece18042
Start showing RSS files in the plain view so it gets highlighted
2005-12-30 21:55:53 +01:00
Jonas Fonseca
65a114f4bc
Sort the RSS elements, they are supposed to be binarily searchable
2005-12-30 21:46:44 +01:00
Jonas Fonseca
ad052c3985
Hey, hey Cripple Creek Fai^H^Herry
2005-12-30 21:19:46 +01:00
Jonas Fonseca
ff75d5086f
Remove the DOM track tracer from the renderer
2005-12-30 13:08:42 +01:00
Miciah Dashiel Butler Masters
470da90699
Put documentation (doc/events.txt) and reality back into alignment
...
by changing goto_url_with_hook not to call goto_uri if get_hooked_uri
returns NULL, which it does if a hook returns "", which several hooks do.
2005-12-30 03:04:04 +00:00
Jonas Fonseca
41f1f5f9d3
Add a simple program for testing the DOM select code
...
It accepts --uri, --src and --selector args.
2005-12-30 03:33:48 +01:00
Jonas Fonseca
4f09ac99f7
Make it possible to identify the output of DOM stack tracers
2005-12-30 03:29:17 +01:00
Jonas Fonseca
0ddb5f2d18
Use the DOM stack tracer for getting a dump of active nodes
2005-12-30 03:02:59 +01:00
Jonas Fonseca
bd1beb1fab
Use the stack when creating the select node hierachy
2005-12-30 02:59:34 +01:00
Jonas Fonseca
4868c23a06
Cleanup the DOM test Makefile so it's more generic and more silent
2005-12-30 02:19:25 +01:00
Jonas Fonseca
748bab64a7
Make the printed install paths simpler for man5 files when srcdir == builddir
2005-12-30 00:49:01 +01:00
Miciah Dashiel Butler Masters
6a44d5192d
Fix a typo in an error message in cache_entry_set_property: s/get/set/
2005-12-29 22:31:25 +00:00
Miciah Dashiel Butler Masters
65372061a0
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-29 22:29:39 +00:00
Miciah Dashiel Butler Masters
7f1711471f
Drop an extra object_lock in bookmark_folder_get_property:
...
smjs_get_bookmark_object will lock the bookmark for us.
2005-12-29 22:19:19 +00:00
Miciah Dashiel Butler Masters
9e06b709d4
Return NULL when a script tries to get a bookmark that does not exist
...
in the given folder. (What was I thinking before?)
2005-12-29 22:18:45 +00:00
Jonas Fonseca
76a524ddf6
More <?xml and comment tests, fix an off-by-one error for comments skipping
2005-12-29 22:26:39 +01:00
Jonas Fonseca
bd877570d2
Test some more obscure proc. instructions and fix some assertion failures
2005-12-29 21:52:27 +01:00
Jonas Fonseca
57168e1fbc
Handle <element path=/to/%61-&\one";files/> as a self-closing tag
...
Before the '/' before '>' would be interpreted as part of the attribute
value. Hope this is sensible slurping of the markup soup.
2005-12-29 20:38:43 +01:00
Jonas Fonseca
958a4a1b51
Add tests for more things like space handling and obscure formatting
2005-12-29 19:13:48 +01:00
Jonas Fonseca
beb8337fc5
Add rule to make test run from src/dom dir
2005-12-29 18:33:59 +01:00
Jonas Fonseca
1a177491a0
Fix SGML parsing of processing instructions (<?xml ...?>)
...
It involves adding a new scanner state which is used only to generate a new
processing instruction (PI) data token. This removes some scanner specific
code from the parser and makes handling of PIs more generic. The data of
XML PIs are still parsed as attributes and added to the PI node.
The 6th test now succeeds. Hurrah!
2005-12-29 18:31:49 +01:00
Jonas Fonseca
c24c67ce59
Make it possible to initialise a scanner in a specific state
2005-12-29 18:20:03 +01:00
Jonas Fonseca
889a0f16f8
Fix the expected output of processing instruction parsing
...
Spaces after the target should be skipped.
2005-12-29 18:00:26 +01:00
Miciah Dashiel Butler Masters
684bac3b22
Define do_file before loading hooks.js in case hooks.js wants to use
...
do_file immediately.
2005-12-29 14:24:00 +00:00
Miciah Dashiel Butler Masters
ae42c586f8
Add elinks.home property.
2005-12-29 14:19:09 +00:00
Miciah Dashiel Butler Masters
a4be153703
Generalise the error message from smjs_do_file by dropping 'default'
...
from 'error loading default script file'.
2005-12-29 13:54:26 +00:00
Miciah Dashiel Butler Masters
b52a29f8c0
Let smjs_do_file return 0 to indicate failure and 1 to indicate
...
success. Add smjs_do_file_wrapper and let ECMAScript load files with
do_file(path).
2005-12-29 13:48:02 +00:00
Miciah Dashiel Butler Masters
cb506ea412
Factor smjs_do_file out of smjs_load_hooks.
2005-12-29 13:27:12 +00:00
Miciah Dashiel Butler Masters
9d4893e384
Mark smjs_load_hooks static.
2005-12-29 13:26:38 +00:00
Miciah Dashiel Butler Masters
79cf499cf9
Use JS_PropertyStub instead of NULL where applicable in JSClass
...
definitions.
2005-12-29 07:25:04 +00:00
Miciah Dashiel Butler Masters
46b1db47a2
Check JS_TRUE == ... instead of JS_FALSE != ... in smjs_get_keymap_object.
2005-12-29 07:20:33 +00:00
Miciah Dashiel Butler Masters
1ba2b6931a
Don't check CACHE_ENTRY_LENGTH in cache_entry_set_property since, as
...
Jonas pointed out, .length is read-only, so SpiderMonkey will never
pass the setter CACHE_ENTRY_LENGTH. Anyway, .uri is also read-only and
is not handled in the setter.
2005-12-29 07:19:15 +00:00
Miciah Dashiel Butler Masters
898c2a8165
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-29 07:08:37 +00:00
Miciah Dashiel Butler Masters
17b7ffc7df
Add elinks.bookmarks interface for reading bookmarks.
2005-12-29 07:05:31 +00:00
Jonas Fonseca
5a75bbc427
Merge with git+ssh://pasky/srv/git/elinks.git
2005-12-29 06:55:30 +01:00
Jonas Fonseca
ba5dbd3a18
Add test_output_equals helper and add a few more tests
...
The last one fails for now. Incorrect parsing of processing instructions.
2005-12-29 06:54:41 +01:00
Jonas Fonseca
23f21f1924
Fine tune how some of the nodes are printed, fix string compressing
2005-12-29 06:50:51 +01:00
Miciah Dashiel Butler Masters
59ffb72b8f
Drop .or from elinks.or.cz.
2005-12-29 04:35:02 +00:00
Jonas Fonseca
602d2d8a66
Add README for the test infrastructure mostly pasted from git/t/README
2005-12-29 05:12:36 +01:00
Jonas Fonseca
d394cb0bc1
Grab GITs shell script-based test infrastructure and add "Hello world" test
2005-12-29 04:44:03 +01:00
Jonas Fonseca
f42b39ee3c
Fix indentation so that things are printed at the start of the line
2005-12-29 04:39:20 +01:00
Jonas Fonseca
8dcbaa76f3
sgml-parser: Make it possible to specify the URL and the source to parse
2005-12-29 04:29:13 +01:00
Miciah Dashiel Butler Masters
006445cd09
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-29 00:57:46 +00:00
Jonas Fonseca
c475f1fc0c
Drop linking with util/string.o, since memdebug no longer requires it
2005-12-28 23:07:06 +01:00
Jonas Fonseca
3d0fc33785
set_mem_comment(): Use memcpy() + NUL assignment instead of safe_strncpy()
...
... so as not to depend on util/string stuff.
2005-12-28 23:06:23 +01:00
Jonas Fonseca
4feba6d515
Use stdio when printing enhanced values instead of allocating first
2005-12-28 23:02:45 +01:00
Jonas Fonseca
92767165cc
Merge with elution
2005-12-28 21:25:08 +01:00
Jonas Fonseca
4bbc25c532
Remove dependency on util/string.h from dom/string.h
2005-12-28 21:20:55 +01:00
Jonas Fonseca
9bd346c295
dom_scanner_token_contains(): Use strcasecmp() instead of strlcasecmp()
2005-12-28 21:18:08 +01:00
Jonas Fonseca
fb6ca9a390
Use dom_string for storing the name member of dom_scanner_string_mapping
2005-12-28 21:10:05 +01:00
Jonas Fonseca
f1015f8a6a
Make files include dom/string.h instead of util/string.h directly
2005-12-28 20:45:55 +01:00
Jonas Fonseca
e34d0d3de4
Initialize the string->length in init_dom_string()
2005-12-28 19:49:22 +01:00
Jonas Fonseca
04ff274663
Merge with elution
2005-12-28 17:20:27 +01:00
Jonas Fonseca
5a936cf99c
Fix parsetst building
2005-12-28 17:16:39 +01:00
Jonas Fonseca
1b71368459
Add proof-of-concept stand-alone test binary which just prints Hello World
...
May it multiply in great numbers and help to stabilize the DOM
implementation.
2005-12-28 17:10:01 +01:00
Jonas Fonseca
1bd0c8758e
Make the DOM node creators take dom_string structs
2005-12-28 16:47:28 +01:00
Jonas Fonseca
ec7b293e4e
Some minor cleanup of token string access
2005-12-28 16:34:42 +01:00
Jonas Fonseca
6e163b186c
Make the dom_scanner_token store it's string in a dom_string struct
2005-12-28 16:23:36 +01:00
Jonas Fonseca
97c702c674
Make init_dom_select() take dom_string struct
2005-12-28 15:57:37 +01:00
Jonas Fonseca
2e4e404145
Make init_dom_scanner() take the source string as a dom_string struct
2005-12-28 15:55:21 +01:00
Jonas Fonseca
62d981c551
Store struct dom_scan_table_info data in a dom_string
2005-12-28 15:51:31 +01:00
Jonas Fonseca
73785bee02
Remove some unneeded #includes
2005-12-28 15:36:58 +01:00
Jonas Fonseca
dbf0948062
Do not decode entity references and fix the tree tracer for document nodes
...
The idea is to make the DOM thing not depend on too many external things.
2005-12-28 15:27:05 +01:00
Jonas Fonseca
d1e275be52
Make parse_sgml() take buffer as dom_string struct
2005-12-28 15:21:45 +01:00
Jonas Fonseca
11e168aba4
Make init_sgml_parser() take URI as dom_string struct
2005-12-28 15:19:10 +01:00
Jonas Fonseca
a21f192199
Remove some left over .vimrc files
2005-12-28 14:14:12 +01:00
Jonas Fonseca
71533eef9a
Elute all DOM-related code and put it in src/dom
2005-12-28 14:05:14 +01:00
Miciah Dashiel Butler Masters
81be17108b
Understand a boolean true from elinks.goto_url_hook and
...
elinks.follow_url_hook to mean that the URI should be unchanged and that
further hooks should be permitted to run.
2005-12-28 07:12:09 +00:00
Miciah Dashiel Butler Masters
76d9b9de91
Add elinks.follow_url_hook.
2005-12-28 07:07:21 +00:00
Miciah Dashiel Butler Masters
d7c7736008
Add elinks.goto_url_hook.
2005-12-28 07:06:42 +00:00
Miciah Dashiel Butler Masters
c0fd25b368
Add a read-only .uri property to the cache_entry class.
2005-12-28 06:37:00 +00:00
Jonas Fonseca
217f905d88
call_dom_stack_callbacks(): Only acquire the state data if needed
2005-12-27 15:22:06 +01:00
Jonas Fonseca
a31eaaabdd
Rename parse_sgml_document() -> parse_sgml_plain()
...
It really can be anything. I visited the elusive HTML parser to find the
new ending. ;)
2005-12-27 06:22:53 +01:00
Jonas Fonseca
9e7dfb1ddf
Make walk_dom_nodes() use a stack context; reduces the DOM stack state size
2005-12-27 06:04:01 +01:00
Jonas Fonseca
a4831fef2d
Make it easier to work with DOM stack contexts outside of the callbacks
...
The problem is to get access to the context when it is not the first one
and it has to happen outside of the context callbacks. This changes the
memory management so that the context adder returns the context. To further
improve the use of contexts add a context destructor which makes it
possible to unregister (temporary) contexts.
2005-12-27 05:59:12 +01:00
Jonas Fonseca
774aa70c6f
Drop (now) unused get_dom_stack_parent() wrapper for get_dom_stack_state()
2005-12-27 04:44:20 +01:00
Jonas Fonseca
af19f811e3
Simplify DOM node popping
...
.. by turning do_pop_dom_node() into pop_dom_node() and let pop_dom_state()
handle it's own logic for reaching the wanted state.
2005-12-27 04:42:28 +01:00
Jonas Fonseca
f371de1638
Restructure the SGML parser file and add comments to the main parts
2005-12-27 03:57:56 +01:00
Jonas Fonseca
f5b32f86d1
Drop some dead code related to past rendering of DOM attribute nodes
2005-12-27 03:55:34 +01:00
Jonas Fonseca
b36229c222
Drop some unneeded #includes
2005-12-27 03:33:49 +01:00
Jonas Fonseca
0e2eefcb82
Add missing HTML_(SCRIPT, ...) definition
2005-12-27 01:58:54 +01:00
Jonas Fonseca
cef160d630
No need to have link_form_menu() be a menu function when it has an action
2005-12-26 22:28:38 +01:00
Jonas Fonseca
b82a38ab28
Introduce ACTION_REQUIRE_FORM and use it for link-form-menu
...
... since it asserts it is dealing with a link.
2005-12-26 22:22:03 +01:00
Jonas Fonseca
74a0a7b174
Highlight the 'CDATA' part of <![CDATA[ (in a bit hacky way)
2005-12-26 20:51:01 +01:00
Jonas Fonseca
c99b1cc2cc
Render content of CDATA sections with orange2 (in lack of something better)
2005-12-26 19:56:07 +01:00
Jonas Fonseca
e28f3fc592
Drop macros in favour of more informative direct calls to add_sgml_node()
2005-12-26 19:45:58 +01:00
Jonas Fonseca
98d7263c2f
Parse <[CDATA[ sections ]]>
2005-12-26 19:43:32 +01:00
Miciah Dashiel Butler Masters
62de7cc750
In delayed_goto, do not load the page if the doc_view has changed since
...
the delayed_goto was registered. This fixes bug 611, the infinite loop
on Gmane.
2005-12-26 14:12:45 +00:00
Miciah Dashiel Butler Masters
92c9b86374
In add_document_line, check expanded + line_pos rather than just
...
expanded when checking whether there are enough characters on the line
to decrement expanded by 2. This fixes the problem reported by fonseca
where the linked text was offset from the URI when there were backspaces
earlier on the line.
2005-12-26 11:43:18 +00:00
Miciah Dashiel Butler Masters
eeb51bffea
Refresh the view after selecting a new form item with the form menu.
2005-12-26 11:31:05 +00:00
Miciah Dashiel Butler Masters
bcdc69e86a
Use intdup for the new form menu because you can't just put an int in
...
a void * and expect it to work everywhere.
2005-12-26 11:25:03 +00:00
Miciah Dashiel Butler Masters
a33547d8ad
Add memory-leak tracing to intdup.
2005-12-26 11:22:05 +00:00
Miciah Dashiel Butler Masters
1602bd5d29
Factor intdup out of smjs_get_keymap_object.
2005-12-26 11:07:15 +00:00
Miciah Dashiel Butler Masters
e64871f5e2
Drop some dead code in add_document_line: line_pos should never be
...
negative.
2005-12-26 10:31:06 +00:00
Laurent MONIN
26c9bdf538
Move code from kbd_listbox() to new do_kbd_listbox_action().
2005-12-26 11:02:39 +01:00
Laurent MONIN
918fed9966
kbd_listbox(): converts if {} stuff to a switch{}.
2005-12-26 10:53:39 +01:00
Laurent MONIN
9683cf429b
display_listbox_item(): clarify tests a bit.
2005-12-26 10:39:07 +01:00
Jonas Fonseca
26b82953ce
Add a "Form fields" entry to the link menu (if it is a form field)
...
The menu shows a list of all fields of a form, with the possibility to jump
right to that form field when selecting an entry. The menu text is the
basic form field label "Radio button", "Text field", etc. with the form
field name or alt text as the right menu text.
It introduces a new main action called link-form-menu with no default
binding.
Requested by Klaus Knopper, as a mean to improve accessibility for complex,
overloaded pages like ebay.com.
2005-12-26 01:27:44 +01:00
Jonas Fonseca
452f31d773
do_action(): Simplify checking of link requisition by testing link != NULL
2005-12-26 00:40:04 +01:00
Jonas Fonseca
1c3f6a8f3b
Place cursor at start of text and only highlight the text in the managers
...
The old behavior would lead screeanreaders to pronounce items like the
bookmarks as "unknown-unknown-<the link name>". That is the border
chars of the tree view would be renderered as "unknown".
Requested by Klaus Knopper.
2005-12-26 00:26:04 +01:00
Jonas Fonseca
be8c68c5f7
Fix matching of file:// URLs which of course have no host name
2005-12-25 16:22:20 +01:00
Jonas Fonseca
5dd9061a55
Allocate the string of nodes being 'linkified'
...
This makes the string actually NUL terminated at the right place and the
matching will never go beyond the text region of the node. One example is
<!--http://elinks.cz/-- > which didn't work before.
2005-12-25 16:08:00 +01:00
Jonas Fonseca
2d020e4879
Extend the URL_REGEX to allow more protocol and stuff like %XX in path part
...
Thanks to peder for suggestions.
2005-12-25 15:45:47 +01:00
Jonas Fonseca
4fa0937ca5
Make URL inside cdata, comment and text nodes accessible
...
It depends on existence of <regex.h> system header and that can be enabled
via document.plain.display_links. The URL regex was supplied by yanek.
2005-12-25 15:16:21 +01:00
Jonas Fonseca
dda6064b47
Add support for nested calls to parse_sgml()
...
It introduces a secondary stack for the SGML parser which records a parsing
in progress (stuff like the scanner and depth where the parsing began).
This should make it possible to eventually call parse_sgml() with the
output created from the ECMASCript's document.write() function or even
output from processing instructions (for example <?php code ?> ;).
2005-12-25 05:43:01 +01:00
Jonas Fonseca
cb90dcd58c
Remove unused variable
2005-12-25 05:19:55 +01:00
Jonas Fonseca
f2ba5e7f6b
Cleanup and remove unnneded code
2005-12-25 04:40:58 +01:00
Jonas Fonseca
40ae683bfb
match_attribute_value(): Actually do the matching
...
This is still untested like the last patch.
2005-12-25 04:38:30 +01:00
Jonas Fonseca
fc35d9ee33
Implement matching of element relations for DOM selection
...
It requires searching the select_data stack for all matches of the parent
selector and check the properties of matched nodes.
2005-12-25 03:48:53 +01:00
Jonas Fonseca
1347678988
Introduce get_dom_node_list_index() to lookup the index of a node in a list
2005-12-25 03:46:01 +01:00
Jonas Fonseca
d36b2d8a36
get_dom_select_data(): Move macro nearer to its users
2005-12-25 02:43:08 +01:00
Jonas Fonseca
61185ff34e
Make ECMAScript browser scripting configurable
...
Either set CONFIG_SM_SCRIPTING in features.conf or pass to ./configure the
option --disable-sm-scripting. Now scripting is also enabled when needed
and not only if some other scripting backend is enabled.
Remove some remnants of SEE scripting backend.
2005-12-25 02:23:54 +01:00
Miciah Dashiel Butler Masters
309f3d26f3
In smjs_get_keymap_object, free the private data JS_SetPrivate fails,
...
per fonseca's suggestion.
2005-12-24 18:07:55 +00:00
Miciah Dashiel Butler Masters
f46cdd8f03
Add elinks.location property to get and set the current URL.
2005-12-24 18:05:32 +00:00
Miciah Dashiel Butler Masters
b13d35dc5a
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-24 18:02:12 +00:00
Jonas Fonseca
a08a3aca8f
elinks_goto_url(): Remove evil goto and simplify matters
2005-12-24 15:30:21 +01:00
Jonas Fonseca
ce2aa08cb1
Compile fix
2005-12-24 13:07:57 +01:00
Miciah Dashiel Butler Masters
d44a24050c
Undo in favour of a nicer API...
2005-12-24 07:17:36 +00:00
Miciah Dashiel Butler Masters
054fb15ff0
Add an elinks.goto_url method.
2005-12-24 07:14:51 +00:00
Miciah Dashiel Butler Masters
330cd6b7ce
Assign the given ses to smjs_ses while the ECMAScript callback runs in
...
smjs_keybinding_action_callback.
2005-12-24 07:01:17 +00:00
Miciah Dashiel Butler Masters
f1fe83b035
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-24 06:54:43 +00:00
Miciah Dashiel Butler Masters
80a5467b8d
Introduce get_action_from_keystroke and get_action_name_from_keystroke.
...
Introduce smjs_init_keybinding_interface, which creates elinks.keymaps.<map>
for <map> in "main", "edit", and "menu". elinks.keymaps.<map> is a hash
indexed by string representations of keystrokes, and can be used to get the
current action for a key and to set the action either to an internal ELinks
action or to an ECMAScript function.
2005-12-24 06:54:01 +00:00
Miciah Dashiel Butler Masters
5714a8b54e
Factor kbd_stroke_lookup out of bind_act.
2005-12-24 05:40:40 +00:00
Miciah Dashiel Butler Masters
92da153e13
Lock the struct cache_entry when creating the corresponding ECMAScript
...
object in smjs_get_cache_entry_object and unlock it in the new finalizer
cache_entry_finalize.
2005-12-24 04:07:32 +00:00
Miciah Dashiel Butler Masters
f8de70b8f6
Comment smjs_elinks_object.
2005-12-24 03:49:06 +00:00
Miciah Dashiel Butler Masters
9b645f9b66
Move smjs_elinks_object to elinks_object.h.
2005-12-24 03:48:57 +00:00
Miciah Dashiel Butler Masters
8743ec74d8
Factor the initialisation of smjs_elinks_global out of init_smjs and
...
into the new smjs_init_elinks_object.
2005-12-24 03:47:34 +00:00
Miciah Dashiel Butler Masters
60dd7515f9
Change smjs_get_elinks_object to use smjs_global_object instead of
...
an argument.
2005-12-24 03:43:53 +00:00
Miciah Dashiel Butler Masters
d6ecf895ce
Make global_object a global with the new name smjs_global_object and
...
create smjs_init_global_object to initialise the global.
2005-12-24 03:40:59 +00:00
Miciah Dashiel Butler Masters
3174c533b0
Factor smjs_get_global_object out of init_smjs.
2005-12-24 03:39:24 +00:00
Jonas Fonseca
73b599e637
Merge with git+ssh://pasky/srv/git/elinks.git
2005-12-23 01:05:12 +01:00
Jonas Fonseca
8d30613a7f
The child node list can be NULL when matching for the :empty pseudo-class
...
Also use the children node list and not the attribute list (aka the map).
2005-12-23 01:03:39 +01:00
Jonas Fonseca
3ea1b30fd6
Fix matching of the :root structural pseudo-class
...
Root nodes either have no parents or are the single child of the document
node.
2005-12-23 00:59:56 +01:00
Jonas Fonseca
755108cf95
Tidyup
2005-12-23 00:53:31 +01:00
Jonas Fonseca
4d6223f6a4
Oops, compile fix
2005-12-23 00:52:52 +01:00
Jonas Fonseca
12d34fd133
Factor out code to new match_element_selector()
...
'Twill make it easier to do the logic.
2005-12-23 00:51:57 +01:00
Miciah Dashiel Butler Masters
2a0653a9f2
Fix the comment heading to say ECMAScript instead of Ruby.
2005-12-22 23:45:12 +00:00
Jonas Fonseca
07fc481607
match_attribute_selectors(): Factor out matching of values to own function
2005-12-23 00:11:25 +01:00
Jonas Fonseca
262856273e
Drop unused get_dom_node_attributes(), comment get_dom_node_list()
2005-12-22 23:42:23 +01:00
Jonas Fonseca
faa85adf73
dom_select_push_element(): Use dom_node_casecmp() and drop homegrown one
2005-12-22 23:40:11 +01:00
Jonas Fonseca
1f47fabf5e
Rename dom_node_cmp() to dom_node_casecmp() and make it public
2005-12-22 23:37:59 +01:00
Jonas Fonseca
b13a21bbc2
dom_node_cmp(): Make it into a general node comparer
2005-12-22 23:35:17 +01:00
Jonas Fonseca
6dfd7a5988
When searching DOM node lists store the subtype in the search struct's node
2005-12-22 23:29:07 +01:00
Jonas Fonseca
558e2736e4
search_dom_stack(): Use dom_string_casecmp() for comparison
2005-12-22 22:28:38 +01:00
Jonas Fonseca
c4a1031b2e
Move code for the final source highlight flushing to document pop callback
...
This requires the document root stack state is made mutable and is popped.
Should make render_dom_document() more generalised. For SGML_PARSER_STREAM
this has the fun property that the stack will magically free the root node.
2005-12-22 12:33:27 +01:00
Jonas Fonseca
6f3f859578
parse_sgml(): After parsing pop the stack back to the depth it was before
2005-12-22 12:28:22 +01:00
Jonas Fonseca
4eae1d4882
Add a few comment and remove an obsolete one
2005-12-22 04:00:55 +01:00
Jonas Fonseca
9c720c2cc8
Rename the DOM tree renderer to DOM stack tracer
...
Use add_dom_stack_tracer(stack) to have stack activity traced. It is only
active when DOM_STACK_TRACE is defined.
2005-12-22 03:55:55 +01:00
Jonas Fonseca
cb64068712
Make it so that the indent string used by the tree renderer needs no init
2005-12-22 03:33:56 +01:00
Jonas Fonseca
f21fcd132f
Oops, do not define DOM_TREE_RENDERER by default
2005-12-22 03:21:52 +01:00
Jonas Fonseca
6cb9a841b6
Add FIXME about optimizing walk_dom_nodes()
2005-12-22 03:20:11 +01:00
Jonas Fonseca
eab6c19bbe
Add lots of comments and FIXMEs
2005-12-22 03:19:53 +01:00
Jonas Fonseca
bd5d53a2a2
Use get_opt_codepage_tree()
2005-12-22 00:03:30 +01:00
Jonas Fonseca
25e0a18b7f
Misc DOM select fixes
...
- ensure done_dom_stack() is called after parsing is done
- get_dom_select_data(): Use stack->current->data since it is used within
dom_stack_callback_T
- dom_select_pop_element(): Use stack->contexts since it is the
select_data stack and it owns the first context
- add the select_data context to the right stack
- fix some comments
2005-12-21 23:26:22 +01:00