1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00
Commit Graph

3735 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
2648123e8f doc: TRE 0.8.0 required 2009-12-17 10:13:28 +02:00
Witold Filipczyk
caaa7b3d13 Force tre-0.8.0 or higher.
Functions in the tre-0.8.0 have the "tre_" prefix.
They won't collide with Perl.
2009-11-28 15:45:24 +01:00
Kalle Olavi Niemitalo
73b115d889 Bug 1088: Fix CONFIG_ECMASCRIPT_SMJS_HEARTBEAT
Makefile.config.in ignored the value of
CONFIG_ECMASCRIPT_SMJS_HEARTBEAT chosen by configure and instead used
the value of CONFIG_ECMASCRIPT_SMJS for it too.  This broke building
on SpiderMonkey versions where JS_TriggerOperationCallback is not
available.

No NEWS entry because this bug was not in any ELinks release.
2009-11-28 10:48:36 +02:00
Miciah Dashiel Butler Masters
f31cf6f9fe Heartbeat code using JS_TriggerOperationCallback
Implement new heartbeat code to catch runaway execution of document
ECMAScript code.  The old code uses JS_SetBranchCallback which is
deprecated in new versions of SpiderMonkey.  The new code uses setitimer(2)
and the JS_SetOperationCallback and JS_TriggerOperationCallback interfaces,
introduced in SpiderMonkey 1.8.1.  Compatibility with both the old
JS_SetBranchCallback and the new interfaces is maintained.
2009-11-26 00:57:21 +00:00
Kalle Olavi Niemitalo
1208a8dd2a bug 15, doc: Option manager doesn't support domain-specific
Mention in elinks.conf.5 that there's one reason to edit elinks.conf:
the option manager doesn't yet support domain-specific options,
so any set_domain statements have to be added with an editor.
2009-08-23 04:12:19 +03:00
Kalle Olavi Niemitalo
15b0db5e53 bug 15, NEWS: Mention bug number for domain-specific options
ELinks 0.13.GIT partially supports domain-specific options.
Enhancement request 15 seems to be about them, so mention it in NEWS.
The left-to-right path matching described in enhancement 15 hasn't
been implemented, though; ELinks chooses the option based on the
hostname only.
2009-08-23 04:00:55 +03:00
Witold Filipczyk
5bfeb061db Bug 1082: mem_free_set in abort_preloading
[ From bug 1082 attachment 545.  Added a comment and a NEWS reference.  --KON ]
2009-07-26 20:49:47 +03:00
Witold Filipczyk
e943285b84 pl.po: update 2009-07-25 11:05:48 +02:00
Witold Filipczyk
f3b68acf10 pl.po: overhead -> narzut 2009-07-25 10:53:26 +02:00
Kalle Olavi Niemitalo
ef548e5728 Merge branch 'elinks-0.12'
Conflicts:
	src/session/download.c
	src/session/download.h
	src/viewer/text/view.c
2009-07-24 18:32:25 +03:00
Kalle Olavi Niemitalo
db128fecd9 download: Add DOWNLOAD_EXTERNAL flag
Like in ELinks 0.13.GIT commit b3cfede1c1
made on 2007-11-07, only with more comments and a bit different names.
2009-07-24 18:09:59 +03:00
Kalle Olavi Niemitalo
a2c8dc8c61 download: Rename download_resume to download_flags
Bring the code closer to ELinks 0.13.GIT commit
71ccbe0f8d made on 2007-11-07.
Don't define a separate download_flags_T typedef though,
because Doxygen generates nicer links if the enum is used directly.
2009-07-24 17:10:35 +03:00
Kalle Olavi Niemitalo
ab72415130 download: Make BitTorrent's tp_show_header static
There are two identical tp_show_header() functions: one in
src/session/download.c and one in src/protocol/bittorrent/dialogs.c.
Neither is declared in any header, but the latter was not static.
2009-07-23 22:57:41 +03:00
Kalle Olavi Niemitalo
1cca904ce6 download: Document the rest of struct type_query 2009-07-23 22:57:11 +03:00
Kalle Olavi Niemitalo
ce89947fcf download: Use add_dlg_checkbox 2009-07-23 21:25:48 +03:00
Kalle Olavi Niemitalo
53c19e5b66 Bug 770: Comment updates
Since commit b7d03f9b04 on 2009-07-19,
lun_resume() no longer assumes that data points to struct cdf_hop.
2009-07-21 03:28:29 +03:00
Kalle Olavi Niemitalo
4067e54727 lookup_unique_name: Handle NULL from msg_box
If msg_box() runs out of memory, it returns NULL.  In this case,
the done_handler_T callbacks of the buttons will not be called.  So
lookup_unique_name() must instead free the struct lun_hop on its own.
2009-07-21 02:07:10 +03:00
Kalle Olavi Niemitalo
b80c0e8a0d lookup_unique_name: Remove always true condition
Remove the stracpy(ofile) call that could never be executed.
This removes the need to handle errors from that call,
and makes it clear that lun_hop->file need not be separately freed
if an error occurs in lookup_unique_name().
2009-07-21 01:09:37 +03:00
Kalle Olavi Niemitalo
71dfd47dcb lookup_unique_name: Merge error handling 2009-07-21 00:57:17 +03:00
Kalle Olavi Niemitalo
f815d27835 lookup_unique_name: Handle NULL from expand_tilde
expand_tilde() returns NULL if out of memory.
Make lookup_unique_name() handle that.
2009-07-21 00:50:54 +03:00
Kalle Olavi Niemitalo
e6344340dd Doxyfile: Expand OBJECT_HEAD as defined
To stop Doxygen from parsing its uses as member functions.
2009-07-19 21:15:40 +03:00
Kalle Olavi Niemitalo
23fd2d58f4 Make struct action const
With GCC 4.3.1 on i686, this changes the sizes of sections as follows:

section            before       after   change
.text              682428      682492      +64
.rodata            212668      216352    +3684
.data               58092       54444    -3648
.debug_info       1482388     1482472      +84
.debug_abbrev      153714      153723       +9
.debug_line        272299      272319      +20
.debug_loc         540394      540372      -22
.debug_ranges      113784      113792       +8
Total             3917695     3917894     +199

The surprising .text change comes from src/config/dialogs.o.
Some of that is in get_keybinding_text(), where GCC changes the
order of basic blocks and apparently misses some optimizations.
2009-07-19 21:15:39 +03:00
Kalle Olavi Niemitalo
89c7e57890 Bug 770: Don't close fd when resuming download
I added this bug last night.  continue_download_do() passed the
file descriptor to transform_codw_to_cmdw(), which saved it, but
continue_download_do() then closed it.
2009-07-19 13:44:01 +03:00
Kalle Olavi Niemitalo
075171c2c8 Bug 770: Shorten lifetime of session.download_uri
In common_download(), move session.download_uri to the new member
cmdw_hop.download_uri, which common_download_do() then reads.  This
shields the download request against possible session.download_uri
changes made for other downloads.  And transform_codw_to_cmdw() no
longer needs to touch session.download_uri at all, solving a FIXME.
2009-07-19 04:06:32 +03:00
Kalle Olavi Niemitalo
b7d03f9b04 Bug 770: Move codw->cmdw transform to outer layer
Commit ff136e5116 on 2006-07-16 made
lun_resume() check if cdf_hop->data points to struct codw_hop,
and transform that to struct cmdw_hop if so.  Move the transform
into a separate function called from continue_download_do().
This way, the structures used with create_download_file() no longer
need to begin with int magic.
2009-07-19 04:06:32 +03:00
Kalle Olavi Niemitalo
2f04a38c6f Bug 770: Fix URI leak in lun_resume
To reproduce:
- Configure with --enable-debug.
- Go to http://elinks.cz/
- Set the cursor on the "About" link and press d to download,
- ELinks asks where to save the file.  Cancel that with Esc.
  This leaves session.download_uri != NULL.
- Go to /etc/passwd
- ELinks asks what to do with the file.  Choose to download.
- ELinks asks where to save the file.  Type the name of a new file
  and press Enter.
- Again go to /etc/passwd
- ELinks asks what to do with the file.  Choose to download.
- ELinks asks where to save the file.  Type the same name as before
  and press Enter.
- ELinks asks whether to resume or overwrite.  Choose to resume.
  This changes session.download_uri and leaks the original URI.
- Quit ELinks.  It reports memory leaks:

0x88936d8:28 @ alloc'd at /home/Kalle/src/elinks-0.12/src/util/hash.c:89
0x88dac00:95 @ alloc'd at /home/Kalle/src/elinks-0.12/src/protocol/uri.c:1551
0x88c33a8:4104 @ alloc'd at /home/Kalle/src/elinks-0.12/src/util/hash.c:41

This commit fixes the leak, but it's still a bug that lun_resume() can
replace the session.download_uri that will be used by another pending
download.  In particular, this might happen if the user first presses
d to download, and then while ELinks is asking for the file name, a
web script changes window.location to a different URI and that causes
ELinks to ask what to do with the file.  So I'm leaving the FIXME
comment in for now.
2009-07-19 04:06:32 +03:00
Kalle Olavi Niemitalo
38d7bffced Bug 770: Document session.download_uri 2009-07-19 04:06:25 +03:00
Kalle Olavi Niemitalo
266d4df2d2 Fix file descriptor leaks if init_file_download fails
If init_file_download() succeeds (returning non-NULL), it saves the
file descriptor to file_download->handle, whence abort_download() will
close it.  However, if init_file_download() fails, the caller is
responsible of closing the file, something common_download_do() and
continue_download_do() failed to do.  There was no problem with
bittorrent_download() because that uses -1 as the fd.
2009-07-19 04:04:02 +03:00
Kalle Olavi Niemitalo
c7b4d5de97 Fix file name leaks if init_file_download fails
If init_file_download() succeeds (returning non-NULL), it saves the
file-name pointer to file_download->file, whence abort_download() will
free it.  However, if init_file_download() fails, the caller is
responsible of freeing the name.  bittorrent_download() already did so
but common_download_do() and continue_download_do() didn't.
2009-07-19 04:03:49 +03:00
Kalle Olavi Niemitalo
49a8be75bb Doxyfile: Expand ACTION_ as defined
This lets Doxygen generate links for ACT_MAIN_SAVE_AS and others.
2009-07-19 02:32:41 +03:00
Kalle Olavi Niemitalo
126d2d1be3 Remove enum {main,edit,menu}_action_offset
Remove enum main_action_offset, enum edit_action_offset, and enum
menu_action_offset.  It seems the original plan (in commit
174eabf1a448d3f084a318aab77805828f35c42e on 2005-05-16) was to include
the action flags in the action IDs, perhaps with something like:

	ACT_##map##_##action = ACT_##map##_OFFSET_##action | flags

However, this OR operation was never implemented; each ACT_*_*
constant had the same value as the corresponding ACT_*_OFFSET_*,
and the code that looked for flags in action IDs found only zeroes.
Then on 2005-06-10, a separate action.flags member was added, and
the flag checks were corrected to read that instead.  So, it seems
safe to say that the original plan has been discarded and the offset
enumerations won't be needed.
2009-07-19 02:32:41 +03:00
Kalle Olavi Niemitalo
62316163f3 Comment fixes 2009-07-18 23:31:10 +03:00
Kalle Olavi Niemitalo
a92bdcf02d Document add_dlg_button, add_dlg_ok_button 2009-07-18 19:51:01 +03:00
Kalle Olavi Niemitalo
519284654b Typo fix 2009-07-18 18:09:36 +03:00
Kalle Olavi Niemitalo
34bb3c4d95 More comments about type-query callbacks 2009-07-18 02:00:44 +03:00
Kalle Olavi Niemitalo
9f217ba897 Add typedefs for type_query-related callbacks
Doxygen isn't too good at documenting the parameters of a callback
within the documentation of a parameter that points to the callback.
A typedef provides a better place to document the parameters.
2009-07-18 00:09:08 +03:00
Kalle Olavi Niemitalo
b427a4f159 Small Doxygen fixes 2009-07-17 23:58:38 +03:00
Kalle Olavi Niemitalo
dfe6d81683 Add @relates markup for Doxygen 2009-07-17 17:07:12 +03:00
Kalle Olavi Niemitalo
d41fd043c6 Add comments about struct type_query and related 2009-07-17 14:10:36 +03:00
Kalle Olavi Niemitalo
6032bc730a Disable resuming download of formatted document
If the user chose File -> Save formatted document and typed the name
of an existing file, ELinks offered to resume downloading the file.
There are a few problems with that:

* save_formatted_finish does not actually support resuming.  It would
  instead overwrite the beginning of the file and not truncate it.

* When save_formatted calls create_download_file, cdf_hop->data
  ends up pointing to struct document.  If the user then chooses to
  resume, lun_resume would read *(int *)cdf_hop->data, hoping to
  get cmdw_hop.magic or codw_hop.magic.  struct document does not
  begin with any such magic value.

* Because ELinks already has the formatted document in memory,
  resuming saves neither time nor I/O.

So don't show the "Resume download of the original file" button in
this situation.
2009-07-14 10:27:09 +03:00
Kalle Olavi Niemitalo
b6a3f28c49 dump: Use box-drawing characters if available 2009-07-11 16:53:59 +03:00
Kalle Olavi Niemitalo
7bb51e7139 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS
	configure.in
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/af.po (kept 0.13.GIT)
	po/be.po (kept 0.13.GIT)
	po/bg.po (kept 0.13.GIT)
	po/ca.po (kept 0.13.GIT)
	po/cs.po (kept 0.13.GIT)
	po/da.po (kept 0.13.GIT)
	po/de.po (kept 0.13.GIT)
	po/el.po (kept 0.13.GIT)
	po/es.po (kept 0.13.GIT)
	po/et.po (kept 0.13.GIT)
	po/fi.po (kept 0.13.GIT)
	po/fr.po (kept 0.13.GIT)
	po/gl.po (kept 0.13.GIT)
	po/hr.po (kept 0.13.GIT)
	po/hu.po (kept 0.13.GIT)
	po/id.po (kept 0.13.GIT)
	po/is.po (kept 0.13.GIT)
	po/it.po (kept 0.13.GIT)
	po/lt.po (kept 0.13.GIT)
	po/nb.po (kept 0.13.GIT)
	po/nl.po (kept 0.13.GIT)
	po/pl.po (kept 0.13.GIT)
	po/pt.po (kept 0.13.GIT)
	po/pt_BR.po (kept 0.13.GIT)
	po/ro.po (kept 0.13.GIT)
	po/ru.po (kept 0.13.GIT)
	po/sk.po (kept 0.13.GIT)
	po/sr.po (kept 0.13.GIT)
	po/sv.po (kept 0.13.GIT)
	po/tr.po (kept 0.13.GIT)
	po/uk.po (kept 0.13.GIT)
	src/ecmascript/ecmascript.c
2009-07-11 16:47:33 +03:00
Kalle Olavi Niemitalo
6f9501346e Remove GFDL-licensed test file
In recent ELinks release announcements, I have described:

  This release of ELinks is mostly licensed under version 2 of the GNU
  General Public License.  More permissive licences apply to some parts
  of it, and there is also one test file under the GNU Free Documentation
  License; please see COPYING for the list.

Remove that test file, so its GPL-incompatible licence need not be
mentioned in future announcements.  The file however remains
downloadable as part of the elinks.git repository and releases like
elinks-0.11.6.tar.gz.  Those should still be covered by the licence.
2009-07-09 00:11:52 +03:00
Kalle Olavi Niemitalo
063a4aea32 ELinks 0.12pre5 release date 2009-07-08 13:31:00 +03:00
Kalle Olavi Niemitalo
3935269b5a ELinks 0.12pre5.GIT 2009-07-08 13:14:31 +03:00
Kalle Olavi Niemitalo
d522efa5be ELinks 0.12pre5 2009-07-07 15:23:17 +03:00
Kalle Olavi Niemitalo
7297021842 NEWS: ELinks 0.12pre5 2009-07-07 15:23:16 +03:00
Kalle Olavi Niemitalo
6bcf79669e NEWS: Mention the fr.po update
As advised in doc/release.txt: "Changes by new contributors are always
important!"
2009-07-07 15:23:16 +03:00
Kalle Olavi Niemitalo
7314a77731 NEWS: Bug 1080 does not apply to elinks-0.11. 2009-07-07 14:30:29 +03:00
Kalle Olavi Niemitalo
ce5afcad7b NEWS and AUTHORS for the previous change 2009-06-29 23:39:40 +03:00