aboutsummaryrefslogtreecommitdiffstats
path: root/lib/json.c
Commit message (Collapse)AuthorAgeLines
* Reindent everything to K&R style with tabsIndent2015-02-20-825/+815
| | | | | | | Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
* Replace isdigit/isalpha/.../tolower/toupper with glib variantsdequis2015-01-16-4/+4
| | | | | | | | | | | This fixes warnings about passing signed chars to them (apparently they are implemented as macros that do array lookups without checks in some platforms, yay) Specifically: functions=isalnum|isalpha|isdigit|isspace|isxdigit|tolower|toupper sed -ir "s/$functions/g_ascii_&/g" **/*.c
* Unicode parsing fix in JSON parser: JSON can contain UTF-16 surrogate pairsWilmer van der Gaast2014-03-02-11/+41
| | | | | | | (used to encode >16-bit chars). Added code to parse those *and* the ability to encode >16-bit Unicode in UTF-8. Also sending this upstream. This should fix #1121.
* Update json-parser code to git rev 11a80f389769d1f66ca7fbe64ad89c82d3ba4ba9.Wilmer van der Gaast2014-02-13-91/+300
| | | | | | Few BitlBee-specific diffs now. Annoyingly need to link to libm now for the use of the function pow() since the lib now does its own number parsing...
* json: fix uninitialized variablesMiklos Vajna2013-01-01-2/+2
| | | | | | | json.c: In function ‘json_parse_ex’: json.c:260:30: warning: ‘string_length’ may be used uninitialized in this function [-Wmaybe-uninitialized] json.c:358:16: warning: ‘string’ may be used uninitialized in this function [-Wmaybe-uninitialized]
* Importing json.c UTF-8 encoding fix from upstream. Not importing theWilmer van der Gaast2012-12-01-3/+4
| | | | | | | | strto(d|l) fix because I can just use GLib instead of reinventing the wheel. This should fix corruption issues with tweets in Cyrillic. I've double- checked this code against http://en.wikipedia.org/wiki/UTF-8 now and it looks correct to me.
* Fixing integer size issue in JSON parser: Although I've changed the integerWilmer van der Gaast2012-11-27-1/+1
| | | | | | type to long long, the parser was still using strtol to convert numbers, truncating large numbers to LONG_MAX. Bug found by Artem Savkov, thanks!
* Add json.[ch], update debian/copyright with license info.Wilmer van der Gaast2012-10-28-0/+742