summaryrefslogtreecommitdiff
path: root/utils/utf8.c
Commit message (Collapse)AuthorAgeFilesLines
* Use coccinelle to change logging macro calls in c filesVincent Sanders2017-09-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done @@ expression E; @@ -LOG(E); +NSLOG(netsurf, INFO, E); @@ expression E, E1; @@ -LOG(E, E1); +NSLOG(netsurf, INFO, E, E1); @@ expression E, E1, E2; @@ -LOG(E, E1, E2); +NSLOG(netsurf, INFO, E, E1, E2); @@ expression E, E1, E2, E3; @@ -LOG(E, E1, E2, E3); +NSLOG(netsurf, INFO, E, E1, E2, E3); @@ expression E, E1, E2, E3, E4; @@ -LOG(E, E1, E2, E3, E4); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4); @@ expression E, E1, E2, E3, E4, E5; @@ -LOG(E, E1, E2, E3, E4, E5); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5); @@ expression E, E1, E2, E3, E4, E5, E6; @@ -LOG(E, E1, E2, E3, E4, E5, E6); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6); @@ expression E, E1, E2, E3, E4, E5, E6, E7; @@ -LOG(E, E1, E2, E3, E4, E5, E6, E7); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
* move utf8 header into public APIVincent Sanders2016-05-301-1/+1
|
* Change LOG() macro to be varadicVincent Sanders2015-05-281-2/+2
| | | | | | | | | | | | This changes the LOG macro to be varadic removing the need for all callsites to have double bracketing and allows for future improvement on how we use the logging macros. The callsites were changed with coccinelle and the changes checked by hand. Compile tested for several frontends but not all. A formatting annotation has also been added which allows the compiler to check the parameters and types passed to the logging.
* Update the core to use the split operations table headersVincent Sanders2014-10-161-3/+4
| | | | Second in the series to decouple the core API usage from the frontends.
* fix possible buffer termination error (coverity 1195410)Vincent Sanders2014-05-181-2/+2
|
* fix possible missing null termination (coverity 1195410 and 1195411 )Vincent Sanders2014-05-111-3/+3
|
* move utf8 local conversion operations to tableVincent Sanders2014-02-011-2/+3
|
* move utf8 conversion routines to use nserror instead of their own error enumVincent Sanders2014-01-281-149/+71
|
* improve gtk source save to use gtk overwrite protection feature coverity 1109873Vincent Sanders2013-10-251-35/+39
|
* Tidy up cached descriptor usage and ensure "shrink-wrap" realloc call only ↵Michael Drake2013-05-151-21/+23
| | | | ever has to shrink.
* Cache conversion descriptor since this func. is called many times in series ↵Michael Drake2013-05-151-0/+27
| | | | for the same conversion. (UTF-8 --> iso-8859-1)
* Add function to get the byte length of n characters in a utf8 string.Michael Drake2013-03-171-0/+18
|
* A load of refactoring of how content selection and input work.Michael Drake2013-02-221-0/+39
| | | | | | | | | | | | | Keypresses now go via content interface. Contents don't shove the selection object into browser windows any more. Contents report selection existence by sending message. HTML content keeps track of where selections in it exist. Contents report whether they have input focus via caret setting msg. Caret can be hidden (can still input/paste) or removed. Consolidate textarea selection handling. Make textarea report its selection status changes to client. Various textarea fixes. Changed how we decide when to clear selections, and give focus.
* Correctly emit entities when serialising to HTML.John-Mark Bell2012-12-301-1/+138
|
* trivial docuemntation cleanups to address some of the huge number of ↵Vincent Sanders2012-10-081-1/+1
| | | | docuemntation warnings
* Further hackery for the inconsistency of iconv() APIsJohn Mark Bell2011-03-091-1/+1
| | | | svn path=/trunk/netsurf/; revision=11951
* remove _GNU_SOURCE define from everywhere.Vincent Sanders2010-04-241-1/+0
| | | | | | strndup is not standard so provide an implementation. svn path=/trunk/netsurf/; revision=10474
* Hubbub is no longer optional.John Mark Bell2009-04-171-190/+0
| | | | | | Remove libxml2 parser binding. svn path=/trunk/netsurf/; revision=7115
* Squash leakJohn Mark Bell2009-02-181-0/+2
| | | | svn path=/trunk/netsurf/; revision=6561
* Fix ucs4->utf8 conversion. It probably helps to return the number of bytes ↵John Mark Bell2009-02-181-1/+1
| | | | | | in the buffer, rather than the free space. svn path=/trunk/netsurf/; revision=6558
* Port our UTF-8 routines to parserutils (only enabled when building against ↵John Mark Bell2009-02-171-92/+246
| | | | | | | | | Hubbub). Sync our temporary internal copies of these functions with parserutils (which is rather better tested and fixes a number of known bugs in NetSurf's previous UTF-8 handling). Ideally, this will be the only place in NetSurf that has any dependency on parserutils, so port the amiga font code to our internal APIs. svn path=/trunk/netsurf/; revision=6550
* Removed some debug which was supposed to be temporary.Chris Young2008-08-291-4/+0
| | | | svn path=/trunk/netsurf/; revision=5219
* Looks like I mis-remembered the API here.John Mark Bell2008-08-261-6/+12
| | | | | | Also check for memory exhaustion. svn path=/trunk/netsurf/; revision=5207
* Prevent iconv() being passed an empty string in utf8_convert()Chris Young2008-08-261-0/+11
| | | | svn path=/trunk/netsurf/; revision=5202
* Make nsgtk compile on Mac OS X.John Mark Bell2008-08-111-0/+2
| | | | svn path=/trunk/netsurf/; revision=5031
* Remove hardcoded define for LIBICONV_PLUGFrançois Revel2008-08-081-1/+0
| | | | svn path=/trunk/netsurf/; revision=4967
* Avoid magic numbers.John Tytgat2008-03-091-4/+4
| | | | svn path=/trunk/netsurf/; revision=3907
* SignednessWarnings.squash()John Mark Bell2008-02-251-1/+2
| | | | | | Aside from a number of instances of const being cast away (mostly relating to the urldb, which is correct to only export const data) this now builds warning-free with GCC 4 on x86, which is nice. svn path=/trunk/netsurf/; revision=3868
* Update all source code file headers to reflect GPL version 2 only and ↵Vincent Sanders2007-08-081-4/+14
| | | | | | contain appropriate licence text svn path=/trunk/netsurf/; revision=3486
* Changes to allow building on Solaris.Rob Kendrick2007-06-151-1/+1
| | | | | | | | | * Tested on Solaris Express: Developer Edition, which is between Solaris 10 and 11. * Used gcc, libmng etc packages using pkg-get and blastwave's resources. * Had to build lemon and re2c manually. svn path=/trunk/netsurf/; revision=3350
* Remove the netsurf/ from the include paths and rationalise use of <> vs "" ↵Daniel Silverstone2007-05-301-2/+2
| | | | | | | | | | | | | | in includes NetSurf includes are now done with ""s and other system includes with <>s as C intended. The scandeps tool has been updated to only look for ""ed includes, and to verify that the files exist in the tree before adding them to the dependency lines. The depend rule has therefore been augmented to make sure the autogenerated files are built before it is run. This is untested under self-hosted RISC OS builds. All else tested and works. svn path=/trunk/netsurf/; revision=3307
* Update project URL.Michael Drake2006-11-271-1/+1
| | | | svn path=/trunk/netsurf/; revision=3073
* [project @ 2006-03-16 23:30:46 by dsilvers]Daniel Silverstone2006-03-161-1/+2
| | | | | | Fix another assumption that freeing/dupping/whatever a NULL is safe. svn path=/import/netsurf/; revision=2132
* [project @ 2006-02-11 18:11:09 by jmb]John Mark Bell2006-02-111-0/+4
| | | | | | Clear cached conversion descriptor if iconv() fails svn path=/import/netsurf/; revision=2071
* [project @ 2005-08-20 23:04:35 by bursa]James Bursa2005-08-201-0/+1
| | | | | | Fix strndup() warnings. svn path=/import/netsurf/; revision=1850
* [project @ 2005-07-16 16:15:37 by adrianl]Adrian Lees2005-07-161-4/+2
| | | | | | Faster utf8 next/prev functions svn path=/import/netsurf/; revision=1797
* [project @ 2005-07-11 18:10:10 by jmb]John Mark Bell2005-07-111-12/+44
| | | | | | Cache previous iconv conversion descriptor svn path=/import/netsurf/; revision=1792
* [project @ 2005-07-02 18:18:48 by bursa]James Bursa2005-07-021-2/+2
| | | | | | Fix file comment for Doxygen. svn path=/import/netsurf/; revision=1778
* [project @ 2005-07-02 14:35:43 by jmb]John Mark Bell2005-07-021-17/+13
| | | | | | Tidy up svn path=/import/netsurf/; revision=1773
* [project @ 2005-06-28 23:46:16 by jmb]John Mark Bell2005-06-281-0/+12
| | | | | | Using Iconv to convert between an encoding and itself is pretty pointless. svn path=/import/netsurf/; revision=1772
* [project @ 2005-06-07 21:29:26 by jmb]John Mark Bell2005-06-071-25/+42
| | | | | | | Lose cnv_str_local_enc and friends. UTF-8 conversion functions now return an enumerated type allowing for fallbacks, if appropriate. svn path=/import/netsurf/; revision=1744
* [project @ 2005-05-23 22:27:37 by jmb]John Mark Bell2005-05-231-1/+8
| | | | | | Tighten up entry conditions svn path=/import/netsurf/; revision=1735
* [project @ 2005-04-16 08:19:56 by adrianl]Adrian Lees2005-04-161-0/+1
| | | | | | missing #include svn path=/import/netsurf/; revision=1651
* [project @ 2005-04-16 05:09:32 by jmb]John Mark Bell2005-04-161-0/+280
Split out UTF-8 handling functions. Submit URL-encoded forms in sensible encoding: * First entry in accept-charset list, if present * Document encoding, otherwise We may want to explicitly look for UTF-8, to save converting. Convert cnv_str_local_enc/cnv_local_enc_str to use iconv (they're now veneers for utf8_[to/from]_enc). Provide mechanism for looking up local system charset (derived from system alphabet, under RISC OS) svn path=/import/netsurf/; revision=1647