12 Commits
Author SHA1 Message Date
Thiago Macieira c52d731e5e cbor.h: let tinycbor-export.h define CBOR_API
And make CBOR_PRIVATE_API fall back to it.

We also need to provide the file for the old Makefile build too.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2025-03-12 16:49:17 -07:00
phirsov f1db0abccd enhancement #149 implemented: access half-precision floating point data as single float
Motivation: half-precision floating point format is used to minimize storage
and traffic mostly.  Application level manipulates with single and double
precision usually. So, two routines added to public API to encode/decode given
single precision value in the half precision format

Signed-off-by: S.Phirsov
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2019-03-15 10:11:00 -07:00
Thiago Macieira 301e263afb Update the ELF soname not to say "libtinycbor.so.0"
Since we're not (yet) guaranteeing binary compatibility, let's use 0.5
as the "soversion".

This changes the version number stored in the VERSION file so that the
actual library file is "libtinycbor.so.0.5.0". As an indirect
consequence, the release will be tagged "v0.5.0", which sorts after
"v0.5-beta1".

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-30 14:01:23 -08:00
Thiago Macieira f39dcb8b56 Pretty: move the two functions taking FILE* to a separate file
This now allows the cborpretty.c source to be compiled even in C
freestanding environments.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-02 17:05:44 -06:00
Thiago Macieira 49c15d986c Fix MSVC build: cborvalidation.obj wasn't added to the library
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-13 13:18:23 -08:00
Thiago Macieira effaf7d5c3 Merge branch 'master' into dev
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2017-10-07 15:38:31 -04:00
Thiago Macieira addf8043e4 Add the API to do more in-depth validation
This implements barely the canonical validation. Implemented features:
 - CborValidateShortestFloatingPoint
 - CborValidateNoIndeterminateLength
 - CborValidateNoUndefined
 - CborValidateNoTags
 - CborValidateCompleteData
 - CborValidateNoUnknownSimpleTypesSA
 - CborValidateNoUnknownSimpleTypes

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2017-05-08 20:59:16 -07:00
Thiago Macieira bfbd4de1a0 Makefile.nmake: add missing .obj files to the lib sources
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-13 23:58:02 -07:00
Thiago Macieira c2242c5b36 Stop setting TINYCBOR_VERSION in the build
For TinyCBOR 0.5, I'd like to make it numeric. Anyway, nothing was using
this.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-30 12:56:20 -08:00
Thiago Macieira 2921240965 Create a Perl script that properly creates tags
The previous part of the Makefile didn't work properly. Instead of using
the contents of the VERSION file, it updated the file right before the
tagging and always for the next minor release.

Instead, move everything to a Perl script that updates the VERSION file
only after the tagging and sets up for a patch release (which are more
frequent). Updating of the dev branch is left as an exercise for the
reader.

As a bonus, this will work on Windows too without Unix shell tools.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-11 10:07:18 +08:00
Otavio Pontes 4ce56694ed Remove from cborparser.c file the dependency on stdlib header
Function _cbor_value_dup_string from cborparser.c is using malloc/free
functions, from sdtlib header, so it is not possible to compile the
cborparser in systems without stdlib support. Move this function to a
different c file in order to remove the dependency on stdlib header from
cborparser.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-08 09:55:15 -07:00
Thiago Macieira 2085ad872e Add initial support for building with Visual Studio
cbortojson.c uses open_memstream for part of its functionality, which
isn't available with the Microsoft CRT, so it's excluded.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-07 17:43:02 -07:00