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

732 Commits

Author SHA1 Message Date
Jonas Fonseca
9090b68bd6 FSP: Check and exit the file 'writer' process if writes to stdout fails
This ensures that the 'writer' process will remove itself when the
main ELinks process for some reason decides to shutdown the connection.
Before the 'writer' process would complete it's task taking up unnecessary
system resources.

This is mostly an issue when fetching big files. Therefore only file
fetching is fixed. FIXME added about also checking return codes for write
associated with directory listing.

Reported-by: zas
2006-11-27 17:46:51 +01:00
Laurent MONIN
135a79a3c3 Include <sys/types.h> and fix compilation on an old PPC/Debian system
It should be included via elinks.h but apparently some other system header
can prevent this somehow on some systems.

Reported-by: Phillip Pi <ant@zimage.com>
2006-11-27 17:38:00 +01:00
Jonas Fonseca
2c40cb003c Ignore test files 2006-11-27 17:36:29 +01:00
witekfl
8bedf25bf8 goto_url_hook takes 2 params not 1. Some dumbprefixes defined in hooks.py 2006-11-27 17:13:02 +01:00
witekfl
e1ae6a0cdf Added slash to base href when directory didn't end with '/' 2006-11-27 17:08:18 +01:00
witekfl
d580483c6b Compilation fix 2006-11-27 17:07:13 +01:00
Miciah Dashiel Butler Masters
8dabb246ae 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-11-27 17:04:43 +01:00
witekfl
522ee24ab8 Compilation fixes 2006-11-27 17:03:34 +01:00
Jonas Fonseca
af7ce38639 BOOKMARKS: Fix XBEL calling add_bookmark() with NULL title
It didn't check that both title and title->text was non NULL. In either
case it now passes "No title" string to add_bookmark().

Reported by Neuromancer.

Tested with both:

	<bookmark href="empty://title"><title></title><bookmark>
	<bookmark href="no://title"></bookmark>
2006-11-27 16:56:12 +01:00
Kalle Olavi Niemitalo
67d6474684 Bug 846: Document the expected parents of form_elements_class instances.
This should have been in commit 92290b73a9.
The corresponding commit e76e047196 in the
REL_0_10 branch does include it.
2006-11-26 19:06:28 +02:00
Kalle Olavi Niemitalo
f2854e19ba SMJS: keymap_get_property: fix build error
Fix an error in the order of variable initialisation that was introduced
in commit 9a829b3277.

(Copied from a2c48b4d91fe6c6998836deca73eb93d324630df in ELinks 0.12.GIT.)
2006-11-26 15:57:52 +02:00
Miciah Dashiel Butler Masters
a44e72161f SMJS: keymap_set_property: fix build error
Fix an error in the order of variable initialisation that was introduced
in commit 9a829b3277.

(Copied from eaed0315993b07a20211b151a53ba7bd4553dff0 in ELinks 0.12.GIT.)
2006-11-26 15:54:35 +02:00
Kalle Olavi Niemitalo
0744d96213 Bug 846: Add plenty of JS_InstanceOf assertions and checks.
(Adapted from 47dce0922b in ELinks 0.12.GIT.)
2006-11-25 21:24:25 +02:00
Kalle Olavi Niemitalo
9a829b3277 Bug 846: Separate JS_GetParent & JS_GetPrivate calls from initializations.
This will allow the types of objects to be checked before those calls.

(Adapted from bbf0d478e9 in ELinks 0.12.GIT.)
2006-11-25 21:14:56 +02:00
Kalle Olavi Niemitalo
4c58b4c56c Bug 846: Rename some local variables.
Rename parent to parent_win if it points to an instance of window_class.

(Adapted from 98a120b3d5 in ELinks 0.12.GIT.)
2006-11-25 21:01:53 +02:00
Kalle Olavi Niemitalo
59df2a3d11 Bug 846: Document the JSClass assumed in each JS_{Set,Get}Private call.
(Adapted from 356678dd80 in ELinks 0.12.GIT.)
2006-11-25 20:56:09 +02:00
Kalle Olavi Niemitalo
92290b73a9 Bug 846: Document the expected parents of SMJS class instances.
(Copied from 36f5f73a60 in ELinks 0.12.GIT.)
2006-11-25 20:50:34 +02:00
Kalle Olavi Niemitalo
fcebd6d111 Bug 846: Comments on the relations between JSClasses and functions.
(Adapted from 670ad939c3 in ELinks 0.12.GIT.)
2006-11-25 20:48:29 +02:00
Kalle Olavi Niemitalo
ffa24fd3e0 Bug 846: Document the private data in each SMJS class.
(Adapted from d6ea143f36 in ELinks 0.12.GIT.
 ELinks 0.11.2.GIT doesn't have src/scripting/smjs/action_object.c and
 src/scripting/smjs/globhist.c.)
2006-11-25 20:35:48 +02:00
Kalle Olavi Niemitalo
6f14725204 Bug 841, CVE-2006-5925: Prevent enabling the SMB protocol.
src/protocol/smb/smb.c: Added #error directives so that this
vulnerable code cannot be accidentally compiled in.

features.conf: Disable CONFIG_SMB by default and explain why.

configure.in: If the user set CONFIG_SMB in features.conf or
--enable-smb in the command line, disable them and warn the user.

(This commit combines f915c31127 and
388de7bd65 from ELinks 0.12.GIT.)
2006-11-18 22:37:51 +02:00
Witold Filipczyk
8789b7c330 Ecmascript: activate link only when onClick returns true
[ Merge stuff from commit c3f17eadeb, namely
  the remaining part which changes enter() to only call activate_link when
  needed. --jonas ]
2006-08-22 23:49:40 +02:00
Jonas Fonseca
fcf8d31eba Fix compilation on Minix3
- Include arpa/inet.h to get hton* ntoh* functions.
 - Use socklen_t instead of int.
 - Try to define PF_INET to AF_INET if it doesn't exist.

Reported-by: Andy Tanenbaum <ast@cs.vu.nl>
2006-08-22 22:10:51 +02:00
Jonas Fonseca
205f346d49 Use internal OFF_T_FORMAT instead of PRId64
... since the latter is for printing int64_T and we don't check for that and
we use PRId64 only for printing values having the off_t types.

Besides off_t has it's own ELinks specific defaults so it should be safer
to use an internal format string. If off_t is 8 bytes use "lld" else use
"ld".

Reported-by: Andy Tanenbaum <ast@cs.vu.nl>
2006-08-05 00:39:14 +02:00
Jonas Fonseca
038f3a4502 Apply the many changes to Makefile.lib in one go
This fixes make test dependencies and a lot more things.
2006-01-29 12:41:14 +01:00
Jonas Fonseca
081ab78a88 Revert 06eb3fa02abf12c6d2352af4288a6ad465a0e8c1 (in the historic repo)
This was reverted by zas in commit 2a71adda10
in current HEAD (elinks-0.12).

The original commit message reads: Anchors with '#' didn't "work" for
libstdc++ local documentation due to encoded filenames. This change fixes
it and hopefully has no impact for other parts of ELinks.
2006-01-29 12:28:43 +01:00
Jonas Fonseca
ba68992ef2 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 12:06:30 +01:00
Miciah Dashiel Butler Masters
b9d5bcee1c 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-29 12:02:08 +01:00
Jonas Fonseca
b69e0d4eb2 Fix out of bound access to the scanned string 2006-01-29 11:54:35 +01:00
66500fa4ab Set text/plain for errors 2006-01-29 11:43:25 +01:00
bd4be81013 Content-Type handling 2006-01-29 11:42:43 +01:00
b530860e5a Use slashes after directories. Blocks are not used where there is only
one instruction
2006-01-29 11:41:33 +01:00
Jonas Fonseca
fac4c2631f Handle <base href=""> for HTML source rendering
Requested by witekfl.
2006-01-29 11:41:13 +01:00
Jonas Fonseca
b7ffca5485 Rename enum html_element_type to html_element_mortality_type
This name is reserved for DOM.
2006-01-29 11:32:14 +01:00
Jonas Fonseca
1d516527ca Fix the mailcap test program's dependency on gettext 2006-01-29 11:28:38 +01:00
Jonas Fonseca
b53efd138b Fix the EPLF FTP parser test to run FreeBSD 2006-01-29 11:28:26 +01:00
8a1a2d427b 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-29 11:28:05 +01:00
Jonas Fonseca
9ddadc3075 #include dom/node.h instead of dom/stack.h 2006-01-29 11:22:08 +01:00
Miciah Dashiel Butler Masters
2cab7a5455 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-29 11:19:34 +01:00
witekfl
a191b4dc31 Used protocol/common.h in CGI 2006-01-29 11:19:18 +01:00
Jonas Fonseca
2074c8ca88 Remove unused fsp_info struct; use sizeof(*table); fix dir entry hiliting 2006-01-29 11:16:48 +01:00
Jonas Fonseca
2b27347359 Simplify URI string grapping; make dir listing more like FTP; use READ_SIZE 2006-01-29 11:16:20 +01:00
Jonas Fonseca
91f0abfbc1 Minor space cleanups; use pid_t; abort_connection() will close_socket() 2006-01-29 11:16:07 +01:00
Laurent MONIN
78a54412c3 Typo fix. 2006-01-29 11:15:31 +01:00
Jonas Fonseca
af67388201 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-29 11:15:18 +01:00
c287c42a07 Make PHP 5 happy. 2006-01-29 11:06:09 +01:00
9341c9085e - FSP protocol 2006-01-29 11:03:53 +01:00
Jonas Fonseca
1b999c9b6a Remove .vimrc files; use the Vim ftplugin instead 2006-01-29 10:45:22 +01:00
Laurent MONIN
0983c5c764 Fix a memleak that may occur on systems without alloca(), backport from
gettext 0.14.5.
2006-01-29 10:27:41 +01:00
Laurent MONIN
9c767f491f Upgrade config.charset to latest version from gnu gettext. 2006-01-29 10:27:27 +01:00
Jonas Fonseca
f19aa38e1f Fix typo 2006-01-29 10:25:18 +01:00
Jonas Fonseca
d7571e313c Cleanup SGML info backends #includes and description 2006-01-29 10:25:03 +01:00
Laurent MONIN
1f7bc476c6 Add a comment about CONFIG_TCP_INTERLINK. 2006-01-29 10:22:30 +01:00
Laurent MONIN
92387e4478 Store lib.o name in a variable named LIB_O_NAME. 2006-01-29 10:22:19 +01:00
Jonas Fonseca
a456cdbea3 Include osdep/stat.h to get S_* macros 2006-01-29 10:17:37 +01:00
Jonas Fonseca
d80b072e1b Compile fix after check_uri_file() after the cleanup 2006-01-29 10:15:16 +01:00
Laurent MONIN
e03aacf5d3 Complete the list of S_I* macros. 2006-01-29 10:02:55 +01:00
Laurent MONIN
1c95d6c2af Simplify secure_open() call, make it a wrapper around secure_open_umask(). 2006-01-29 10:02:46 +01:00
Laurent MONIN
5fd2b6228f Prefer S_I?USR and S_IRWXU over obsolete S_IREAD, S_IWRITE, S_IEXEC. 2006-01-29 10:01:30 +01:00
Laurent MONIN
347b3530a1 Use mode_t and mode macros everywhere. 2006-01-29 09:59:09 +01:00
Jonas Fonseca
2d95ad040c As a stop gap measure avoid using NULL entry->nonce and realms
Reported by xmath. Obviously needs to be looked into.
2006-01-10 16:09:04 +01:00
Jonas Fonseca
8a8ef8ae6a This years batch of Gopher fixes
Two crash fixes, and really make the directory 'view' the default.
2006-01-10 16:07:17 +01:00
Kalle Olavi Niemitalo
63797ae9b3 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-10 16:06:09 +01:00
Laurent MONIN
857138d391 check_uri_file(): use strcspn(). 2006-01-10 16:03:49 +01:00
Miciah Dashiel Butler Masters
b4edfc977d 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-10 16:00:12 +01:00
Miciah Dashiel Butler Masters
2011629449 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-10 16:00:03 +01:00
Laurent MONIN
bba44965bf check_uri_file(): optimize by not using strlen() more than needed. 2006-01-10 15:59:39 +01:00
Laurent MONIN
0ca96e9ae9 check_whether_file_exists(): optimize by not using strlen() more than
needed.
2006-01-10 15:59:32 +01:00
Jonas Fonseca
3a6d465d94 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-10 15:58:50 +01:00
Jonas Fonseca
1a1bf9960d Add a simple test script of the mailcap cache
It has a few nasty hacks to reduce the dependencies on defined symbols.
2006-01-10 15:58:06 +01:00
Jonas Fonseca
754d56b451 Realign the test docs with reality 2006-01-10 15:48:48 +01:00
Jonas Fonseca
da9c03b278 Use get_opt_codepage_tree() and kill warning 2006-01-10 15:47:18 +01:00
Laurent MONIN
daef63dd27 Define EL_PF_INET and EL_PF_INET6 to identify protocol in use instead
of numeric values.
2006-01-10 15:47:10 +01:00
Laurent MONIN
d9b56bad7d Use PF_* instead of AF_* as first parameter of socket(2). 2006-01-10 15:46:57 +01:00
Jonas Fonseca
4035b6ba66 Drop unneeded -b arg to cmp, which isn't available in FreeBSD's version 2006-01-10 15:46:41 +01:00
Jonas Fonseca
4cbaad6f8d 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-10 15:44:29 +01:00
Jonas Fonseca
46922582a8 Rbuild the entity table with Unicode/gen-ent 2006-01-10 14:38:54 +01:00
Jonas Fonseca
2abfbda9d9 Merge in the 0x???? chars and fix some incomplete descriptions
Skip entities with unknown unicode (0x????) in gen-ent. Thanks to Miciah
for noticing a missing description part.
2006-01-10 14:22:00 +01:00
Laurent MONIN
19c7196c05 Update year to 2006 in Copying message. 2006-01-10 14:13:11 +01:00
Laurent MONIN
43d47ade42 Let ftp-parser displays usage information when called with no arg or
empty string, instead of core dump in debug mode.
2006-01-10 14:13:01 +01:00
Jonas Fonseca
065b8f405a Drop empty lines from option descriptions; doc/tools/help2doc don't like em 2006-01-10 14:12:06 +01:00
Jonas Fonseca
fa23a65b81 Add support for recursively running all tests 2006-01-10 14:10:08 +01:00
Jonas Fonseca
d048bb4888 Make a test-ftp-parser test script and remove the 'built-in' one 2006-01-10 14:09:49 +01:00
Jonas Fonseca
9debe3b3ae 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-10 14:06:17 +01:00
Jonas Fonseca
b52baed88f Move src/dom/test/libtest test/libtest.sh, put path to it in TEST_LIB 2006-01-10 14:05:58 +01:00
Miciah Dashiel Butler Masters
d4cceb5f0e 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-10 14:03:32 +01:00
Laurent MONIN
9d287c24ae Add missing b flag to fopen() call. 2006-01-10 14:01:46 +01:00
Jonas Fonseca
6e24450bdf Improve (or rather fix) how document types are matched in the DOM renderer 2006-01-10 14:01:22 +01:00
Jonas Fonseca
9e7d920663 Use the simpler strcasecmp() instead of strcaselcmp() 2006-01-10 14:01:14 +01:00
Jonas Fonseca
b01c1a6361 Also highlight HTML if the MIME type is application/xhtml+xml 2006-01-10 14:01:03 +01:00
Jonas Fonseca
dabe0816fb Fix more problems when $(srcdir) is empty
Thanks to Kalle Olavi Niemitalo and Adam Golebiowski.
2006-01-10 14:00:11 +01:00
Miciah Dashiel Butler Masters
637fc46281 Change the keyboard accelerator for the cookie browser's Clear button
from C to L for great consistency.
2006-01-10 13:55:35 +01: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