aboutsummaryrefslogtreecommitdiff
path: root/example
Commit message (Collapse)AuthorAge
* Modernize (#149)Serge Zaitsev2019-04-20
| | | | | | | | | | | | | | | * add .clang-format for automated code formatting * automatic code formatting * move config.mk below all target to allow custom non-default build targets * add license to the top of the file * use correct header file guards syntax * convert to single-header, header-only library * update makefile to use jsmn as a header-only library * update readme * add changed from PR #143 * fix clang warnings * add changes from PR #142 * add consts as per PR #134
* Fixed two typos in a comment.Alexander Belopolsky2018-02-10
|
* Very minor changes to C source codeNicola Spanti (RyDroid)2016-08-08
|
* Fix deheader warningsBastien Dejean2015-12-14
| | | | | | | | Prior to this commit the output of deheader was: remove <stdlib.h> from ./jsmn.c in ./example/jsondump.c, realloc() portability requires <unistd.h>. in ./example/simple.c, strtol() portability requires <stdlib.h>. saw 4 files, 16 includes, 1 removable
* tiny realloc function wrapper which handles cases of realloc failuresgoriy2015-10-25
| | | | | | | | | Memory reallocation with old data pointer handling is done by means of realloc_it() function. Tiny inline function realloc_it() is a wrapper function for standart realloc() which frees old memory pointer and prints errno to stderr if realloc fails.
* small fix of jsondump example for cases of realloc failuresgoriy2015-10-24
| | | | | | | | | | | When realloc() function fails it returns NULL pointer. But old data pointer remains valid in such a case. It's a mistake to use old data pointer to store new pointer returned by realloc. In case of realloc failure, pointer is overwritten with NULL value, but old used memory remains unreferenced and could not be even freed anymore. Such mistakes could lead to memory leaks.
* implemented key/value hierarchy; added 2 examples; fixed some warnings in testsSerge A. Zaitsev2014-11-17