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

39 Commits

Author SHA1 Message Date
Witold Filipczyk
bcf9589ff0 [osdep] const in get_shell 2022-02-20 13:52:47 +01:00
Witold Filipczyk
89340c3848 [intl] const char * in get_cp_mime_name 2022-02-18 15:45:47 +01:00
Witold Filipczyk
277f341d2b [terminal] exec_on_terminal and related rewritten a bit to allow const param 2022-01-30 18:12:38 +01:00
Witold Filipczyk
65e74dc39d [term] enum term_mode_type -> term_mode_type_T 2022-01-28 17:54:58 +01:00
Witold Filipczyk
5ef839cf18 [term] enum term_env_type -> term_env_type_T 2022-01-28 17:37:43 +01:00
Witold Filipczyk
e8df90f7b0 [term] enum term_exec -> term_exec_T 2022-01-28 15:11:23 +01:00
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00
Miciah Dashiel Butler Masters
c74ddb29c5 SMJS: add terminal object
Add terminal_class, which defines a JSObject wrapper for struct terminal.

Add terminal_array_class, which defines a JSObject wrapper for accessing
the "terminals" linked list of struct terminal.

Add session_array_class, which defines a JSObject wrapper for accessing the
tabs (sessions) of a terminal.

Add pointers from struct terminal to the terminal_class object and
the session_array_class object.

Add terminal_props and terminal_get_property for terminal_class.

Add terminal_finalize, which clears the pointers between a struct terminal
and the JSObject wrapper in question.

Add smjs_init_terminal_interface, which creates a terminal_array_class
instance and assigns it to  the "terminal" property on the "elinks" object.
Call smjs_init_terminal_interface from smjs_init_elinks_object.

Add smjs_get_terminal_object and smjs_get_session_array_object to get
the wrapper objects for a given struct terminal, and add
smjs_get_terminal_array_object to get a terminal_array_class object.

Add smjs_detach_terminal_object and smjs_detach_session_array_object, which
clear the pointers between a given struct terminal and its JSObject
wrappers.

Add terminal_array_get_property for terminal_array_class.

Add session_array_get_property for session_array_class.
2011-11-14 04:34:51 +00:00
Witold Filipczyk
7751102ce7 Bug 1070: Support for fbterm.
fbterm uses different 256 color sequences than xterm.
color256_seqs are part of the driver info.
2009-04-26 18:12:00 +03:00
Kalle Olavi Niemitalo
687f19dbde Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bfu/dialog.c
	src/bfu/hotkey.c
	src/bfu/inpfield.c
	src/dialogs/options.c
	src/document/renderer.c
	src/intl/gettext/libintl.h
	src/protocol/http/codes.c
	src/session/task.c
	src/terminal/event.c
	src/terminal/terminal.h
	src/viewer/text/form.c
	src/viewer/text/link.c

And a semantic conflict in src/terminal/terminal.c.
2009-01-01 19:14:01 +00:00
Kalle Olavi Niemitalo
b6dfdf86a6 Bug 885: Proper charset support in xterm window title
When ELinks runs in an X11 terminal emulator (e.g. xterm), or in GNU
Screen, it tries to update the title of the window to match the title
of the current document.  To do this, ELinks sends an "OSC 1 ; Pt BEL"
sequence to the terminal.  Unfortunately, xterm expects the Pt string
to be in the ISO-8859-1 charset, making it impossible to display e.g.
Cyrillic characters.  In xterm patch #210 (2006-03-12) however, there
is a menu item and a resource that can make xterm take the Pt string
in UTF-8 instead, allowing characters from all around the world.
The downside is that ELinks apparently cannot ask xterm whether the
setting is on or off; so add a terminal._template_.latin1_title option
to ELinks and let the user edit that instead.

Complete list of changes:

- Add the terminal._template_.latin1_title option.  But do not add
  that to the terminal options window because it's already rather
  crowded there.

- In set_window_title(), take a new codepage argument.  Use it to
  decode the title into Unicode characters, and remove only actual
  control characters.  For example, CP437 has graphical characters in
  the 0x80...0x9F range, so don't remove those, even though ISO-8859-1
  has control characters in the same range.  Likewise, don't
  misinterpret single bytes of UTF-8 characters as control characters.

- In set_window_title(), do not truncate the title to the width of the
  window.  The font is likely to be different and proportional anyway.
  But do truncate before 1024 bytes, an xterm limit.

- In struct itrm, add a title_codepage member to remember which
  charset the master said it was going to use in the terminal window
  title.  Initialize title_codepage in handle_trm(), update it in
  dispatch_special() if the master sends the new request
  TERM_FN_TITLE_CODEPAGE, and use it in most set_window_title() calls;
  but not in the one that sets $TERM as the title, because that string
  was not received from the master and should consist of ASCII
  characters only.

- In set_terminal_title(), convert the caller-provided title to
  ISO-8859-1 or UTF-8 if appropriate, and report the codepage to the
  slave with the new TERM_FN_TITLE_CODEPAGE request.  The conversion
  can run out of memory, so return a success/error flag, rather than
  void.  In display_window_title(), check this result and don't update
  caches on error.

- Add a NEWS entry for all of this.
2009-01-01 16:17:03 +00:00
Kalle Olavi Niemitalo
ad45176dde Add get_terminal_codepage().
This simplifies the callers a little and may help implement
simultaneous support for different charsets on different terminals
of the same type (bug 1064).
2009-01-01 16:16:17 +00:00
Kalle Olavi Niemitalo
84e19d0e4e bug 1054: Don't abort downloads when closing a terminal.
Except if they have external handlers.

When ELinks receives an event from a terminal, move that terminal to
the beginning of the global "terminals" list, so that the terminals
are always sorted according to the time of the most recent use.  Note,
this affects the numbering of bookmark folders in session snapshots.

Add get_default_terminal(), which returns the most recently used
terminal that is still open.  Use that in various places that
previously used terminals.prev or terminals.next.  Four functions
fetch the size of the terminal for User-Agent headers, and
get_default_terminal() is not really right, but neither was the
original code; add TODO comments in those functions.

When the user chooses "Background and Notify", associate the download
with the terminal where the dialog box is.  So any later messages will
then appear in that terminal, if it is still open.  However, don't
change the terminal if the download has an external handler.

When a download gets some data, don't immediately check the associated
terminal.  Instead, wait for the download to end.  Then, if the
terminal of the download has been closed, use get_default_terminal()
instead.  If there is no default terminal either, just skip any
message boxes.
2008-10-15 23:29:25 +03:00
Kalle Olavi Niemitalo
75302f8e62 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS
2008-10-03 10:55:11 +03:00
Kalle Olavi Niemitalo
4c2ddac289 Bug 1053: Fix crash when download ends.
ELinks attempted to display a message box on file_download.term, but
it had already closed that terminal and freed the struct terminal.  To
fix this, reset file_download.term pointers to NULL when the terminal
is about to be destroyed.  Also, assert in download_data_store() that
file_download.term is either NULL or in the global "terminals" list.

Reported by أحمد المحمودي.
(cherry picked from commit 6e2476ea4d)
2008-10-03 00:18:41 +03:00
Miciah Dashiel Butler Masters
a66f6f8c90 Make the textarea_data member of struct terminal opaque
Move the definition of struct textarea_data back to src/viewer/text/textarea.c.
2007-09-01 12:02:21 +00:00
Miciah Dashiel Butler Masters
d4c262694b Move pointers to struct textarea_data from linked-list to terminal structure 2007-09-01 09:02:01 +00:00
Kalle Olavi Niemitalo
76c6f38169 Doxygen: Begin commands with @ not \. 2007-07-31 13:47:12 +03:00
Kalle Olavi Niemitalo
8cfe7e026f Doxygenate src/terminal/ 2007-07-27 18:33:33 +03:00
Kalle Olavi Niemitalo
d3d2bb26c5 New macro LIST_OF for better Doxygen support. 2007-07-26 22:45:51 +03:00
Kalle Olavi Niemitalo
6117f8a164 Name the exec_on_terminal() fg values. 2007-07-15 23:46:18 +03:00
Kalle Olavi Niemitalo
45d1750d03 Bug 914: Don't let UTF-8 I/O affect internal representations.
Use it for the actual I/O only.  Previously, defining CONFIG_UTF8 and
enabling UTF-8 used to force many strings to the UTF-8 charset
regardless of the terminal charset option.  Now, those strings always
follow the terminal charset.  This fixes bug 914 which was caused
because _() returned strings in the terminal charset and functions
then assumed they were in UTF-8.  This reduction in the effects of
UTF-8 I/O may also simplify future testing.
2007-05-20 15:31:02 +03:00
Kalle Olavi Niemitalo
36287949a0 Bug 914: Add terminal.utf8_cp, not yet read. 2007-05-20 13:50:47 +03:00
Witold Filipczyk
b81bcd8307 Removed the buggy code. 2007-01-28 17:45:24 +02:00
Kalle Olavi Niemitalo
8dd400d49f Make frame translation tables const. 2007-01-25 00:05:36 +02:00
Kalle Olavi Niemitalo
9efc661384 Bug 827: Force UTF-8 I/O on if the UTF-8 charset is selected. 2006-12-09 21:13:13 +02:00
Kalle Olavi Niemitalo
92cb452a9e Rename CONFIG_UTF_8 to CONFIG_UTF8.
The configure script no longer recognizes "CONFIG_UTF_8=yes" lines
in custom features.conf files.  They will have to be changed to
"CONFIG_UTF8=yes".  This incompatibility was deemed acceptable
because no released version of ELinks supports CONFIG_UTF_8.

The --enable-utf-8 option was not renamed.
2006-09-17 16:12:47 +03:00
Witold Filipczyk
c1c494bd4b Preserved Linux console mode. When console was in one char mode, restore it.
When console was in UTF-8 mode, restore it, too.
2006-08-27 14:18:02 +02:00
Witold Filipczyk
2a6125e3d0 Merge with utf8. src/document/plain/renderer.c replaced by utf8 version 2006-07-21 13:12:06 +02:00
Miciah Dashiel Butler Masters
a0bcf254ae Modularise src/terminal 2006-05-20 15:01:24 +00:00
Kalle Olavi Niemitalo
39c157389d Don't let move_current_tab move the tab beyond the main menu.
src/terminal/tab.c (get_tab_by_number): Assert that the returned
struct window * actually points to a struct window.

src/terminal/tab.c (move_current_tab): Keep tabs contiguous in the
stack of windows.  Obey "ui.tabs.wraparound".

src/terminal/terminal.h (struct terminal): Documented that tabs can
move in the stack.

src/terminal/window.c (assert_window_stacking): Check that the main
menu isn't between tabs.
2006-05-14 22:17:26 +03:00
Kalle Olavi Niemitalo
276f723ab7 New tabs always open below dialogs, never above.
This fixes the bug that tabs opened with -remote used to hide existing
dialogs, which then became unusable until the new tabs were closed.

src/terminal/tab.c (init_tab): Put the new tab immediately above
existing ones, or if it's the first one, then at the bottom of the stack.
Added assertions.

src/terminal/terminal.h (struct terminal): Redocumented the stacking
order of windows.

src/terminal/window.c [CONFIG_DEBUG] (assert_window_stacking): New function.

src/terminal/window.h (assert_window_stacking): New function or no-op macro.
2006-05-14 14:03:17 +03:00
witekfl
a802f0fb3e Someone, sometime ago wanted always visible menu bar. This is attempt to
handle it. I have no idea where to make initialisation call to
activate_bfu_technology.
2006-03-03 19:01:15 +01:00
Pavol Babincak
f9d67aeb73 Added configure option --enable-utf-8
For enabling better UTF-8 support by Witek and Scrool.
2006-02-18 20:28:00 +01:00
Witold Filipczyk
44a1aa9c87 Witekfl's UTF-8 patch v5. 2006-02-18 20:27:46 +01:00
Jonas Fonseca
acf2ec806b Remove empty lines in start of header files
A left over from the CVS Id removal. Also, for a few files, normalize the
order in which things are declared in headers.
2005-11-15 11:33:27 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00