Mailcap is AFAIK specific to UNIX like systems, so using shared memory
and semaphores is allowed. Using IPC it was easy.
IMHO, without shared memory it is much harder to do.
The code needs clenup, checking for header files etc.
Added EVENT_TEXTAREA used to notify the master terminal
about end of execution of an external program on a slave terminal.
The format of data sent to the master terminal by exec_on_slave_terminal
has changed. Now after 0, fg the value of term is sent.
Therfore this release of ELinks is incompatible with previous releases.
Previously, an empty string as spidermonkeydir or luadir meant
that the LIBS and CFLAGS variables should be used unchanged. A few
commits ago however, the configure script was changed to require
test -f "$spidermonkeydir$spidermonkeyinclude/jsapi.h" and
test -f "$luadir/include/lua$suffix/lua.h" to succeed. These
commands interpret spidermonkeydir="" and luadir="" as the root
directory. This behaviour was inconsistent with the part that
decides whether to add the directory to *_LIBS and *_CFLAGS or not.
The inconsistency could be solved in two ways. Either (a) add an
exception so that the test -f is skipped if the variable is empty,
or (b) treat an empty string as the root directory throughout.
Because the Makefile of SpiderMonkey always installs to a subdirectory
of the specified include directory, and ELinks uses #include <jsapi.h>
without specifying that subdirectory in source code, it seems unlikely
that the SpiderMonkey header files would ever be in the default
include path. I am therefore implementing solution (b) here.
I suppose similar considerations apply to Lua but did not check that
carefully.
The SpiderMonkey support in ELinks now uses JS_GetReservedSlot,
which was added in SpiderMonkey 1.5 RC3a, released on 2001-05-11.
So ELinks no longer supports earlier versions of SpiderMonkey.
However, be careful not to claim that ELinks needs "SpiderMonkey
1.5 RC3a or later", because we haven't tested 1.5 RC3a.
(I guess we didn't test zlib 1.2.0.2 either... oh, well.)
I'm not sure if JS_GetReservedSlot exists in all versions of the SpiderMonkey.
IMHO the configure script should check for JS_GetReservedSlot.
The patch in the attachment.
The previous code cast the integer (long actually) to void * and gave
that to JS_SetPrivate. This did not work because JS_SetPrivate
expects pointers to be aligned and replaces the least significant bit
with a tag. By using JS_SetReservedSlot instead, we get control of
the jsval conversions and can store the integer properly.
Revert part of commit 7215c964e40afe953787d7831b04182fbaba4662,
"Use real types (enum connection_{state,priority})." of 2005-06-14.
connection.pri[] is indexed by enum connection_priority, but its
elements are merely reference counts; they are never assigned from
or compared to enum connection_priority. Defining the elements
as int will result in more readable output from GDB.
Noted in bug 920.