Commit graph

155 commits

Author SHA1 Message Date
Martin Tournoij
5221b3d3d6
Fix toml_json.c output (#85)
* Fix toml_json.c output

There were two issues; partly related to changes in upstream toml-test:

- Use appropriate type for local date and times.

- The arrays would get printed as:

      {"type": "array", "value": [...the values...]}

  But this should just be:

      [...the values...]

  It also wouldn't print mixed arrays because 'm' was missing in the
  switch; I adapted this from toml_cat.c.

Before:

	toml-test [./toml_json]: using embedded tests: 328 passed, 87 failed

After:

	toml-test [./toml_json]: using embedded tests: 351 passed, 64 failed

The remaining test failures look like a few minor issues in toml.c,
rather than toml_json.c

* Also fix the "test1" toml-test runner
2023-09-30 12:36:59 -07:00
CK Tan
6fe7fee127 format and comment only 2023-09-18 20:28:16 -07:00
Vlad-Ștefan Harbuz
52e9c039c5
add missing null pointer checks (#80)
The result of copying a null pointer is undefined.
2023-05-29 12:36:32 -07:00
CK Tan
d4c94500c4 fix: make install fail when libtoml.pc does not exist 2023-05-29 12:31:52 -07:00
CK Tan
894902820a minor fix to CALLOC 2022-09-12 10:14:48 -07:00
Kamil Giszczak
e4107c4554
Allow to use 't' (lower case T) as a date-time delimiter (#76)
as specified by TOML ABNF grammar:
https://github.com/toml-lang/toml/blob/1.0.0/toml.abnf#L169
2022-07-27 12:06:50 -07:00
Vladislav Laetansky
034b23ed3e
msvc warning 4996 disable pragma (#73) 2022-04-17 13:09:01 -07:00
CK Tan
4e7b082ccc removed pragma that caused warning on gcc 2022-04-04 11:28:49 -07:00
Vladislav Laetansky
8a863d1ec8
MSVC warnings fix (#72) 2022-04-04 11:24:53 -07:00
CK Tan
99c1e33222 minor 2022-03-28 05:54:28 -07:00
CK Tan
d3a4391ae9 format 2022-01-05 06:02:11 +00:00
CK Tan
32c38751b9 format with clang-format 2021-12-25 23:42:50 -08:00
CK Tan
64e280e20b fix: Makefile install prefix missing for libtoml.pc #68 2021-12-16 13:36:32 -08:00
ownesis
8434e75006
Adding libtoml.pc for pkg-config (#63) 2021-12-10 17:01:52 -08:00
CK Tan
310f02dd67 comment 2021-12-10 16:59:47 -08:00
Toni
62320462f5
Avoid redefinition warnings from strdup functions (#67) 2021-12-10 16:57:07 -08:00
CK Tan
353c68c3df
Merge pull request #64 from moorereason/iss62-goget
fix toml-test build script for Go 1.17
2021-12-07 15:39:12 -08:00
Cameron Moore
1d4fc82ebc
fix toml-test build script for Go 1.17
Fixes #62
2021-11-22 19:26:59 -06:00
CK Tan
37954d9b20 add toml_key_exists() 2021-10-25 23:21:48 -07:00
CK Tan
208203af46 minor 2021-07-15 13:32:11 -07:00
CK Tan
b5818182a4 fix an overflow bug in the scanner 2021-07-14 20:20:15 -07:00
CK Tan
4636173fed fix print of millisec 2021-07-05 09:51:50 -07:00
CK Tan
6b49aaf863 fix to make it run 2021-07-05 00:11:10 -07:00
CK Tan
45921ae3db add test for timestamp millisec 2021-07-04 19:41:16 -07:00
CK Tan
bf0447ab49 add timestamp test 2021-07-04 19:25:24 -07:00
CK Tan
511749ebb9 fix bug in millisec parsing 2021-07-04 19:20:08 -07:00
CK Tan
24e4472b44 tabify 2021-07-04 19:10:32 -07:00
CK Tan
789930f7c9 when parsing millisec in timestamp, force use of base 10 in strtol() 2021-06-04 17:09:25 -07:00
CK Tan
d7dd697c35 minor 2021-04-17 13:06:59 -07:00
CK Tan
22aa38e31d catch unexpected use of malloc 2021-04-17 12:55:51 -07:00
CK Tan
3c1107177f simplify 2021-04-11 18:48:41 -07:00
CK Tan
45e8f3c903 cleanup 2021-04-11 15:36:04 -07:00
CK Tan
a7557174ae fix #52 2021-04-11 15:27:55 -07:00
CK Tan
e9bfb63807 updated 2021-04-11 15:24:10 -07:00
CK Tan
06e2fceedf speed up parse 2021-04-11 15:18:32 -07:00
CK Tan
369fd2451b more tests 2021-03-07 17:41:18 -08:00
CK Tan
dbc1ef26d6 more tests 2021-03-07 17:28:41 -08:00
CK Tan
937d88e009 more tests 2021-03-07 02:29:43 -08:00
CK Tan
836ac94afe bug fix for timestmap 2021-03-07 02:26:19 -08:00
CK Tan
20bee50b59 minor fix 2021-03-07 01:07:03 -08:00
CK Tan
715fa54d45 fixed issue #51 2021-03-06 23:54:24 -08:00
CK Tan
1cfa8e42c4
Merge pull request #49 from mweshahy/patch-1
Add proper SONAME to TOML shared library
2021-02-16 17:12:38 -08:00
CK Tan
fd82018f79 fix #50: crash on input 2021-02-16 17:10:51 -08:00
mweshahy
970ab84bae
Add proper SONAME to TOML shared library
This patch renames the shared library output to libtoml.so.$(LIB_VERSION) instead of libtoml.so. This matches the Yocto standards so that the library can be integrated into Yocto build.
2021-02-16 12:45:18 +01:00
CK Tan
c5d2e37db7
updated 2021-01-27 18:53:31 -08:00
CK Tan
e97a56633e minor 2021-01-09 17:19:09 -08:00
CK Tan
94ded5f2c1 readme 2020-12-22 23:09:36 -08:00
CK Tan
63feb40e3b readme 2020-12-05 15:45:30 -08:00
CK Tan
5039045945 minor 2020-12-05 14:25:39 -08:00
CK Tan
61557dcbaa revise example 2020-12-05 14:21:40 -08:00