mirror of https://github.com/rkd77/elinks.git synced 2024-06-22 00:35:32 +00:00
Commit Graph

53 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
07cee4edee sig_tstp: Use _exit() rather than exit(). 2006-09-10 23:38:02 +03:00
Kalle Olavi Niemitalo
d1fb65120d "Resize terminal" tries to use the window size increment.
Previously, the window sizes computed for xterm were a few pixels off,
and this could result in too few character cells being displayed.
This new version tries to read the window size increment from the
WM_NORMAL_HINTS property set by xterm, and base the computations on
2006-09-09 22:47:48 +03:00
Jonas Fonseca
b9d66bd9bd 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:18:00 +02:00
Kalle Olavi Niemitalo
6052fa12d8 terminal: Define separate structs for events passed via the interlink socket.
This way, struct term_event can be changed without any interprocess
compatibility problems.
2006-08-06 20:02:39 +00:00
Jonas Fonseca
b9908b4622 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

Reported-by: Andy Tanenbaum <ast@cs.vu.nl>
2006-08-05 00:43:34 +02:00
Petr Baudis
8627189148 Support for mouse wheel over GPM
GPM is awful, tho', and this is an ugly hack. Why can't it just report
buttons like everyone else?

Another nice thing is that we don't seem to get the wheel events more
frequently than once in a second or so. Therefore it will work properly
only when you scroll slooooowly. :^)
2006-07-27 15:05:18 +02:00
Laurent MONIN
1ec1dc43be LONG/INT: fix compilation under AMD64, reported by Miciah. 2006-07-05 15:11:53 +02:00
Witold Filipczyk
2f82a708db win32: Keys F1 - F10 are useable 2006-07-02 20:06:57 +02:00
Witold Filipczyk
f45146ebc5 Introduced CHAR_DIR_SEP 2006-07-02 16:30:41 +02:00
Witold Filipczyk
d1e5e0b7d2 Introduced STRING_DIR_SEP for better portability 2006-07-02 08:44:52 +02:00
Laurent MONIN
5acb5e6663 Trim trailing whitespaces. 2006-05-31 19:34:49 +02:00
Witold Filipczyk
f2a2c69ccc win32: avoid the segfault introduced by previous commit 2006-05-21 15:18:33 +02:00
Witold Filipczyk
5558284c08 win32: IMHO slightly better select implementation 2006-05-21 12:59:00 +02:00
Witold Filipczyk
af0997c637 win32: keyboard works. Since now IE has a real competitor ;-). ELinks
works under Windows at least with local files
2006-05-20 21:45:00 +02:00
Witold Filipczyk
edcf52582c win32: fixed colors decoding 2006-05-20 17:27:14 +02:00
Witold Filipczyk
cbb507a6b5 WIN32 port: introduced VT100 decoder. ELinks is able to display first page
of the document. Keyboard doesn't work, Windows style path either.
I tested it only under Wine.
2006-05-20 14:05:45 +02:00
8f329a9b3c sysmouse: Selection works after toggle mouse 2006-02-28 22:56:27 +01:00
90c013cbd0 BSD: Decrease indentation level. Treat buttons 4 & 5 as wheel. If you want
to use wheel mouse on the console run moused with -z 4 option.
2006-02-28 19:42:58 +01:00
Kalle Olavi Niemitalo
b1f8756c59 Merge with http://elinks.cz/elinks.git 2006-02-05 17:48:43 +02:00
Jonas Fonseca
2748d043f9 Autogenerate .vimrc files and put the master in config/vimrc
This changes the init target to be idempotent: most importantly it will now
never overwrite a Makefile if it exists. Additionally 'make init' will
generate the .vimrc files. Yay, no more stupid 'added fairies' commits! ;)
2006-01-15 18:38:58 +01:00
Kalle Olavi Niemitalo
a7e465d785 Merge with http://elinks.cz/elinks.git 2006-01-14 21:38:13 +02:00
Kalle Olavi Niemitalo
5ab2a1ef6e Merge with 0fae27fc27
(via http://elinks.cz/elinks.git)
Resolved conflicts in src/osdep/newwin.c.
2006-01-14 21:37:33 +02:00
Kalle Olavi Niemitalo
89fe822f70 Merge with 6a9ea02f3a
(via http://elinks.cz/elinks.git)
2006-01-14 21:30:12 +02:00
Jonas Fonseca
5d38e99465 Sort Makefile conditionals 2006-01-14 10:41:58 +01:00
Laurent MONIN
3f9bb0d7f9 CONFIG_BEOS -> CONFIG_OS_BEOS 2006-01-11 20:12:59 +01:00
Laurent MONIN
202965d338 CONFIG_WIN32 -> CONFIG_OS_WIN32 2006-01-11 20:10:27 +01:00
Laurent MONIN
86f5f2cf48 CONFIG_UNIX -> CONFIG_OS_UNIX 2006-01-11 20:10:27 +01:00
Laurent MONIN
9eafa94fd9 CONFIG_RISCOS -> CONFIG_OS_RISCOS 2006-01-11 20:10:26 +01:00
Laurent MONIN
b6ccfc0e07 CONFIG_OS2 -> CONFIG_OS_OS2 2006-01-11 20:10:26 +01:00
Laurent MONIN
3efe402722 Complete the list of S_I* macros. 2006-01-10 23:59:14 +01:00
Kalle Olavi Niemitalo
2cfd0a9bb4 Merge with http://elinks.cz/elinks.git 2006-01-09 02:20:27 +02:00
Petr Baudis
a637349b32 Prevent complaining about leaking clipboard 2006-01-06 17:08:38 +01:00
Jonas Fonseca
0c40ff05c9 Fix compilation of get_clipboard_text() 2006-01-06 15:48:15 +01:00
Petr Baudis
f18de1d3f3 Internal clipboard support 2006-01-06 12:02:51 +01:00
Petr Baudis
173e68ccfa Support for pasting from GNU screen clipboard 2006-01-06 12:00:30 +01:00
Kalle Olavi Niemitalo
93714a3e35 Merge with http://elinks.cz/elinks.git 2006-01-06 02:13:11 +02:00
Laurent MONIN
8b7657deaf Use PF_* instead of AF_* as first parameter of socket(2). 2006-01-04 00:32:58 +01:00
Kalle Olavi Niemitalo
4c2831677a Here is a framework that detects cases where a PO file assigns
the same accelerator key to multiple buttons in a dialog box or
to multiple items in a menu.  ELinks already has some support for
this but it requires the translator to run ELinks and manually
scan through all menus and dialogs.  The attached changes make it
possible to quickly detect and list any conflicts, including ones
that can only occur on operating systems or configurations that
the translator is not currently using.

The changes have no immediate effect on the elinks executable or
the MO files.  PO files become larger, however.

The scheme works like this:

- Like before, accelerator keys in translatable strings are
  tagged with the tilde (~) character.

- Whenever a C source file defines an accelerator key, it must
  assign one or more named "contexts" to it.  The translations in
  the PO files inherit these contexts.  If multiple strings use
  the same accelerator (case insensitive) in the same context,
  that's a conflict and can be detected automatically.

- The contexts are defined with "gettext_accelerator_context"
  comments in source files.  These comments delimit regions where
  all translatable strings containing tildes are given the same
  contexts.  There must be one special comment at the top of the
  region; it lists the contexts assigned to that region.  The
  region automatically ends at the end of the function (found
  with regexp /^\}/), but it can also be closed explicitly with
  another special comment.  The comments are formatted like this:

    /* [gettext_accelerator_context(foo, bar, baz)]
         begins a region that uses the contexts "foo", "bar", and "baz".
         The comma is the delimiter; whitespace is optional.

         ends the region.  */

  The scripts don't currently check whether this syntax occurs
  inside or outside comments.

- The names of contexts consist of C identifiers delimited with
  periods.  I typically used the name of a function that sets
  up a dialog, or the name of an array where the items of a
  menu are listed.  There is a special feature for static
  functions: if the name begins with a period, then the period
  will be replaced with the name of the source file and a colon.

- If a menu is programmatically generated from multiple parts,
  of which some are never used together, so that it is safe to
  use the same accelerators in them, then it is necessary to
  define multiple contexts for the same menu.  link_menu() in
  src/viewer/text/link.c is the most complex example of this.

- During make update-po:

  - A Perl script (po/gather-accelerator-contexts.pl) reads
    po/elinks.pot, scans the source files listed in it for
    "gettext_accelerator_context" comments, and rewrites
    po/elinks.pot with "accelerator_context" comments that
    indicate the contexts of each msgid: the union of all
    contexts of all of its uses in the source files.  It also
    removes any "gettext_accelerator_context" comments that
    xgettext --add-comments has copied to elinks.pot.

  - If po/gather-accelerator-contexts.pl does not find any
    contexts for some use of an msgid that seems to contain an
    accelerator (because it contains a tilde), it warns.  If the
    tilde refers to e.g. "~/.elinks" and does not actually mark
    an accelerator, the warning can be silenced by specifying the
    special context "IGNORE", which the script otherwise ignores.

  - msgmerge copies the "accelerator_context" comments from
    po/elinks.pot to po/*.po.  Translators do not edit those

- During make check-po:

  - Another Perl script (po/check-accelerator-contexts.pl) reads
    po/*.po and keeps track of which accelerators have been bound
    in each context.  It warns about any conflicts it finds.
    This script does not access the C source files; thus it does
    not matter if the line numbers in "#:" lines are out of date.

This implementation is not perfect and I am not proposing to
add it to the main source tree at this time.  Specifically:

- It introduces compile-time dependencies on Perl and Locale::PO.
  There should be a configure-time or compile-time check so that
  the new features are skipped if the prerequisites are missing.

- When the scripts include msgstr strings in warnings, they
  should transcode them from the charset of the PO file to the
  one specified by the user's locale.

- It is not adequately documented (well, except perhaps here).

- po/check-accelerator-contexts.pl reports the same conflict
  multiple times if it occurs in multiple contexts.

- The warning messages should include line numbers, so that users
  of Emacs could conveniently edit the conflicting part of the PO
  file.  This is not feasible with the current version of

- Locale::PO does not understand #~ lines and spews warnings
  about them.  There is an ugly hack to hide these warnings.

- Jonas Fonseca suggested the script could propose accelerators
  that are still available.  This has not been implemented.

There are three files attached:

- po/gather-accelerator-contexts.pl: Augments elinks.pot with
  context information.

- po/check-accelerator-contexts.pl: Checks conflicts.

- accelerator-contexts.diff: Makes po/Makefile run the scripts,
  and adds special comments to source files.
2006-01-01 18:55:18 +02:00
Miciah Dashiel Butler Masters
fee63d574a Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2005-11-27 19:40:49 +00:00
Jonas Fonseca
bb588729ff Silence various sparse warnings
... related to __INT_MAX__ and friends not being defined, and various
__builtin.. function declarations missing (they should probably be added
to sparse, but I am lazy).
2005-11-25 19:02:16 +01:00
Jonas Fonseca
5dffe2e8ac Fix various sparse warnings
Mostly non-ANSI function declarations, using 0 as NULL and inline
function prototypes. Also removed unused S_HTTP_100 network state
enum type, which text message contained unknown escape sequence: '\?'.
2005-11-24 15:38:47 +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
Jonas Fonseca
c88afeb1c2 path_to_top -> top_builddir 2005-10-20 04:00:35 +02:00
Jonas Fonseca
e39a4342d6 Include $(top_srcdir)/Makefile.lib instead of $(path_to_top)/Makefile.lib
A step towards out of tree builds ...
2005-10-20 01:11:47 +02:00
Jonas Fonseca
c76586e6b8 Simplify the conditional building
Use the very cool 'VAR-$(CONFIG_FOO) += foo.o' feature instead of the more
verbose current ifeq($(CONFIG_FOO),yes) wrapping.
2005-09-27 22:49:47 +02:00
Jonas Fonseca
68de9e35d3 Automagically link in subdir lib.o files
It is a little ugly since I couldn't get $(wildcard) to expand *.o files
so it just checks if there are any *.c files and then link in the lib.o
based on that.
2005-09-27 22:38:00 +02:00
Jonas Fonseca
1efab31581 Simplify building of and linking with directories
Ditch the building of an archive (.a) in favour of linking all objects in a
directory into a lib.o file. This makes it easy to link in subdirectories
and more importantly keeps the build logic in the local subdirectories.

Note: after updating you will have to rm **/*.a if you do not make clean
before updating.
2005-09-27 21:38:58 +02:00
Jonas Fonseca
b30064c0d0 Rename targets: *-l -> *-local 2005-09-27 21:11:28 +02:00
Petr Baudis
83212cee45 ELBuildized osdep. 2005-09-16 13:25:24 +02:00