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

1058 Commits

Author SHA1 Message Date
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
b9a3855f98 Use ===, which checks for equality of value as well as equality of type,
instead of doing both checks separately.
2005-12-29 07:32:12 +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
10e8282e7c Add a hooks.js for SpiderMonkey to make Jonas happy. 2005-12-29 07:06:35 +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
ca4e79f123 Drop .or from elinks.or.cz. 2005-12-29 04:43:25 +00:00
Miciah Dashiel Butler Masters
efcc17428f Update the reference to the bookmarks documentation with a valid URI. 2005-12-29 04:38:26 +00:00
Miciah Dashiel Butler Masters
59ffb72b8f Drop .or from elinks.or.cz. 2005-12-29 04:35:02 +00:00
Miciah Dashiel Butler Masters
6ee8bc7966 Fix an error message: the cvs prefix takes one to three arguments,
not two to three.
2005-12-29 04:19:27 +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