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
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
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
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