Skip to content

Commit

Permalink
Split encode source/header files into three (#288)
Browse files Browse the repository at this point in the history
Split encoding into main, numbers and tags to improve documentation and code readability

Also fix up documentation for private, deprecated and "InMap" methods.



Co-authored-by: Laurence Lundblade <[email protected]>
  • Loading branch information
laurencelundblade and Laurence Lundblade authored Dec 21, 2024
1 parent 55ea951 commit 7596eef
Show file tree
Hide file tree
Showing 11 changed files with 6,248 additions and 5,849 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ add_library(qcbor)

target_sources(qcbor
PRIVATE
src/qcbor_main_encode.c
src/qcbor_number_encode.c
src/ieee754.c
src/qcbor_main_decode.c
src/qcbor_spiffy_decode.c
src/qcbor_tag_decode.c
src/qcbor_number_decode.c
src/qcbor_encode.c
src/qcbor_err_to_str.c
src/UsefulBuf.c
)
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile -- UNIX-style make for qcbor as a lib and command line test
#
# Copyright (c) 2018-2021, Laurence Lundblade. All rights reserved.
# Copyright (c) 2018-2024, Laurence Lundblade. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
Expand All @@ -24,7 +24,15 @@ LIBS=-lm
CFLAGS=$(CMD_LINE) -I inc -I test -Os -fPIC


QCBOR_OBJ=src/UsefulBuf.o src/qcbor_encode.o src/qcbor_main_decode.o src/qcbor_spiffy_decode.o src/qcbor_number_decode.o src/qcbor_tag_decode.o src/ieee754.o src/qcbor_err_to_str.o
QCBOR_OBJ=src/UsefulBuf.o \
src/qcbor_main_encode.o \
src/qcbor_number_encode.o \
src/qcbor_main_decode.o \
src/qcbor_spiffy_decode.o \
src/qcbor_number_decode.o \
src/qcbor_tag_decode.o \
src/ieee754.o \
src/qcbor_err_to_str.o

TEST_OBJ=test/UsefulBuf_Tests.o test/qcbor_encode_tests.o \
test/qcbor_decode_tests.o test/run_tests.o \
Expand Down
46 changes: 30 additions & 16 deletions QCBOR.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion example.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

#include <stdio.h>
#include "example.h"
#include "qcbor/qcbor_encode.h"
#include "qcbor/qcbor_main_encode.h"
#include "qcbor/qcbor_number_encode.h"
#include "qcbor/qcbor_main_decode.h"
#include "qcbor/qcbor_spiffy_decode.h"
#include "qcbor/qcbor_number_decode.h"
Expand Down
5,346 changes: 12 additions & 5,334 deletions inc/qcbor/qcbor_encode.h

Large diffs are not rendered by default.

2,122 changes: 2,122 additions & 0 deletions inc/qcbor/qcbor_main_encode.h

Large diffs are not rendered by default.

Loading

0 comments on commit 7596eef

Please sign in to comment.