1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04:00
Commit Graph

772 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
4a9b80eea0 Bug 908, activate_link: Set fs->state before the fs pointer becomes invalid.
[ From commit 15dce57bc9 in ELinks
  0.12.GIT.  --KON ]
2007-03-31 23:59:14 +03:00
Kalle Olavi Niemitalo
0003e4762c Bug 772: Recognize ESC [ Z as Shift-Tab, and bind it like Alt-Tab by default.
[ From commit b42f0ba153 in ELinks
  0.12.GIT.  I'll add a NEWS entry as a separate commit.  --KON ]
2007-03-31 23:05:53 +03:00
Laurent MONIN
fd83797cae HTTP DIGEST AUTH: fix wrong sizeof(), patch by Vitaly Lavrov (added to
AUTHORS). Close bug 769.

[ From commit c2ca89cab1 in ELinks
  0.12.GIT.  I'll add a NEWS entry as a separate commit.  --KON ]
2007-03-31 22:55:52 +03:00
Kalle Olavi Niemitalo
af82ab8af7 Advertise smb2.c to be included in ELinks 0.12.0. 2007-03-27 01:41:26 +03:00
Kalle Olavi Niemitalo
f135339a1a add_string_to_string: Don't fail if @from is empty.
Old versions of add_string_to_string returned the target string
unmodified if from->source pointed to a null character, which usually
meant that the source string was empty.  That was changed in commit
5e18576391f75ad84e04f9c8a30b93d08f0b92ab on 2004-11-03 so that
add_string_to_string instead returned NULL in that situation.  The
change seems to have been inadvertent.

I'm now reverting that change and also making add_string_to_string
check the emptiness of the source string based on the stored length
only, rather than on any null characters.  So the function can now
also be used with non-C strings containing embedded null characters.
Note that the previous version did not completely prevent embedded
null characters either, because it checked only the first character.

[ From commit 4a23d7fd82 in ELinks
  0.12.GIT.  --KON ]
2007-03-18 21:18:02 +02:00
Witold Filipczyk
fd70a5b352 get_attr_value: do not do trim_chars
trim_chars was called only in debug mode and the results of the get_attr_val
for value=" something " in debug mode differ from normal and fastmem mode.

[ From commit e347122e6d in ELinks
  0.12.GIT.  --KON ]
2007-03-18 13:50:34 +02:00
Witold Filipczyk
8104dc80cd accesskey: start iterating with next link.
Rotating between links with the same accesskey works.

[ Backported from commit d2970e57af
  in ELinks 0.12.GIT.  --KON ]
2007-03-18 13:22:42 +02:00
Witold Filipczyk
94ff057a6c Accesskey didn't work as it should.
[ Backported from commit 682ad62a97
  in ELinks 0.12.GIT.  --KON ]
2007-03-18 13:21:36 +02:00
Kalle Olavi Niemitalo
518cf082db add_html_to_string: If out of memory, roll back and return NULL.
[ Backported from commits 28645973e5
  and b7dddaa685 in ELinks 0.12.GIT.
  --KON ]
2007-03-18 12:38:19 +02:00
Kalle Olavi Niemitalo
1c3c19c91b ftp, add_file_cmd_to_str: Check errors from string functions.
Use goto for error handling.  Free all strings in the same place.

[ Bug 942; backported from commit c6b8fa7151
  in ELinks 0.12.GIT.  --KON ]
2007-03-18 12:31:29 +02:00
Kalle Olavi Niemitalo
465166a940 Reject CR and LF characters in FTP pathnames.
[ Bug 942; backported from commit adfde652b9
  in ELinks 0.12.GIT.  --KON ]
2007-03-18 12:29:11 +02:00
Witold Filipczyk
feb3f21b34 ftp: ftp didn't handle filenames with spaces.
[ Bug 942; backported from commit 3f4de99f16
  in ELinks 0.12.GIT.  I omitted the part of the patch that decodes
  FTP URLs for HTML TITLE, because I think it's an enhancement rather
  than a bug fix.  --KON ]
2007-03-18 12:28:06 +02:00
Kalle Olavi Niemitalo
2f4b3dae69 string_assert: First arg of elinks_internal is a format string.
[ Backported from commit a73d165fd7
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 14:02:17 +02:00
Kalle Olavi Niemitalo
0286a66c98 XBEL: Fix us-ascii charset lookup.
Previously, print_xml_entities did look up the charset, but did not
save the result anywhere and just used 0, leading to further lookups
in subsequent calls.  It worked by accident though, because the
codepage index of us-ascii currently is 0.

[ Backported from commit e325b748be
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 14:01:08 +02:00
Kalle Olavi Niemitalo
fe886d198d textarea_edit: Cast size_t fx_maxlength to match "%u".
[ Backported from commit 0dfb88c802
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 14:00:18 +02:00
Kalle Olavi Niemitalo
0b7097ca9f cgi: Avoid assertion failure when the POST data is empty.
[ Backported from commit 701e7e3e64
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:57:34 +02:00
Witold Filipczyk
daf5d88405 cgi: Fix the possible memleak and close pipes in case of error.
[ Backported from commit 035ce283c7
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:55:30 +02:00
Witold Filipczyk
a64dd281e9 POST method of CGI did not work. It works now.
[ Backported from commit eef7924ff1
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:50:09 +02:00
Kalle Olavi Niemitalo
8d9837a015 cgi: Ensure correct type of NULL pointer to variadic execl.
[ Backported from commit 4c636d74f1
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:48:36 +02:00
Witold Filipczyk
4a624fceb8 cgi: set_nonblocking_fd
[ Backported from commit 2828d587b2
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:47:26 +02:00
Kalle Olavi Niemitalo
7fdad68e7e Bug 937, http_send_header: Initialize the entry pointer.
In ELinks 0.12.GIT, it was already initialized before the bug 937 fix.
2007-02-25 17:11:38 +02:00
Kalle Olavi Niemitalo
7c0027bf26 Bug 937, http_send_header: Don't send all headers to CONNECT proxy.
Backported from ELinks 0.12.GIT (4e4dddb4cc).
2007-02-25 15:17:03 +02:00
Kalle Olavi Niemitalo
1f65dd2802 Bug 919, mem_mmap_realloc: Don't overflow the buffer when shrinking it.
The bug was possible only #ifndef HAVE_MREMAP, thus not on Linux.

Backported from ELinks 0.12.GIT (4ae90c798c).
2007-01-02 20:43:58 +02:00
Jonas Fonseca
d18333075d Bug 899: Fix size handling in FTP directory listings
This fixes parse_ftp_number to use off_t instead of long to store its
(intermediate) result and return type. It also introduces an OFFT_MAX type
"limit" that is used for validating the size of the parsed number.

A test-case for was added in 37c9bf3f75 to
test-ftp-parser and the patch has been confirmed to fix the test-case by
adamg and me.  This closes bug 899, which is a duplicate of debian bug
403139.
2006-12-18 18:55:21 +01:00
Jonas Fonseca
a81e623492 Merge with git+ssh://pasky/srv/git/elinks#elinks-0.11 2006-12-04 21:59:49 +01:00
Jonas Fonseca
5e0dcf1aaf Bug 831: Make it possible to quote args given to -remote
This fixes the problem with URLs that contain commas and are passed to
ELinks using: -remote openURL(URL). Fixes bug 831.
2006-12-04 21:59:18 +01:00
Kalle Olavi Niemitalo
8751524424 Bug 830: Check -remote command names more strictly.
doc/remote.txt says there must be a nonempty sequence of ASCII
alphabetic characters before the opening parenthesis.  Check that
they really are ASCII characters and that the sequence is nonempty.
Thus, elinks -remote '(foo)' now treats the string as an address,
rather than as a command.
2006-12-04 21:58:33 +01:00
Jonas Fonseca
dbfb34f395 Fix misparsing of -remote URLs containing parenthesis (bug 830)
Be more strict about the format accepted by the ELinks specific extension
to the -remote URL syntax. That is, commands must begin with a nonempty
sequence of ASCII alphabetic characters followed by optional whitespace and
an opening parenthesis. Also, document the syntax.

Fixes bug 830.
2006-12-04 21:58:21 +01:00
Kalle Olavi Niemitalo
796791296a Bug 870: Don't panic if an SMJS property ID is unrecognized.
If ECMAScript code does obj[42], then the getProperty or setProperty
function of the JSClass of obj gets 42 as the property ID and must not
treat that as an internal error.

(Adapted from 7894e30ace in ELinks 0.12.GIT.)
2006-12-03 12:38:59 +02:00
Kalle Olavi Niemitalo
aac8f4582f Bug 846: {get,set}Property check JS_InstanceOf without asserting.
The getProperty and setProperty functions of a JSClass must not assume
that the obj parameter points to an instance of that class.  It might
instead point to another object that merely has an instance of the
class in its prototype chain.  Thus, do not assert that JS_InstanceOf
returns true there.  Instead, run the check even with CONFIG_FASTMEM,
and just return JS_FALSE if it fails.

(Adapted from aa410301f1 in ELinks 0.12.GIT.)
2006-12-03 12:30:41 +02:00
Kalle Olavi Niemitalo
5b9ea6a4ee Bug 868: check_timers: Don't keep pointers to other timers past timer->func. 2006-12-02 21:28:36 +02:00
Timo Lindfors
00ed4bf3ef Fix bug #741: "html comments shouldn't be evaluted inside STYLE elements" 2006-11-27 18:27:40 +01:00
Jonas Fonseca
e189a7e114 Make ELinks more BSD console friendly
Conditionally define keys, such as DEL, when compiling on a system having
the BSD console system headers.

A combination of the changes:
	791cab91e7
	cfbe41aa8a
	fae675316b
2006-11-27 18:18:06 +01:00
Eric Wald
c38e8dc40b Add support for forcing wrapping at the screen boundary
This patch modifies ELinks wrapping behavior slightly.

 * The wrap command now toggles line wrapping in HTML mode, as well as
   text mode.  Note that when the HTML view of a page is wrapped, its
   source view is unwrapped, and vice versa.
 * Tabs in text-mode lines are now handled correctly.
 * Wrapping a line that reaches exactly to the edge of the screen will
   no longer produce a blank line in text mode.
 * Text within extra-wide table cells is now wrapped to less than the
   screen width, to eliminate sideways scrolling.

The last point is only enabled by setting TABLE_LINE_PADDING to a
non-negative number, in the src/setup.h header file, because it is a
significant change of behavior from previous versions.
2006-11-27 18:10:18 +01:00
Miciah Dashiel Butler Masters
4b1425f762 Initially place cursor on the current listbox item
Introduce the macros before_widgets and foreach_widget_back. Use the
latter in update_all_widgets instead of foreach_widget so that the
widgets are printed in reverse order, which means that any listbox is
drawn last, which allows it to grab the cursor from the selected button
when the dialogue box is initialised or redrawn.

Requested by Kirk Reiser for great usability with screen readers.
2006-11-27 18:09:25 +01:00
witekfl
372d32ccec Add slash after host required by URI_HTTP_REFERRER_HOST 2006-11-27 18:05:41 +01:00
Laurent MONIN
734f964714 Fix segfaults caused by ruby scripting (gentoo bug #121247). Backported
from gentoo portage tree.
2006-11-27 18:03:49 +01:00
Laurent MONIN
bcabd8b795 Fix compilation under gcc 4.x. Backported from gentoo portage. 2006-11-27 18:03:49 +01:00
Jonas Fonseca
b0a0527c9f Describe the document.uri_passing option in more depth
Mention the *-external-command actions.
2006-11-27 17:53:41 +01:00
Miciah Dashiel Butler Masters
cd7ad685f7 refresh_view: drop unnecessary call to redraw_from_window
print_screen_status calls redraw_from_window, so there is no need to
call both.
2006-11-27 17:50:58 +01:00
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