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

2156 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
64159aa70a TAGS: Scan *.inc too. Recognize the ACTION_ macro. 2007-05-01 20:21:57 +02:00
Kalle Olavi Niemitalo
13acf06876 Don't mark undisplayed names of modules for translation.
Exclude unneeded header files.  This partially reverts commit
90980a944e, with permission.
2007-05-01 20:21:50 +02:00
Kalle Olavi Niemitalo
ac818c4837 report_scripting_error: Look up module names with gettext. 2007-05-01 20:21:42 +02:00
Laurent MONIN
a4f1b7e489 Mark all module names for translation and include needed header files. 2007-05-01 20:20:15 +02:00
Kalle Olavi Niemitalo
36ce51f912 ftp: Decode strftime results from the system codepage. 2007-05-01 20:20:09 +02:00
Kalle Olavi Niemitalo
605d04378f add_cp_html_to_string: New function.
To be used when strings from gettext or strftime must be inserted
into an HTML document with a potentially different charset.
2007-05-01 20:20:04 +02:00
Kalle Olavi Niemitalo
269a8f4397 ftp: Collect HTML formatting parameters into a structure. 2007-05-01 20:19:58 +02:00
Kalle Olavi Niemitalo
21bdcad9c7 ftp: Allocate a larger buffer for the timestamp string. 2007-05-01 20:19:53 +02:00
Kalle Olavi Niemitalo
b636024ede ftp: Don't pad the timestamp column with spaces. 2007-05-01 20:19:48 +02:00
Kalle Olavi Niemitalo
d696d6530f show_http_error_document: Generate a charset parameter. 2007-05-01 20:19:41 +02:00
Kalle Olavi Niemitalo
b29655f25f file: Directory listings are in the system charset.
Give them a corresponding Content-Type header.  This must go in
cached->head because cached->content_type is supposed to be just
type/subtype.  It will also be deduced from cached->head, so don't set
it separately.
2007-05-01 20:19:34 +02:00
Kalle Olavi Niemitalo
55bce38eee struct directory_entry: Document the charset and mem_free. 2007-05-01 20:19:29 +02:00
Kalle Olavi Niemitalo
e1bc8aafcc add_date_to_string: Let last two parameters point to const. 2007-05-01 20:19:24 +02:00
Kalle Olavi Niemitalo
a4dee5acba intl: Fork get_cp_config_name off get_cp_mime_name.
This may help with bug 914 but I'm not testing that yet.
2007-05-01 20:19:18 +02:00
Kalle Olavi Niemitalo
81cb9155d2 add_html_to_string: Do not encode bytes 0x80...0xFF.
Reported by Witold Filipczyk.
2007-05-01 20:19:11 +02:00
Kalle Olavi Niemitalo
65efed3e83 Use add_string_to_string where applicable. 2007-05-01 20:19:06 +02:00
Kalle Olavi Niemitalo
43b8bdd8c3 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.
2007-05-01 20:19:00 +02:00
Kalle Olavi Niemitalo
ae62c0ef46 utf8_to_unicode: Let the end parameter point to const. 2007-05-01 20:18:54 +02:00
Kalle Olavi Niemitalo
7e86205902 add_html_to_string: Also restore the '\0' terminator. 2007-05-01 20:17:28 +02:00
Kalle Olavi Niemitalo
14d79f6c91 add_html_to_string: If out of memory, roll back and return NULL. 2007-05-01 20:17:19 +02:00
Kalle Olavi Niemitalo
8c9858b6a0 add_html_to_string: Encode only known unsafe or non-ASCII characters.
In particular, do not encode '%' and '/', which are common in URIs.
2007-05-01 20:17:04 +02:00
Kalle Olavi Niemitalo
bd0dce9a3a init_directory_listing: Link to original URLs. Decode for display only.
HTML-escape all strings that are not intended to contain markup.
2007-05-01 20:16:46 +02:00
Witold Filipczyk
07843f924c Hack to let auto-commiting work. 2007-05-01 20:16:43 +02:00
Kalle Olavi Niemitalo
de2ce3319c More const in URI functions.
Not yet all of them, though.
2007-05-01 20:08:25 +02:00
Kalle Olavi Niemitalo
bca031d1ba ftp, add_file_cmd_to_str: Check errors from string functions.
Use goto for error handling.  Free all strings in the same place.
2007-05-01 20:08:19 +02:00
Kalle Olavi Niemitalo
4bcce2e5ea Reject CR and LF characters in FTP pathnames. 2007-05-01 20:08:13 +02:00
Kalle Olavi Niemitalo
12d94d3408 Cast the NULL argument of string_concat to unsigned char *.
string_concat reads the args with va_arg(ap, const unsigned char *),
and the NULL macro may have the wrong type (e.g. int).

Many places pass string literals of type char * to string_concat.
This is in principle also a violation, but I'm ignoring it for now
because if it becomes a problem with some C implementation, then so
will the use of unsigned char * with printf "%s", which is so
widespread in ELinks that I'm not going to try fixing it now.
2007-05-01 20:05:12 +02:00
Kalle Olavi Niemitalo
7e71f929af Cast the NULL argument of straconcat to unsigned char *.
straconcat reads the args with va_arg(ap, const unsigned char *),
and the NULL macro may have the wrong type (e.g. int).

Many places pass string literals of type char * to straconcat.  This
is in principle also a violation, but I'm ignoring it for now because
if it becomes a problem with some C implementation, then so will the
use of unsigned char * with printf "%s", which is so widespread in
ELinks that I'm not going to try fixing it now.
2007-05-01 20:05:04 +02:00
Kalle Olavi Niemitalo
33b8f7175e Cast variadic arguments of add_to_ml to void *.
getml reads the args with va_arg(ap, void *), and the NULL macro in
particular may have the wrong type.
2007-05-01 20:04:57 +02:00
Kalle Olavi Niemitalo
b35505c813 Cast variadic arguments of getml to void *.
getml reads the args with va_arg(ap, void *), and the NULL macro in
particular may have the wrong type.
2007-05-01 20:04:50 +02:00
Kalle Olavi Niemitalo
d00d702e7d Fix compiler errors without HAVE_VARIADIC_MACROS. 2007-05-01 20:04:10 +02:00
Kalle Olavi Niemitalo
2e3ebffcd3 string_assert: First arg of elinks_internal is a format string. 2007-05-01 19:59:04 +02:00
Kalle Olavi Niemitalo
b0bc06d050 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.
2007-05-01 19:58:50 +02:00
Kalle Olavi Niemitalo
d2e806b611 textarea_edit: Cast size_t fx_maxlength to match "%u". 2007-05-01 19:58:35 +02:00
Kalle Olavi Niemitalo
5692746935 menu_leds_info: Revert the previous change.
Revert commit 2380ea9f1b,
"menu_leds_info: Don't call msg_text."  MSGBOX_SCROLLABLE requires
a modifiable copy of the string, and msg_text provides that.  To
reproduce the crash, run ELinks in a small window, select the English
language, and choose Help -> LED indicators.
2007-05-01 19:58:22 +02:00
Kalle Olavi Niemitalo
6c33b4ecf8 menu_leds_info: Don't call msg_text. 2007-05-01 19:58:10 +02:00
Kalle Olavi Niemitalo
9a930fefe1 Type-check button arguments of msg_box.
Don't cast function pointers; calling functions via pointers of
incorrect types is not guaranteed to work.  Instead, define the
functions with the desired types, and make them cast the incoming
parameters.  Or define wrapper functions if the return types don't
match.

really_exit_prog wasn't being used outside src/dialogs/menu.c,
and I had to change its parameter type, so it's now static.
2007-05-01 19:57:52 +02:00
Kalle Olavi Niemitalo
c2570007c1 OS/2: Ensure correct type of NULL pointer for variadic spawnlp. 2007-05-01 19:57:31 +02:00
Witold Filipczyk
17ef838be7 DOM renderer: off by one error. 2007-04-29 21:06:03 +02:00
Witold Filipczyk
6d4828440e ecmascript: Added clearTimeout. 2007-04-26 22:36:02 +02:00
Witold Filipczyk
05d40f6a63 ecmascript: Added ecmascript_clear_timeout. 2007-04-26 21:04:30 +02:00
Witold Filipczyk
f047c7c5fc ecmascript: ecmascript_set_timeout returns pointer.
This pointer will be used later by clearTimeout.
2007-04-26 21:00:50 +02:00
Witold Filipczyk
479f63036a ecmascript: Handle multiple setTimeout simultaneously. 2007-04-26 20:49:56 +02:00
Witold Filipczyk
2a3be5260a forms: Buttons should not submit forms.
This reverts Commit: 6fe1a431f1
    Sometimes scripts submit forms using buttons
I don't remember why I did previous change, but it was broken.
2007-04-18 16:19:18 +02:00
Witold Filipczyk
df36759e80 SEE: Report errors. 2007-04-15 17:57:30 +02:00
Witold Filipczyk
bcb22e301f SEE: Simplification. 2007-04-15 16:59:04 +02:00
Witold Filipczyk
b5c3baf910 SEE: Renamed ELinks functions with the "SEE" prefix to distinguish them
from SEE functions.
2007-04-15 16:53:14 +02:00
Witold Filipczyk
c5b102ba08 SEE: added forms to the global object.
Avoid dangerous document.forms = ...
2007-04-14 23:49:43 +02:00
Witold Filipczyk
cd982d7d65 SEE: do not do check_class for alert, open and setTimeout.
Do not do check_class when functions called by the global object.
2007-04-14 23:32:14 +02:00
Witold Filipczyk
182812352b bug 620: reset forms before reload, not after.
The idea by Kalle Olavi Niemitalo.
2007-03-26 19:21:23 +02:00
Witold Filipczyk
1655de5699 BUILD_ID: Use cg-object-id when there is no cg-commit-id 2007-03-23 19:01:21 +01:00
Witold Filipczyk
00037979d2 check_html_form_hierarchy: Old code was buggy.
Old code caused the assertion failure on the shutdownday's page.
2007-03-23 13:16:39 +01:00
Witold Filipczyk
55c00e0a12 memdebug: Show the previous address of the allocated memory (mem_realloc).
Without this tracking of the memory allocation is IMHO impossible.
2007-03-22 10:05:47 +01:00
Witold Filipczyk
426e5f2b3b ecamscript: Delayed submit_given_form.
This probably fixes many bugs.
2007-03-22 09:52:52 +01:00
Witold Filipczyk
8c30a2a6c7 bug 620: added the field 'reload' to the struct document_view.
Changed the type of 'used' to unsigned int:1.
Resetting of forms is done only once. It wasn't tested.
2007-03-20 16:23:48 +01:00
Witold Filipczyk
1a8aae50fb speech: Ignore frame chars. 2007-03-19 18:00:59 +01:00
Witold Filipczyk
208a3e99fc decompress_data: Copied from master.
The previous decompress_data was buggy.
2007-03-19 17:54:54 +01:00
Witold Filipczyk
f0aa3909b1 Revert "decompress_data: count bytes written to the pipe"
This reverts commit da5eed4dba.
2007-03-19 17:28:42 +01:00
Witold Filipczyk
c1992b2f3d Revert "decompress_data: Run read_encoded in loop while BIG_READ bytes is read."
This reverts commit 991427f967.
2007-03-19 17:27:51 +01:00
Witold Filipczyk
0b8e906e3c bug 944: Sometimes there is no document yet, so title is unavailable.
It fixes bug 944, but I don't know if the page is added to the globhist.
2007-03-18 21:08:45 +01:00
Witold Filipczyk
6605f4c471 read_special: s/foreachback/foreach/ 2007-03-15 12:41:18 +01:00
Witold Filipczyk
823c26748a delayed_goto_uri: Do not segfault when there is no location yet.
The segfault was while reading the "copiousoutput" document on startup.
2007-03-14 14:00:22 +01:00
Witold Filipczyk
82a408da28 read_special: Added no-cache. 2007-03-14 13:53:22 +01:00
Witold Filipczyk
fbc51b3991 read_special: reorganization of code. 2007-03-14 13:40:11 +01:00
Witold Filipczyk
b9c409c3b9 I forgot about conn->popen. 2007-03-13 22:41:58 +01:00
Witold Filipczyk
fc2a402059 copiousoutput: Allow read only registered file descriptors. 2007-03-13 22:39:13 +01:00
Witold Filipczyk
7ab5b8d57e Do not let reading from /dev/stdin and /dev/fd/0. 2007-03-13 22:09:41 +01:00
Witold Filipczyk
a494f376f9 copiousoutput: Use current frame.
Use the current frame instead full screen. Do not add the "zombie"
popen_data in case of the memory allocation error.
2007-03-13 21:10:21 +01:00
Witold Filipczyk
b6e862f539 forms: allow submit empty forms
Empty forms like this:
<form name="aaa" action="tralalala"></form>
is used by www.mbank.com.pl.
2007-03-13 13:53:46 +01:00
Witold Filipczyk
bd0aa20c9c Grammar. 2007-03-13 13:10:16 +01:00
Witold Filipczyk
6a77f68c63 mime: Check whether % is enclosed by apostrophes 2007-03-12 22:10:48 +01:00
Witold Filipczyk
0f58529b7d ecmascript: Added onchange hook for SELECT.
It works, but not for test case yet.
2007-03-12 21:03:24 +01:00
Witold Filipczyk
d008728ab0 festival: Drop MAX_LINE_LENGTH
Limit number of bytes to be written by PIPE_BUF.
2007-03-12 17:01:55 +01:00
Witold Filipczyk
c4500039b2 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.
2007-03-12 16:43:17 +01:00
Witold Filipczyk
ede61c1222 Reset forms after reloading a document.
This is a fix for the bug from bugzilla, but I don't remember the bug number
now. Forms are reset when new documents are loaded or old ones are reloaded.
Because of gradual rerendering forms may be reset a few times
before a document is fully loaded, what may be annoying.
2007-03-11 18:52:53 +01:00
Witold Filipczyk
9362dfb9ae festival: Use the terminal codepage for the speech output.
Also limit the number of bytes written do the pipe to PIPE_BUF.
The configuration of the speech engine (proper encoding, voice, etc.)
is left to the user.
2007-03-10 19:21:17 +01:00
Witold Filipczyk
094b75d5ac festival: there is no default speech synthesis engine. 2007-03-10 16:06:06 +01:00
Kalle Olavi Niemitalo
44852d9cba festival: Assert that writes are not short. Add comments. 2007-03-10 15:38:57 +01:00
Witold Filipczyk
c09cc0398f fsp: download resuming 2007-03-09 20:33:14 +01:00
Witold Filipczyk
967a15b7f4 smb: download resuming 2007-03-09 20:18:38 +01:00
Witold Filipczyk
991427f967 decompress_data: Run read_encoded in loop while BIG_READ bytes is read.
Current implementation is IMHO predictable. In the old code I'm not sure
what happen when read_encoded read BIG_READ bytes.
2007-03-07 22:29:06 +01:00
Witold Filipczyk
9465425b16 festival: 240 chars should be enough for line length. 2007-03-07 17:49:03 +01:00
Witold Filipczyk
17385a8d7f festival: stop_festival when freeing doc_view. 2007-03-07 14:18:48 +01:00
Witold Filipczyk
3a56964990 festival: do not segfault when closing current tab 2007-03-07 10:43:25 +01:00
Witold Filipczyk
9a9832887e Decode uri for displaying for all protocols.
This change first appeared in commit 047bf7e1c6
and was reverted by merge with the master later. Thanks, Kalle.
2007-03-06 22:12:57 +01:00
Witold Filipczyk
da5eed4dba decompress_data: count bytes written to the pipe
Count bytes written to the pipe and decompress when the pipe is full.
This fixes the issue with blogs.msdn.com. It also should give better
performance because of fewer calls to read_encoded.
2007-03-06 20:42:09 +01:00
Witold Filipczyk
0bc767fed4 Merge with master.
Conflicts resolved by copying files of master branch.
2007-03-06 19:09:31 +01:00
Kalle Olavi Niemitalo
f2fc402093 Merge with http://elinks.cz/elinks.git 2007-03-06 16:01:21 +02:00
Kalle Olavi Niemitalo
f905379aed smb: Use atol rather than atoi for file sizes.
Corresponds to FSP commit 9f47368894.
2007-03-06 15:59:14 +02:00
Kalle Olavi Niemitalo
3b634ffee6 smb: Don't call qsort with a NULL pointer.
Corresponds to FSP commit 97edc3a2cc.
2007-03-06 15:59:06 +02:00
Kalle Olavi Niemitalo
6ae6c0b438 smb: Remove a cast.
Corresponds to FSP commit 95a377e81b.
2007-03-06 15:59:00 +02:00
Kalle Olavi Niemitalo
846a368fb0 smb: Assert that there is room for a terminating null.
Corresponds to FSP commit 23b4b912ac.
2007-03-06 15:58:50 +02:00
Kalle Olavi Niemitalo
588375444b smb: Comment about not freeing memory in the child process.
Corresponds to FSP commit 368a749123.
2007-03-06 15:58:45 +02:00
Kalle Olavi Niemitalo
146a605938 smb: Call close_socket(socket) rather than close(socket->fd).
Corresponds to FSP commit 3ba31763a9.
2007-03-06 15:58:38 +02:00
Kalle Olavi Niemitalo
c19ad66070 smb: Comment and FIXME about closing file descriptors.
Corresponds to FSP commit 1ad016bdd5.
2007-03-06 15:58:28 +02:00
Kalle Olavi Niemitalo
e08d040c4c smb: Don't cast the qsort comparison function pointer.
Inspired by FSP commit c3a6ca3ef0.
This time, the cast was a no-op though.
2007-03-06 15:58:24 +02:00
Kalle Olavi Niemitalo
9665f1b813 smb: More const.
Inspired by FSP commit c06d6ba5d0.
2007-03-06 15:58:07 +02:00
Kalle Olavi Niemitalo
327de14aa8 smb: Fix libsmbclient 3.0.10 compatibility.
Also, allocate memory for only one copy of each comment string, rather
than two.
2007-03-06 15:57:58 +02:00
Kalle Olavi Niemitalo
f621ed63b4 Revert 11e6aa8d97, "Bug 944, SMB: Fix leaks and libsmbclient 3.0.10 compatibility."
Revert commit 11e6aa8d97.
It is not useful to complicate the code to free the memory,
because the process is soon going to exit, and it has inherited
a lot more memory allocations from its parent.

The libsmbclient 3.0.10 compatibility changes are good though.
I'll re-apply them soon enough.
2007-03-06 15:57:40 +02:00
Kalle Olavi Niemitalo
e517ef22a9 fsp: Try to recover from ABI mismatches caused by _FILE_OFFSET_BITS. 2007-03-06 15:57:18 +02:00
Laurent MONIN
f2916d8646 unblock_itrm(),block_itrm(): drop unused parameter fd. 2007-03-05 22:54:24 +01:00
Laurent MONIN
e4256e0e6a Refresh status bar when key prefix is eaten. It fixes bug 930. 2007-03-05 22:15:50 +01:00
Laurent MONIN
d7400bed08 asprintf() is not used in this file. 2007-03-05 22:04:34 +01:00
Laurent MONIN
86686983c0 save_textarea_file(): do not open file for writing if not needed. Patch
by Alexey Tourbin.
2007-03-05 21:48:42 +01:00
Laurent MONIN
ecce8bfa91 save_textarea_file(): handle return values of fwrite() and fclose(). Patch
by Alexey Tourbin.
2007-03-05 21:47:09 +01:00
Laurent MONIN
1e00f2d10d save_textarea_file(): cleanup handling of error, closing descriptors
and unlinking created file. Patch by Alexey Tourbin.
2007-03-05 21:44:58 +01:00
Laurent MONIN
12ec62810b save_textarea_file(): h -> fd, file -> fp. Idea by Alexey Tourbin. 2007-03-05 21:41:17 +01:00
Laurent MONIN
5acb3a68fb If there is nothing to write do not even open the file for write (test
formdata length). Patch by Alexey Tourbin.
2007-03-05 21:37:24 +01:00
Laurent MONIN
edb8d9001c If there is nothing to write do not even open the file for write. Patch
by Alexey Tourbin.
2007-03-05 21:34:45 +01:00
Laurent MONIN
4b9ddf1481 Take care of fwrite() and fclose() return values. Patch by Alexey Tourbin. 2007-03-05 21:30:16 +01:00
Laurent MONIN
6bdc34cfbc Unlink file on error. Patch by Alexey Tourbin. 2007-03-05 21:24:02 +01:00
Laurent MONIN
0a8b52282c formfd -> fd, formfile -> fp, formfilename -> filename. Idea by Alexey
Tourbin.
2007-03-05 21:17:09 +01:00
Laurent MONIN
31865ef953 Fix gcc warning: value computed is not used. Patch by Alexey Tourbin. 2007-03-05 21:11:19 +01:00
Laurent MONIN
278dec0664 Fix gcc warning: value computed is not used. Patch by Alexey Tourbin. 2007-03-05 21:10:02 +01:00
Kalle Olavi Niemitalo
9f47368894 fsp: Try to support large files.
FSP v2 uses 32-bit file offsets in its UDP packets and cannot get past
4 GiB.  ELinks should however try not to wrap the numbers to negative
at 2 GiB, if it is built with large file support.
2007-03-05 22:09:17 +02:00
Kalle Olavi Niemitalo
1d0a3e9f7c fsp: Call fsp_closedir also if protocol.fsp.sort is true. 2007-03-05 22:01:22 +02:00
Kalle Olavi Niemitalo
0eb0f05b35 fsp: Don't call decode_uri(NULL). It will crash. 2007-03-05 21:59:34 +02:00
Kalle Olavi Niemitalo
97edc3a2cc fsp: Don't call qsort with a NULL pointer. 2007-03-05 21:36:36 +02:00
Kalle Olavi Niemitalo
f1d400ab3e fsp: Use copy_struct rather than memcpy. 2007-03-05 21:27:32 +02:00
Kalle Olavi Niemitalo
bb79836cb7 fsp: HTML-encode file names in the directory listing. 2007-03-05 21:24:25 +02:00
Kalle Olavi Niemitalo
380deb2c1d fsp: Comment about not calling fsp_close_session on error. 2007-03-05 21:21:26 +02:00
Kalle Olavi Niemitalo
95a377e81b fsp: Remove a cast. 2007-03-05 20:51:38 +02:00
Kalle Olavi Niemitalo
23b4b912ac fsp: Assert that there is room for a terminating null. 2007-03-05 20:50:27 +02:00
Kalle Olavi Niemitalo
368a749123 fsp: Comment about not freeing memory in the child process. 2007-03-05 20:48:17 +02:00
Kalle Olavi Niemitalo
3ba31763a9 fsp: Call close_socket(socket) rather than close(socket->fd). 2007-03-05 20:46:15 +02:00
Kalle Olavi Niemitalo
fb184a4cd0 fsp: prompt_username_pw is in the parent process. 2007-03-05 20:21:24 +02:00
Kalle Olavi Niemitalo
1ad016bdd5 fsp: Comment and FIXME about closing file descriptors. 2007-03-05 20:20:04 +02:00
Kalle Olavi Niemitalo
c3a6ca3ef0 fsp: Don't cast the qsort comparison function pointer.
Cast the parameters of the function instead.  The C standard does not
guarantee that a function can be properly called via a pointer of a
different type.
2007-03-05 20:18:59 +02:00
Kalle Olavi Niemitalo
c06d6ba5d0 fsp: More const. 2007-03-05 20:01:14 +02:00
Kalle Olavi Niemitalo
d17005e23f encode_uri_string: Let name point to const. 2007-03-05 19:59:17 +02:00
Kalle Olavi Niemitalo
ab92c38ca2 add_html_to_string: Let src (aka html) point to const. 2007-03-05 19:35:29 +02:00
Kalle Olavi Niemitalo
80a3019a2f fsp: Comment about connection.data_socket. 2007-03-05 19:34:19 +02:00
Kalle Olavi Niemitalo
136ff42bb1 fsp: Comments about interprocess communication. 2007-03-05 19:32:55 +02:00
Witold Filipczyk
e34d646f1a fsp: remember the username and the password given in the uri.
[ This is half of commit c7f6f76951
  from the witekfl branch.  The SMB half is in commit
  a0db520267.  --KON ]
2007-03-03 17:26:19 +02:00
Witold Filipczyk
05b19b05e6 fsp: call find_auth in both cases.
When the username and the password were given in the uri and when
they weren't. I'm not sure if it changes anything.
2007-03-03 17:25:00 +02:00
Witold Filipczyk
636f4e6aa4 fsp: used strings, encode and decode filenames with spaces. 2007-03-03 17:24:26 +02:00
Witold Filipczyk
93f3dc3bbf fsp: set_nonblocking_fd
[ This is part of commit 71adb0e6cc
  from the witekfl branch.  The SMB part is in commit
  36477ffa45.  The CGI part will
  come later.  --KON ]
2007-03-03 17:24:07 +02:00
Witold Filipczyk
6cf69b2948 fsp: abort connection on empty files.
Empty files were causing 'read from socket' errors.

[ This is half of commit eef1c17dce
  from the witekfl branch.  The SMB half is in commit
  916b5cf545.  --KON ]
2007-03-03 17:20:41 +02:00
Witold Filipczyk
8c5ef76e52 fsp: prompt for password when the authentication fails.
It works only for directory listings.
2007-03-03 17:17:33 +02:00
Witold Filipczyk
a020450830 Removed unneded header file accidentally included by the previous commit. 2007-03-03 17:17:21 +02:00
Witold Filipczyk
ff087c3e06 fsp: Pass the filesize by ctype (stderr). 2007-03-03 17:17:13 +02:00
Witold Filipczyk
b517367cc8 dup2 closes given descriptors, so no need for the explicit close. 2007-03-03 17:17:00 +02:00
Witold Filipczyk
bef03e6106 FSP: The preparation for the error handling.
Numeric codes are returned instead of a plain text in the event
of the fsp error.
2007-03-03 17:15:21 +02:00
Witold Filipczyk
0da23da6b2 Added espeak as another speech synthesis engine. 2007-03-03 13:55:25 +01:00
Miciah Dashiel Butler Masters
1a89589b13 menu_handler: Don't call get_parent_ptr for redraw events
Only call get_parent_ptr for resize events so that the menu isn't moved
to the cursor position for normal redraw events.
2007-03-03 12:44:45 +00:00
Kalle Olavi Niemitalo
3602899e3e palette.inc: Comment fixes. 2007-03-03 09:46:51 +02:00
Miciah Dashiel Butler Masters
e95c5c7d30 Document that document.cache.revalidation_interval is in seconds
At Kalle Olavi Niemitalo's suggestion.
2007-03-02 23:46:18 +00:00
Witold Filipczyk
322b003e22 cgi: Fix the possible memleak and close pipes in case of error. 2007-03-01 18:51:39 +01:00
Witold Filipczyk
e3b2d7a43a POST method of CGI did not work. It works now. 2007-03-01 18:35:18 +01:00
Miciah Dashiel Butler Masters
6d4496b521 document.cache.revalidation_interval: document that a value of -1 disables automatic revalidation 2007-02-28 20:22:40 +00:00
Kalle Olavi Niemitalo
0bd0dd160e palette256: Comment about "web-safe" colors. 2007-02-27 10:31:18 +02:00
Kalle Olavi Niemitalo
76be98030a Bug 890, palette256: Change colors 0-15 to match xterm defaults. 2007-02-27 03:56:43 +02:00
Witold Filipczyk
c25c41bd18 Used add_shell_quoted_to_string instead of enclosing the text with '"'.
The code works both with copiousoutput and without it.
2007-02-26 19:51:22 +01:00
Witold Filipczyk
65d7faed61 The real fix for the bug 935.
It works for not utf-8 and the code doesn't affect the utf-8 mode.
2007-02-26 19:33:19 +01:00
Witold Filipczyk
e366f5e63f Revert "bugfix 935: not tested with UTF-8, but you know at least where the bug is."
This reverts commit f571cf509d.
2007-02-26 19:28:20 +01:00
Kalle Olavi Niemitalo
174a6459e6 Bug 844: Remove src/protocol/smb/smb.c, superseded by smb2.c. 2007-02-25 23:53:53 +02:00
Kalle Olavi Niemitalo
0212ba7e93 Bug 844, SMB: EACCES from smbc_opendir beats ENOENT from smbc_open. 2007-02-25 23:40:43 +02:00
Kalle Olavi Niemitalo
8a25be932b Bug 844, SMB: HTML-encode file names and comments.
This probably does the wrong thing with non-ASCII characters.
That's just because libsmbclient does not document which charset
it uses: it even reads smb.conf, which then may affect the choice.
2007-02-25 23:28:02 +02:00
Kalle Olavi Niemitalo
11e6aa8d97 Bug 944, SMB: Fix leaks and libsmbclient 3.0.10 compatibility. 2007-02-25 21:15:46 +02:00
Witold Filipczyk
5289a840d8 smb2: Do not use smb_options. 2007-02-25 16:53:54 +02:00
Witold Filipczyk
546a52597f Typo. 2007-02-25 16:53:45 +02:00
Witold Filipczyk
a0db520267 smb: remember the username and the password given in the uri.
[ This is half of commit c7f6f76951
  from the witekfl branch.  The FSP half will come later.  --KON ]
2007-02-25 16:53:35 +02:00
Witold Filipczyk
0c1371b161 smb: minor optimisation. 2007-02-25 16:52:25 +02:00
Witold Filipczyk
0cf6f91394 smb: Encode and decode spaces in filenames. 2007-02-25 16:52:19 +02:00
Witold Filipczyk
28fcc17564 smb: Do not encode ' ' as %20 in base href. 2007-02-25 16:52:07 +02:00
Witold Filipczyk
36477ffa45 smb: set_nonblocking_fd
[ This is part of commit 71adb0e6cc from
  the witekfl branch.  The FSP and CGI parts will come later.  --KON ]
2007-02-25 16:51:53 +02:00
Witold Filipczyk
c828cda079 smb: used string functions in place of printf and puts. 2007-02-25 16:50:22 +02:00
Witold Filipczyk
916b5cf545 smb: abort connection on empty files.
Empty files were causing 'read from socket' errors.

[ This is half of commit eef1c17dce
  from the witekfl branch.  The FSP half will come later.  --KON ]
2007-02-25 16:50:02 +02:00
Witold Filipczyk
f70196dde8 smb: used string functions instead of snprintf. 2007-02-25 16:47:21 +02:00
Witold Filipczyk
a584aacb26 smb2: show comments. 2007-02-25 16:47:06 +02:00
Witold Filipczyk
d399c809f7 The SMB protocol handling using libsmbclient. 2007-02-25 16:46:55 +02:00
Kalle Olavi Niemitalo
927f08ec6a Revert 5f36ad302e, to make bug 534 less likely to occur.
Revert commit 5f36ad302e,
"Decompression: write PIPE_BUF bytes to the pipe at once if possible."
Without this reversion, <http://blogs.msdn.com/> displays as garbage.
It has Content-Encoding: gzip and Transfer-Encoding: chunked.
2007-02-25 16:09:25 +02:00
Kalle Olavi Niemitalo
4d7d8acaf5 Bug 937, http_send_header: indentation fix 2007-02-25 15:14:18 +02:00
Kalle Olavi Niemitalo
4e4dddb4cc Bug 937, http_send_header: Don't send all headers to CONNECT proxy. 2007-02-25 12:49:56 +02:00
Witold Filipczyk
27a66f59d9 Fix the memleak. Part II of the 927 bugfix. 2007-02-25 11:02:53 +02:00
Witold Filipczyk
e01785e462 The fix for the bug 927.
When tables were rendered first time html_format_part was called with
document==NULL. <meta http-equiv=Refresh.../> was inside a table,
so document was NULL. Second time the table knew its dimensions
and document was not NULL.
2007-02-25 11:02:48 +02:00
Witold Filipczyk
2bf5372a29 stpcpy was not used in this file. 2007-02-25 11:02:28 +02:00
Kalle Olavi Niemitalo
0e5b6af9b0 Various comments and tweaks in bzip2 decoding.
Do not assume that memset(ptr, 0, size) clears pointers to NULL.
The length of decoded data can be read in two ways; assert they match.
2007-02-24 23:03:47 +02:00
Kalle Olavi Niemitalo
a75302caf2 More const in encoding backends. 2007-02-24 23:03:39 +02:00
Kalle Olavi Niemitalo
20ba46ddde Remove decode_encoded and associated backend functions.
This function was unused and only the dummy backend implemented it
correctly.  Fixing bug 534 will probably require adding this function
back again, but I think it will be easier to do it from scratch than
fix the bogus implementations we had here.
2007-02-24 23:03:24 +02:00
Witold Filipczyk
1e7f26c33d bzip2: buf must be the last. 2007-02-24 16:13:03 +02:00
Witold Filipczyk
728c97556d bzip2: Used the patch from bug the 517.
Removed the bzip2-pipe.patch from contrib.
2007-02-24 16:12:49 +02:00
Witold Filipczyk
0fe90d6ac6 bzip2: added the configure option --enable-bzip2-encoding
Use it with the patched bzlib. The patch in contrib.
Added the bzip2-pipe.patch.README.
2007-02-24 16:12:39 +02:00
Witold Filipczyk
cc28da68a7 bzip2: removed unclean my BZ2_bzRead2.
Use the patched bzlib instead. I put the bzip2-pipe.patch
in the contrib directory.
2007-02-24 16:12:31 +02:00
Witold Filipczyk
5f36ad302e Decompression: write PIPE_BUF bytes to the pipe at once if possible. 2007-02-24 16:12:24 +02:00
Witold Filipczyk
86b352fecc Simplification. bzf->handle is the same as data->file. 2007-02-24 16:12:17 +02:00
Witold Filipczyk
24a96717a6 BZ_bzRead2 is based on BZ_bzRead from the bzlib library.
Slightly modified to handle reading from the pipe. This fixes the bug 517.
2007-02-24 16:12:11 +02:00
Witold Filipczyk
573bd43e0c The gzip decompression simplification. gzclearerr does the job. 2007-02-24 16:12:02 +02:00
Witold Filipczyk
f571cf509d bugfix 935: not tested with UTF-8, but you know at least where the bug is. 2007-02-23 22:37:14 +01:00
Witold Filipczyk
ac664a81c1 Merge with master except smb. 2007-02-23 18:47:14 +01:00
Witold Filipczyk
4a7b9415e1 MIME: When there is no % in the handler string (no %s in the mailcap entry)
the handler reads data from stdin. I think it only works with copiousoutput.
read_from_popen delayed because of internal errors.
2007-02-21 13:43:16 +01:00
Witold Filipczyk
469481b272 Decode %20 in local filenames and enclose them with '"'.
Local files with spaces in filenames wasn't handled properly by MIME handler.
2007-02-21 10:37:51 +01:00
Witold Filipczyk
21fd1fd10f Fix the memleak. Part II of the 927 bugfix. 2007-02-20 20:53:49 +01:00
Witold Filipczyk
088db2c3de The fix for the bug 927.
When tables were rendered first time html_format_part was called with
document==NULL. <meta http-equiv=Refresh.../> was inside a table,
so document was NULL. Second time the table knew its dimensions
and document was not NULL.
2007-02-20 20:16:10 +01:00
Witold Filipczyk
cf86e2e72f Added SEE_CFLAGS to the Makefile.config. Use SEE_CFLAGS only when necessary. 2007-02-18 17:09:32 +02:00
Witold Filipczyk
dd34591c74 Revert "Added macro foreach_module_builtin. Killed some warnings of gcc-4.2."
This reverts commit 99cff6aa70.
2007-02-18 09:44:35 +01:00
Witold Filipczyk
f8c0fe013b Revert "Killed warnings: uri_cache always evaluate as true"
This reverts commit f0717304f0.
2007-02-18 09:42:20 +01:00
Kalle Olavi Niemitalo
3651a53e58 do_real_lookup: Assert that ai_addrlen <= sizeof(struct sockaddr_storage). 2007-02-17 22:21:56 +02:00
Witold Filipczyk
de73f644ba Added SEE_CFLAGS to the Makefile.config. Use SEE_CFLAGS only when necessary. 2007-02-17 17:52:38 +01:00
Witold Filipczyk
20048696c8 smb2: Do not use smb_options. 2007-02-17 13:18:42 +01:00
Kalle Olavi Niemitalo
cf32aba65f BFU doc: Comment on what widget_data.cdata means for WIDGET_TEXT.
Inspired by bug 935.
2007-02-17 14:17:24 +02:00
Witold Filipczyk
81ec678499 stpcpy was not used in this file. 2007-02-15 17:25:04 +01:00
Witold Filipczyk
8bb34f124f Merge with master 2007-02-12 13:00:11 +01:00
Kalle Olavi Niemitalo
315f4e0342 doc: cut-clipboard does not merely delete text from clipboard. 2007-02-11 23:34:44 +02:00
Kalle Olavi Niemitalo
763f03f146 get_clipboard_text: Disable pasting from GNU Screen's clipboard. 2007-02-11 20:56:41 +02:00
Witold Filipczyk
c2d1952a08 accesskey: start iterating with next link.
Rotating between links with the same accesskey works.
2007-02-11 09:21:35 +01:00
Witold Filipczyk
5008fb697d Accesskey didn't work as it should. 2007-02-10 22:12:27 +01:00
Witold Filipczyk
f0717304f0 Killed warnings: uri_cache always evaluate as true
in the debug mode by adding macros object_lock_without_assert,
object_unlock_without_assert, object_nolock_without_assert.

These macros are almost identical to object_lock, object_unlock,
object_nolock. New macros do not use the always true assertion
for uri_cache.
2007-02-05 21:50:38 +01:00
Miciah Dashiel Butler Masters
93aea42b96 Unhighlight previously selected link when using goto-mark
In goto_mark, copy the current_link of the old view state to the
old_current_link of the new view state so that clear_link will properly
clear the highlight for that link.

This fixes a bug introduced with the removal of link_bg in commit
c91c763d49.
2007-02-04 23:13:39 +00:00
Kalle Olavi Niemitalo
a565365a8d do_type_query: Make known_types[] const. 2007-02-04 15:32:35 +02:00
Kalle Olavi Niemitalo
c62e9f9eae check_http_server_bugs: Make buggy_servers[] const. 2007-02-04 15:30:51 +02:00
Kalle Olavi Niemitalo
c8a57c562f Make http_code[] const; make http_code[].str point to const. 2007-02-04 15:18:45 +02:00
Kalle Olavi Niemitalo
d7e4b57146 Make instances of struct listbox_ops const. 2007-02-04 15:17:49 +02:00
Kalle Olavi Niemitalo
a5e321cb2b Make instances of struct hierbox_browser_button const.
And explicitly disable the "Save" buttons in anonymous mode,
even though they are currently inside #if 0.
2007-02-04 13:54:07 +02:00
Kalle Olavi Niemitalo
31dc108c73 end_with_known_tld: Make tld[] const. 2007-02-04 13:46:45 +02:00
Kalle Olavi Niemitalo
543b0f6768 Make msg_dsc[] static const. 2007-02-04 13:40:46 +02:00
Kalle Olavi Niemitalo
68b069a657 Make MIME backend metadata const. 2007-02-04 13:34:48 +02:00
Kalle Olavi Niemitalo
a6886634bc Make unicode_7b[] static const.
The .data section of src/intl/charsets.o is only 40 bytes now.
Inspired by bug 381.
2007-02-03 23:25:16 +02:00
Kalle Olavi Niemitalo
974a5cdffd Make entities[] static const.
Inspired by bug 381.
2007-02-03 19:51:45 +02:00
Kalle Olavi Niemitalo
408d86f2b1 Remove temporary indentation left in the previous commit. 2007-01-30 10:27:57 +02:00
Kalle Olavi Niemitalo
ebf549ba77 Fix document.html.wrap_nbsp in UTF-8 terminals.
!CONFIG_UTF8, ISO-8859-1 doc, ASCII terminal, UTF-8 or unibyte I/O:
  &nbsp; ok, &#160; ok, &#xA0; ok, A0 ok
!CONFIG_UTF8, ISO-8859-1 doc, ISO-8859-1 terminal, UTF-8 or unibyte I/O:
  &nbsp; ok, &#160; ok, &#xA0; ok, A0 ok
!CONFIG_UTF8, UTF-8 doc, ASCII terminal, UTF-8 or unibyte I/O:
  &nbsp; ok, &#160; ok, &#xA0; ok, C2 A0 fail (drawn as "\001").
!CONFIG_UTF8, UTF-8 doc, ISO-8859-1 terminal, UTF-8 or unibyte I/O:
  &nbsp; ok, &#160; ok, &#xA0; ok, C2 A0 fail (not wrapped).
CONFIG_UTF8, ISO-8859-1 doc, ASCII terminal, UTF-8 or unibyte I/O:
  &nbsp; ok, &#160; ok, &#xA0; ok, A0 ok
CONFIG_UTF8, ISO-8859-1 doc, ISO-8859-1 terminal, UTF-8 or unibyte I/O:
  &nbsp; ok, &#160; ok, &#xA0; ok, A0 ok
CONFIG_UTF8, ISO-8859-1 doc, UTF-8 terminal, UTF-8 I/O:
  all fail (not wrapped); after patch all ok.
CONFIG_UTF8, UTF-8 doc, ASCII terminal, UTF-8 or unibyte I/O:
  &nbsp; ok, &#160; ok, &#xA0; ok, C2 A0 fail (drawn as "\001").
CONFIG_UTF8, UTF-8 doc, ISO-8859-1 terminal, UTF-8 or unibyte I/O:
  &nbsp; ok, &#160; ok, &#xA0; ok, C2 A0 fail (not wrapped)
CONFIG_UTF8, UTF-8 doc, UTF-8 terminal, UTF-8 I/O:
  all fail (not wrapped); after patch all ok.
2007-01-30 10:21:12 +02:00
Kalle Olavi Niemitalo
419857dce6 set_hline: Add some comments. 2007-01-29 21:07:13 +02:00
Kalle Olavi Niemitalo
ae5fe80100 Document that NBSP_CHAR is not used in UTF-8 strings. 2007-01-29 20:57:37 +02:00
Witold Filipczyk
f2a3983389 Limit the timeout to one second only under Windows. 2007-01-28 18:29:14 +02:00
Witold Filipczyk
b81bcd8307 Removed the buggy code. 2007-01-28 17:45:24 +02:00
Kalle Olavi Niemitalo
7185e926e6 "Do not show anymore" resets ui.success_msgbox, instead of toggling it.
Normally, the success msgbox is shown only if the ui.success_msgbox
option is set as 1, and clicking "Do not show anymore" would then
toggle the option to 0, and no more such msgboxes would appear.
However, if there already are two success msgboxes being displayed
(most likely in different terminals), then clicking "Do not show
anymore" in the first of them would reset the option to 0, but doing
the same in the second of them would toggle the option back to 1.

Rename toggle_success_msgbox to disable_success_msgbox, and make it
always reset the option to 0, regardless of the previous value.
2007-01-28 16:14:10 +02:00
Kalle Olavi Niemitalo
5b6dbcc879 default_listbox_ops_messages: Make static and const. 2007-01-28 14:52:09 +02:00
Kalle Olavi Niemitalo
da759b10f0 add_dlg_button_do: Let file point to const. 2007-01-28 14:44:24 +02:00
Kalle Olavi Niemitalo
be9660f7d0 Make all instances of struct widget_ops const.
And widget_type_to_ops[] too.
2007-01-28 14:41:40 +02:00
Kalle Olavi Niemitalo
d40cccef0f Make widget.ops point to const. 2007-01-28 14:38:53 +02:00
Kalle Olavi Niemitalo
3756bec9e0 get_opt_rec, get_opt_rec_real: Let name point to const. 2007-01-28 14:01:24 +02:00
Kalle Olavi Niemitalo
33b2db7053 toggle_success_msgbox: Call option_changed; was a TODO.
This change assumes that option change hooks allow a NULL session.
The only one that did not was change_hook_css, which I fixed in
commit 4adcae682f.
2007-01-28 14:00:14 +02:00
Kalle Olavi Niemitalo
ff4c103a78 Bug 827, display_codepage: Call option_changed.
This change allows screen_driver_change_hook to detect that the
charset has been changed to UTF-8 and set screen_driver.utf8 = 1.
redraw_screen then calls get_screen_driver, which propagates the flag
to terminal.utf8.  That in turn avoids an assertion failure in
handle_interlink_event.
2007-01-28 14:00:06 +02:00
Kalle Olavi Niemitalo
5367209702 mem_align_alloc__, add_bytes_to_string__: Let file point to const. 2007-01-28 02:12:39 +02:00
Kalle Olavi Niemitalo
fd27919f91 add_format_to_string: Let format point to const. 2007-01-28 02:05:52 +02:00
Kalle Olavi Niemitalo
a4293ed606 string_concat: Assume all variadic arguments point to const. 2007-01-28 02:04:00 +02:00
Kalle Olavi Niemitalo
66614acbc0 add_file_to_string: Let filename point to const. 2007-01-28 01:50:06 +02:00
Kalle Olavi Niemitalo
f47bdd76d6 init_string__: Let the file parameter point to const. 2007-01-28 01:46:30 +02:00
Kalle Olavi Niemitalo
0ba497b0d4 xstrcmp: Make both parameters point to const. 2007-01-28 01:43:49 +02:00
Kalle Olavi Niemitalo
0ee76a0ef3 straconcat: Assume all arguments point to const. 2007-01-28 01:42:08 +02:00
Kalle Olavi Niemitalo
03ccf0b2b1 add_to_strn: Let the src parameter point to const. 2007-01-28 01:39:45 +02:00
Kalle Olavi Niemitalo
ac339cf5e5 elinks_ulongcat: Make the static strings const.
And simplify an expression to avoid a cast.
2007-01-28 01:28:44 +02:00
Kalle Olavi Niemitalo
ada3858372 color_specs: Make const. 2007-01-28 01:13:53 +02:00
Kalle Olavi Niemitalo
0484f68b69 get_color_string: Return a pointer to const. 2007-01-28 00:52:21 +02:00
Kalle Olavi Niemitalo
add2a5d1b5 add_quoted_to_string: Make the src parameter point to const. 2007-01-28 00:20:59 +02:00
Kalle Olavi Niemitalo
4adcae682f change_hook_css: Don't use the ses parameter.
It might be NULL.
2007-01-27 22:33:02 +02:00
Kalle Olavi Niemitalo
233c59b9c2 l_set_option: Correct the args to option_changed().
Should have been in commit 2e5488ba3d.
2007-01-27 22:31:47 +02:00
Kalle Olavi Niemitalo
90f1fc5a62 src/Makefile: Add a TAGS target. 2007-01-27 21:03:09 +02:00
Kalle Olavi Niemitalo
6a1d21441e Document the parameters of change_hook_T. 2007-01-27 20:34:18 +02:00
Kalle Olavi Niemitalo
2e5488ba3d option_changed: Merge the 2nd and 3rd parameter.
All callers were passing the same value for both.
2007-01-27 19:52:49 +02:00