Witold Filipczyk
1509fab35a
[charsets] compilation fixes
2022-10-03 18:31:53 +02:00
Witold Filipczyk
faff6b9b63
ascii replacements for linux virtual terminals
...
Patch by sgerwk, slightly modified. Taken from Debian.
2022-10-03 17:55:20 +02:00
Witold Filipczyk
361b8f661d
[long] long -> intptr_t . Refs #8304
...
AFAIK on Windows long is sizeof 4, while void * is sizeof 8.
intptr_t is the same sizeof as void *.
2022-08-17 20:48:58 +02:00
Witold Filipczyk
064c79433d
[dos] get System codepage under dos
2022-06-05 19:12:25 +02:00
Witold Filipczyk
8b2ab12dc1
[intl] explicit casts to char *
2022-02-21 16:27:29 +01:00
Witold Filipczyk
89340c3848
[intl] const char * in get_cp_mime_name
2022-02-18 15:45:47 +01:00
Witold Filipczyk
b0e93a9eab
[intl] const in get_cp_config_name
2022-02-18 15:39:59 +01:00
Witold Filipczyk
52d871bf8b
[intl] char *const * -> const char **
...
Less warnings.
2022-02-15 19:02:30 +01:00
Witold Filipczyk
eac4271696
[intl] const get_cp_name
2022-02-15 17:53:24 +01:00
Witold Filipczyk
e982333dd9
[intl] const in entities
2022-01-31 16:47:50 +01:00
Witold Filipczyk
5ea99371dd
[bfu] const
2022-01-31 16:41:29 +01:00
Witold Filipczyk
57ebe52948
[utf] const
2022-01-31 16:28:56 +01:00
Witold Filipczyk
f32e45e2f5
[bookmarks] const char in add_bookmarks_cp
2022-01-31 15:46:05 +01:00
Witold Filipczyk
a579526325
[main] cast
2022-01-25 18:16:12 +01:00
Witold Filipczyk
53a860a3d6
[strchr] casting first parameter to const char * was not a good idea
2022-01-18 20:30:48 +01:00
Witold Filipczyk
881f896e85
[mem_calloc] Cast
2022-01-16 21:08:50 +01:00
Witold Filipczyk
be8a030fa7
[mem_realloc] cast return value
2022-01-16 19:38:30 +01:00
Witold Filipczyk
20c161559c
[mem_alloc] cast return value
2022-01-16 19:09:27 +01:00
Witold Filipczyk
5850fcafbc
[iconv] compilation fix
2021-05-26 08:27:17 +02:00
Witold Filipczyk
dfbd75c958
[select] off by two. Refs #88
...
Also changed a bit utf8_to_unicode.
2021-01-17 21:56:40 +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
3e85e37909
[intl] width.c compilable only with CONFIG_UTF8
2020-08-09 19:46:50 +02:00
Witold Filipczyk
ee38fea126
[unicode] Code to calculate cell widths of unicode characters taken from konsole. Refs #60
2020-08-03 23:16:43 +02:00
Witold Filipczyk
3d96b0d7d7
Revert "Compile with C++."
...
This reverts commit 4f4df33638
.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638
Compile with C++.
...
Weak points:
- alignof
- js problems
Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
Marco Migliori
5e31308da0
text direction mark
2017-05-16 20:57:25 +02:00
Witold Filipczyk
52d6f37c8e
Explicit cast to (const char *) for strchr function (C++)
2016-04-20 19:43:37 +02:00
Witold Filipczyk
67673f5fe5
new -> new_ for C++ compatibility
2016-04-20 18:42:22 +02:00
Bin Guo
7553d321a1
Fixed problem of converting more thant 256 chars.
2014-06-26 21:21:59 +02:00
witekfl
7dd4d9b737
iconv: Bail out of the loop when an illegal sequence of bytes occurs.
...
Before, with the default codepage GB2312 and a mysql sql dump in UTF-8
I got segfaults in the iconv related code.
2013-02-27 09:33:55 +01:00
Kalle Olavi Niemitalo
f735bfbe72
I18N bug 1112: Use strange_chars[] for UTF-8 output too
...
Make u2cp_() map code points U+0080 to U+009F via strange_chars[] even
if the target codepage is UTF-8. This helps with buggy web pages that
use ’ when they mean ’. This change does not affect how
ELinks decodes raw bytes 0x80 to 0x9F in HTML.
u2cp_() is used only via the u2cp and u2cp_no_nbsp macros.
Possible side effects of this change at each use of these macros:
* get_translation_table(): Not affected because it does not call u2cp
if the target codepage is UTF-8.
* get_entity_string(): Numeric character references are affected, as intended.
Character entity references are not affected because entities[]
does not define any entities in the U+0080...U+009F range.
* kbd_field(), term_send_ucs(), field_op(): Affected. It is no longer
possible to enter code points U+0080...U+009F from the terminal.
This should not be a problem in practice because those would be
control characters anyway and should therefore be filtered by the
slave process (which doesn't yet recognize them; bug 777).
2011-04-17 21:24:26 +03:00
Witold Filipczyk
90b37ff15f
Reset iconv_cp when switching from Big5 -> UTF-8 to UTF-8 -> UTF-8.
...
After viewing a page with Big5 charset and next a page with UTF-8
charset iconv was used, so slows down a bit.
Now iconv is used only for those charsets, which has the iconv
bitfield set.
2010-07-24 09:57:59 +02:00
Witold Filipczyk
6d567bb8ce
Support for multibyte encodings using iconv.
...
New charsets must be added by analogy to Big5.
2010-07-23 19:59:59 +02:00
Witold Filipczyk
b50fd4e8e2
codepage_desc: added the iconv bitfield.
...
I'm going to use it later for multibyte encodings, such as Big5.
2010-07-23 15:44:12 +02:00
Kalle Olavi Niemitalo
683cfe4c86
Merge branch 'elinks-0.12' into elinks-0.13
...
Conflicts:
NEWS: merged
configure.in: VERSION changed in elinks-0.12; kept 0.13.GIT
doc/man/man1/elinks.1.in: regenerated
doc/man/man5/elinks.conf.5: regenerated
doc/man/man5/elinkskeys.5: regenerated
po/fr.po: kept 0.13.GIT
po/pl.po: kept 0.13.GIT
2009-05-31 16:18:23 +03:00
Kalle Olavi Niemitalo
6d7b904fe3
Don't overcount in utf8_step_forward
...
Reported by witekfl.
2009-05-27 01:11:02 +03:00
Kalle Olavi Niemitalo
34f8f6a58f
Merge branch 'elinks-0.12' into master
...
Conflicts:
NEWS (merged)
configure.in (merged)
doc/man/man1/elinks.1.in (regenerated)
doc/man/man5/elinks.conf.5 (regenerated)
doc/man/man5/elinkskeys.5 (regenerated)
po/af.po (used elinks-0.12)
po/be.po (used elinks-0.12)
po/bg.po (used elinks-0.12)
po/ca.po (used elinks-0.12)
po/cs.po (used elinks-0.12)
po/da.po (used elinks-0.12)
po/de.po (used elinks-0.12)
po/el.po (used elinks-0.12)
po/es.po (used elinks-0.12)
po/et.po (used elinks-0.12)
po/fi.po (used elinks-0.12)
po/fr.po (used master)
po/gl.po (used elinks-0.12)
po/hr.po (used elinks-0.12)
po/hu.po (used elinks-0.12)
po/id.po (used elinks-0.12)
po/is.po (used elinks-0.12)
po/it.po (used elinks-0.12)
po/lt.po (used elinks-0.12)
po/nb.po (used elinks-0.12)
po/nl.po (used elinks-0.12)
po/pl.po (used master)
po/pt.po (used elinks-0.12)
po/pt_BR.po (used elinks-0.12)
po/ro.po (used elinks-0.12)
po/ru.po (used elinks-0.12)
po/sk.po (used elinks-0.12)
po/sr.po (used elinks-0.12)
po/sv.po (used elinks-0.12)
po/tr.po (used elinks-0.12)
po/uk.po (used elinks-0.12)
2009-03-29 18:26:20 +03:00
Kalle Olavi Niemitalo
d7d18e4e43
bug 1047: inline functions C99 conformance
...
C99 6.7.4p3 and 6.7.4p6 set some constraints on what can be done in
inline functions and how they can be declared. In particular, any
function declared inline must also be defined in the same translation
unit. To comply with that, remove inline specifiers from function
declarations in header files when the functions are not also defined
in those header files.
Sun Studio 11 on Solaris 9 is stricter than C99 and does not allow
references to static identifiers in extern inline functions. Make the
configure script detect this and define NONSTATIC_INLINE accordingly
in config.h. Then use that in the definitions of all non-static
inline functions.
Document the restrictions and this scheme in doc/hacking.txt.
2009-03-28 20:15:08 +02:00
Kalle Olavi Niemitalo
d2854dca8d
Merge branch 'elinks-0.12' into elinks-0.13
...
Conflicts:
src/bookmarks/backend/default.c
src/bookmarks/bookmarks.c
src/session/session.c
src/terminal/event.c
src/viewer/text/search.c
2009-02-08 22:02:57 +02:00
Witold Filipczyk
39c6589edb
Added the get_cp_highhalf function, which will be used by xhtml.
2009-01-26 21:11:14 +01:00
Kalle Olavi Niemitalo
9088f11c64
Make encode_utf8() extern even without CONFIG_UTF8.
...
It will soon be needed for conversions from UTF-16 to UTF-8.
2009-01-04 16:55:24 +02: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
8f4d7f9903
Define cp_to_unicode() even without CONFIG_UTF8.
...
And make its last parameter point to const. add_cp_html_to_string()
no longer needs to pretend UTF-8 is ISO-8859-1.
2009-01-01 16:17:03 +00:00
Miciah Dashiel Butler Masters
b9b2b75f73
Drop zero-initialisation of static storage
...
In get_entity_string and point_intersect, do not initialise arrays with
static storage duration to zero; the C standard states that such objects
are automatically initialised to zero.
2008-12-27 05:32:36 +00:00
Kalle Olavi Niemitalo
5c2fada371
Merge branch 'elinks-0.12' into elinks-0.13
...
Conflicts:
src/session/download.c
2008-11-01 22:39:17 +02:00
M. Vefa Bicakci
96b3093519
Patch 2: Modifications to the remaining parts of ELinks
...
[Forward ported to 0.12 from bug 1004 attachment 499. --KON]
2008-11-01 22:20:25 +02:00
Kalle Olavi Niemitalo
5499926cc0
Merge branch 'elinks-0.12' into elinks-0.13
...
Conflicts:
po/pl.po
src/config/conf.c
src/terminal/kbd.c
2008-02-03 22:30:46 +02:00
Kalle Olavi Niemitalo
cb90ed94f0
const in get_cp_index
2008-02-03 14:41:35 +02:00
Miciah Dashiel Butler Masters
3a0286e447
Strings corrections from Malcolm Parsons
...
Fix the spelling and grammar in various comments, variable names, comment
descriptions, and documentation.
2008-01-27 04:19:23 +00:00
Miciah Dashiel Butler Masters
643a34e6af
Strings corrections from Malcolm Parsons
...
Fix the spelling and grammar in various comments, variable names, comment
descriptions, and documentation.
2008-01-27 04:09:18 +00:00