/tinycbor-2.7.6/examples/ |
D | simplereader.c | 12 FILE *f = fopen(fname, "rb"); in readfile() local 13 if (!f) in readfile() 15 if (fstat(fileno(f), &st) == -1) in readfile() 18 *size = fread(buf, st.st_size, 1, f); in readfile() 19 fclose(f); in readfile() 25 while (nestingLevel--) in indent() 31 while (len--) in dumpbytes() 125 float f; in dumprecursive() local 127 cbor_value_get_float(it, &f); in dumprecursive() 128 val = f; in dumprecursive() [all …]
|
/tinycbor-2.7.6/tests/encoder/ |
D | tst_encoder.cpp | 76 float f; in myNaNf() local 77 memcpy(&f, &v, sizeof(f)); in myNaNf() 78 Q_ASSERT(qIsNaN(f)); in myNaNf() 79 return f; in myNaNf() 85 float f; in myInff() local 86 memcpy(&f, &v, sizeof(f)); in myInff() 87 Q_ASSERT(qIsInf(f)); in myInff() 88 return f; in myInff() 94 float f; in myNInff() local 95 memcpy(&f, &v, sizeof(f)); in myNInff() [all …]
|
/tinycbor-2.7.6/tests/tojson/ |
D | tst_tojson.cpp | 81 return QByteArray::fromRawData(data, N - 1); in raw() 95 QTest::newRow("2^53-1") << raw("\x1b\0\x1f\xff\xff""\xff\xff\xff\xff") << "9007199254740991"; in addFixedData() 96 …QTest::newRow("2^64-epsilon") << raw("\x1b\xff\xff\xff\xff""\xff\xff\xf8\x00") << "184467440737095… in addFixedData() 99 QTest::newRow("-1") << raw("\x20") << "-1"; in addFixedData() 100 QTest::newRow("-2") << raw("\x21") << "-2"; in addFixedData() 101 QTest::newRow("-2^53+1") << raw("\x3b\0\x1f\xff\xff""\xff\xff\xff\xfe") << "-9007199254740991"; in addFixedData() 102 …QTest::newRow("-2^64+epsilon") << raw("\x3b\xff\xff\xff\xff""\xff\xff\xf8\x00") << "-1844674407370… in addFixedData() 109 QTest::newRow("0.f") << raw("\xfa\0\0\0\0") << "0"; in addFixedData() 111 QTest::newRow("-1.f16") << raw("\xf9\xbc\x00") << "-1"; in addFixedData() 112 QTest::newRow("-1.f") << raw("\xfa\xbf\x80\0\0") << "-1"; in addFixedData() [all …]
|
/tinycbor-2.7.6/src/ |
D | cborpretty.c | 64 * These functions also perform UTF-8 validation in CBOR text strings. If they 65 * encounter a sequence of bytes that not permitted in UTF-8, they will return 67 * in UTF-8. 88 * Base-10 (decimal) text representation of the value 92 …* C-style escaped string in quotes, with C11/C++11 escaping of Unicode codepoints above U+007… 106 …* with float values suffixed by "f" and half-float values suffixed by "f16" (doubles have no … 108 * Comma-separated list of elements, enclosed in square brackets ("[" and "]"). 111 * Comma-separated list of key-value pairs, with the key and value separated 118 while (n--) { in hexDump() 126 /* This function decodes buffer as UTF-8 and prints as escaped UTF-16. [all …]
|
D | cbortojson.c | 59 * in a post-processing phase. 63 * of metadata JSON values that can be used by a JSON-to-CBOR converter to 77 * These functions also perform UTF-8 validation in CBOR text strings. If they 78 * encounter a sequence of bytes that not permitted in UTF-8, they will return 80 * in UTF-8. 99 * double-precision floating point. This means JSON is not capable of 100 * representing integers numbers outside the range [-(2<sup>53</sup>)+1, 101 * 2<sup>53</sup>-1] and is not capable of representing NaN or infinite. If the 104 * conversion will be "null". In addition, the distinction between half-, 105 * single- and double-precision is lost. [all …]
|
/tinycbor-2.7.6/ |
D | .appveyor.yml | 1 version: 0.5-build-{build} 5 - Visual Studio 2015 6 - Visual Studio 2013 7 - Visual Studio 2017 9 - cmd: >- 20 - cmd: >- 21 nmake -f Makefile.nmake -nologo CFLAGS="-W3 -Os -MDd" 25 if /i "%tests%"=="1" qmake CONFIG-=release CONFIG+=debug 27 if /i "%tests%"=="1" nmake -nologo -s 29 - cmd: >- [all …]
|
D | Makefile | 9 CFLAGS = -Wall -Wextra 10 LDFLAGS_GCSECTIONS = -Wl,--gc-sections 11 LDFLAGS = $(if $(gc_sections-pass),$(LDFLAGS_GCSECTIONS)) 13 GIT_ARCHIVE = git archive --prefix="$(PACKAGE)/" -9 15 INSTALL_DATA = $(INSTALL) -m 644 16 INSTALL_PROGRAM = $(INSTALL) -m 755 18 MKDIR = mkdir -p 43 BUILD_SHARED = $(shell file -L /bin/sh 2>/dev/null | grep -q ELF && echo 1) 72 GIT_DIR := $(strip $(shell git -C $(SRCDIR). rev-parse --git-dir 2> /dev/null)) 77 VERSION := $(shell git -C $(SRCDIR). describe --tags | cut -c2-) [all …]
|
D | .travis.yml | 4 - os: linux 8 - ubuntu-toolchain-r-test 9 - sourceline: 'ppa:beineri/opt-qt593-trusty' 11 - qt59base valgrind 12 - g++-7 14 - QMAKESPEC=linux-g++ 15 - EVAL="CC=gcc-7 && CXX=g++-7" 16 - CFLAGS="-Os" 17 - QMAKEFLAGS="-config release" 18 - os: linux [all …]
|
D | maketag.pl | 4 open PROC, "-|", @_ or die("Cannot run $_[0]: $!"); 27 my @result = run("git", "config", "--get", "commit.template"); 36 open LOG, "-|", "git", "shortlog", "-e", "--no-merges", "--not", @tags; 41 open DIFF, "-|", "git", "diff", "HEAD", "--not", @tags, "--", 'src/*.h', ':!*_p.h'; 57 system("git", "tag", "-a", "-F", $tagfile, split(' ', $ENV{GITTAGFLAGS}), "v$v"); 65 ++$v[-1]; 72 open VERSION, ">", "src/tinycbor-version.h" or die("Cannot open src/tinycbor-version.h: $!"); 80 s/^version:.*/version: $v[0].$v[1].$v[2]-build-{build}/;
|
D | Doxyfile | 16 #--------------------------------------------------------------------------- 18 #--------------------------------------------------------------------------- 21 # that follow. The default is UTF-8 which is also the encoding used for all text 25 # The default value is: UTF-8. 27 DOXYFILE_ENCODING = UTF-8 30 # double-quotes, unless you are using Doxywizard) that should identify the 63 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- 73 # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII 74 # characters to appear in the names of generated files. If set to NO, non-ASCII 85 # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), [all …]
|
/tinycbor-2.7.6/tools/cbordump/ |
D | cbordump.c | 62 size_t n = fread(buffer + buflen, 1, bufsize - buflen, in); in dumpFile() 95 while ((c = getopt(argc, argv, "MOSUcjhfn")) != -1) { in main() 104 case 'f': in main() 125 fprintf(stderr, "Unknown option -%c.\n", optopt); in main() 132 " -c Print a CBOR dump (see RFC 7049) (default)\n" in main() 133 " -j Print a JSON equivalent version\n" in main() 134 " -h Print this help output and exit\n" in main() 136 " -M Add metadata so converting back to CBOR is possible\n" in main() 137 " -O Convert CBOR tags to JSON objects\n" in main() 138 " -S Stringify non-text string map keys\n" in main() [all …]
|
/tinycbor-2.7.6/tests/parser/ |
D | tst_parser.cpp | 120 parsed->clear(); in parseOne() 156 return QByteArray::fromRawData(data, N - 1); in raw() 175 void compareOne_real(const QByteArray &data, const QString &expected, int line, int n = -1) in compareOne_real() 252 QTest::newRow("-1") << raw("\x20") << "-1"; in addFixedData() 253 QTest::newRow("-2") << raw("\x21") << "-2"; in addFixedData() 254 QTest::newRow("-24") << raw("\x37") << "-24"; in addFixedData() 255 QTest::newRow("-25") << raw("\x38\x18") << "-25"; in addFixedData() 256 QTest::newRow("-UINT8_MAX") << raw("\x38\xff") << "-256"; in addFixedData() 257 QTest::newRow("-UINT8_MAX-1") << raw("\x39\x01\x00") << "-257"; in addFixedData() 258 QTest::newRow("-UINT16_MAX") << raw("\x39\xff\xff") << "-65536"; in addFixedData() [all …]
|
/tinycbor-2.7.6/tools/json2cbor/ |
D | json2cbor.c | 100 *len = out - buffer; in decode_base64_generic() 107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64() 108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64() 109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, in decode_base64() 110 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, in decode_base64() 111 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, in decode_base64() 112 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, in decode_base64() 113 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, in decode_base64() 114 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, in decode_base64() 115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, in decode_base64() [all …]
|