mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
marge cspot to master
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
root = true
|
||||
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
indent_size = unset
|
||||
|
||||
# ignore external repositories and test inputs
|
||||
[tests/{unity,json-patch-tests,inputs}/*]
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
end_of_line = unset
|
||||
charset = unset
|
||||
trim_trailing_whitespace = unset
|
||||
insert_final_newline = unset
|
||||
@@ -1,11 +0,0 @@
|
||||
* text=auto
|
||||
/tests/inputs/* text eol=lf
|
||||
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
.github export-ignore
|
||||
.editorconfig export-ignore
|
||||
.travis.yml export-ignore
|
||||
|
||||
# Linguist incorrectly identified the headers as C++, manually override this.
|
||||
*.h linguist-language=C
|
||||
@@ -1,54 +0,0 @@
|
||||
Contribution Guidelines
|
||||
=======================
|
||||
|
||||
Contributions to cJSON are welcome. If you find a bug or want to improve cJSON in another way, pull requests are appreciated.
|
||||
|
||||
For bigger changes, in order to avoid wasted effort, please open an issue to discuss the technical details before creating a pull request.
|
||||
|
||||
The further sections explain the process in more detail and provides some guidelines on how contributions should look like.
|
||||
|
||||
Branches
|
||||
--------
|
||||
There are two branches to be aware of, the `master` and the `develop` branch. The `master` branch is reserved for the latest release, so only make pull requests to the `master` branch for small bug- or security fixes (these are usually just a few lines). In all other cases, please make a pull request to the `develop` branch.
|
||||
|
||||
Coding Style
|
||||
------------
|
||||
The coding style has been discussed in [#24](https://github.com/DaveGamble/cJSON/issues/24). The basics are:
|
||||
|
||||
* Use 4 spaces for indentation
|
||||
* No oneliners (conditions, loops, variable declarations ...)
|
||||
* Always use parenthesis for control structures
|
||||
* Don't implicitly rely on operator precedence, use round brackets in expressions. e.g. `(a > b) && (c < d)` instead of `a>b && c<d`
|
||||
* opening curly braces start in the next line
|
||||
* use spaces around operators
|
||||
* lines should not have trailing whitespace
|
||||
* use spaces between function parameters
|
||||
* use pronouncable variable names, not just a combination of letters
|
||||
|
||||
Example:
|
||||
|
||||
```c
|
||||
/* calculate the new length of the string in a printbuffer and update the offset */
|
||||
static void update_offset(printbuffer * const buffer)
|
||||
{
|
||||
const unsigned char *buffer_pointer = NULL;
|
||||
if ((buffer == NULL) || (buffer->buffer == NULL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
buffer_pointer = buffer->buffer + buffer->offset;
|
||||
|
||||
buffer->offset += strlen((const char*)buffer_pointer);
|
||||
}
|
||||
```
|
||||
|
||||
Unit Tests
|
||||
----------
|
||||
cJSON uses the [Unity](https://github.com/ThrowTheSwitch/Unity) library for unit tests. The tests are located in the `tests` directory. In order to add a new test, either add it to one of the existing files (if it fits) or add a new C file for the test. That new file has to be added to the list of tests in `tests/CMakeLists.txt`.
|
||||
|
||||
All new features have to be covered by unit tests.
|
||||
|
||||
Other Notes
|
||||
-----------
|
||||
* Internal functions are to be declared static.
|
||||
* Wrap the return type of external function in the `CJSON_PUBLIC` macro.
|
||||
@@ -1,102 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
mem_check:
|
||||
- ENABLE_VALGRIND
|
||||
- ENABLE_SANITIZERS
|
||||
- NONE_MEM_CHECK
|
||||
compiler:
|
||||
- GCC
|
||||
- CLANG
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install clang-8 valgrind
|
||||
- name: build and test
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ matrix.mem_check }}" == "ENABLE_VALGRIND" ]; then
|
||||
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=ON -DENABLE_SAFE_STACK=ON -DENABLE_SANITIZERS=OFF"
|
||||
elif [ "${{ matrix.mem_check }}" == "ENABLE_SANITIZERS" ]; then
|
||||
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=OFF -DENABLE_SAFE_STACK=OFF -DENABLE_SANITIZERS=ON"
|
||||
else
|
||||
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=OFF -DENABLE_SAFE_STACK=OFF -DENABLE_SANITIZERS=OFF"
|
||||
fi
|
||||
if [ "${{ matrix.compiler }}" == "GCC" ]; then
|
||||
export CC=gcc
|
||||
else
|
||||
export CC=clang
|
||||
fi
|
||||
#run build and test
|
||||
JOBS=20
|
||||
export CTEST_PARALLEL_LEVEL=$JOBS
|
||||
export CTEST_OUTPUT_ON_FAILURE=1
|
||||
mkdir -p build
|
||||
cd build
|
||||
echo [cmake]: cmake .. $EVENT_CMAKE_OPTIONS
|
||||
cmake .. $EVENT_CMAKE_OPTIONS || (rm -rf * && cmake .. $EVENT_CMAKE_OPTIONS)
|
||||
cmake --build .
|
||||
make
|
||||
make test
|
||||
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
mem_check:
|
||||
- ENABLE_VALGRIND
|
||||
- ENABLE_SANITIZERS
|
||||
- NONE_MEM_CHECK
|
||||
compiler:
|
||||
- GCC
|
||||
- CLANG
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: build and test
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ matrix.mem_check }}" == "ENABLE_VALGRIND" ]; then
|
||||
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=ON -DENABLE_SAFE_STACK=ON -DENABLE_SANITIZERS=OFF"
|
||||
elif [ "${{ matrix.mem_check }}" == "ENABLE_SANITIZERS" ]; then
|
||||
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=OFF -DENABLE_SAFE_STACK=OFF -DENABLE_SANITIZERS=ON"
|
||||
else
|
||||
EVENT_CMAKE_OPTIONS="-DENABLE_CJSON_UTILS=ON -DENABLE_VALGRIND=OFF -DENABLE_SAFE_STACK=OFF -DENABLE_SANITIZERS=OFF"
|
||||
fi
|
||||
if [ "${{ matrix.compiler }}" == "GCC" ]; then
|
||||
export CC=gcc
|
||||
else
|
||||
export CC=clang
|
||||
fi
|
||||
#run build and test
|
||||
JOBS=20
|
||||
export CTEST_PARALLEL_LEVEL=$JOBS
|
||||
export CTEST_OUTPUT_ON_FAILURE=1
|
||||
mkdir -p build
|
||||
cd build
|
||||
echo [cmake]: cmake .. $EVENT_CMAKE_OPTIONS
|
||||
cmake .. $EVENT_CMAKE_OPTIONS || (rm -rf * && cmake .. $EVENT_CMAKE_OPTIONS)
|
||||
cmake --build .
|
||||
make
|
||||
make test
|
||||
@@ -1,20 +0,0 @@
|
||||
.svn
|
||||
test
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
*.swp
|
||||
*.patch
|
||||
tags
|
||||
*.dylib
|
||||
build/
|
||||
cJSON_test
|
||||
cJSON_test_utils
|
||||
libcjson.so.*
|
||||
libcjson_utils.so.*
|
||||
*.orig
|
||||
.vscode
|
||||
.idea
|
||||
cmake-build-debug
|
||||
*.lst
|
||||
*.lss
|
||||
@@ -1,28 +0,0 @@
|
||||
dist: trusty
|
||||
sudo: false
|
||||
language: c
|
||||
env:
|
||||
matrix:
|
||||
- VALGRIND=On SANITIZERS=Off
|
||||
- VALGRIND=Off SANITIZERS=Off
|
||||
- VALGRIND=Off SANITIZERS=On
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- valgrind
|
||||
- libasan0
|
||||
- lib32asan0
|
||||
# currently not supported on travis:
|
||||
# - libasan1
|
||||
# - libasan2
|
||||
# - libubsan0
|
||||
- llvm
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake .. -DENABLE_CJSON_UTILS=On -DENABLE_VALGRIND="${VALGRIND}" -DENABLE_SAFE_STACK="${VALGRIND}" -DENABLE_SANITIZERS="${SANITIZERS}"
|
||||
- make
|
||||
- make test CTEST_OUTPUT_ON_FAILURE=On
|
||||
@@ -1 +0,0 @@
|
||||
afl-build
|
||||
@@ -1,10 +0,0 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
@@ -1,4 +0,0 @@
|
||||
*~
|
||||
\#*
|
||||
!.editorconfig
|
||||
!.gitignore
|
||||
@@ -1,30 +0,0 @@
|
||||
* text=auto
|
||||
|
||||
# These files are text and should be normalized (convert crlf to lf)
|
||||
*.rb text
|
||||
*.test text
|
||||
*.c text
|
||||
*.cpp text
|
||||
*.h text
|
||||
*.txt text
|
||||
*.yml text
|
||||
*.s79 text
|
||||
*.bat text
|
||||
*.xcl text
|
||||
*.inc text
|
||||
*.info text
|
||||
*.md text
|
||||
makefile text
|
||||
rakefile text
|
||||
|
||||
|
||||
#These files are binary and should not be normalized
|
||||
*.doc binary
|
||||
*.odt binary
|
||||
*.pdf binary
|
||||
*.ewd binary
|
||||
*.eww binary
|
||||
*.dni binary
|
||||
*.wsdt binary
|
||||
*.dbgdt binary
|
||||
*.mac binary
|
||||
@@ -1,9 +0,0 @@
|
||||
build/
|
||||
test/sandbox
|
||||
.DS_Store
|
||||
examples/example_1/test1.exe
|
||||
examples/example_1/test2.exe
|
||||
examples/example_2/all_tests.exe
|
||||
examples/example_1/test1.out
|
||||
examples/example_1/test2.out
|
||||
examples/example_2/all_tests.out
|
||||
@@ -1,29 +0,0 @@
|
||||
language: c
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
compiler: clang
|
||||
osx_image: xcode7.3
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: gcc
|
||||
|
||||
before_install:
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then rvm install 2.1 && rvm use 2.1 && ruby -v; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install --assume-yes --quiet gcc-multilib; fi
|
||||
install:
|
||||
- gem install rspec
|
||||
- gem install rubocop
|
||||
script:
|
||||
- cd test && rake ci
|
||||
- make -s
|
||||
- make -s DEBUG=-m32 #32-bit architecture with 64-bit support
|
||||
- make -s DEBUG=-m32 UNITY_SUPPORT_64= #32-bit build without 64-bit types
|
||||
- make -s UNITY_INCLUDE_DOUBLE= # without double
|
||||
- cd ../extras/fixture/test && rake ci
|
||||
- make -s default noStdlibMalloc
|
||||
- make -s C89
|
||||
- cd ../../../examples/example_1 && make -s ci
|
||||
- cd ../example_2 && make -s ci
|
||||
- cd ../example_3 && rake
|
||||
@@ -1,10 +0,0 @@
|
||||
.gitignore export-ignore
|
||||
.gitattributes export-ignore
|
||||
|
||||
update_version export-ignore
|
||||
|
||||
*.bat eol=crlf
|
||||
*.sln eol=crlf
|
||||
*.vcxproj eol=crlf
|
||||
*.vcxproj.filters eol=crlf
|
||||
common.props eol=crlf
|
||||
@@ -1,90 +0,0 @@
|
||||
Doxyfile
|
||||
Makefile
|
||||
Makefile.in
|
||||
TAGS
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
*.kdevelop.pcs
|
||||
*.kdevses
|
||||
compile
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
INSTALL
|
||||
install-sh
|
||||
.deps
|
||||
.libs
|
||||
.dirstamp
|
||||
*.a
|
||||
*.exe
|
||||
*.la
|
||||
*-gnu.S
|
||||
testcelt
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
m4/libtool.m4
|
||||
m4/ltoptions.m4
|
||||
m4/ltsugar.m4
|
||||
m4/ltversion.m4
|
||||
m4/lt~obsolete.m4
|
||||
opus_compare
|
||||
opus_demo
|
||||
repacketizer_demo
|
||||
stamp-h1
|
||||
test-driver
|
||||
trivial_example
|
||||
*.sw*
|
||||
*.o
|
||||
*.lo
|
||||
*.pc
|
||||
*.tar.gz
|
||||
*~
|
||||
tests/*test
|
||||
tests/test_opus_api
|
||||
tests/test_opus_decode
|
||||
tests/test_opus_encode
|
||||
tests/test_opus_padding
|
||||
tests/test_opus_projection
|
||||
celt/arm/armopts.s
|
||||
celt/dump_modes/dump_modes
|
||||
celt/tests/test_unit_cwrs32
|
||||
celt/tests/test_unit_dft
|
||||
celt/tests/test_unit_entropy
|
||||
celt/tests/test_unit_laplace
|
||||
celt/tests/test_unit_mathops
|
||||
celt/tests/test_unit_mdct
|
||||
celt/tests/test_unit_rotation
|
||||
celt/tests/test_unit_types
|
||||
doc/doxygen_sqlite3.db
|
||||
doc/doxygen-build.stamp
|
||||
doc/html
|
||||
doc/latex
|
||||
doc/man
|
||||
package_version
|
||||
version.h
|
||||
celt/Debug
|
||||
celt/Release
|
||||
celt/x64
|
||||
silk/Debug
|
||||
silk/Release
|
||||
silk/x64
|
||||
silk/fixed/Debug
|
||||
silk/fixed/Release
|
||||
silk/fixed/x64
|
||||
silk/float/Debug
|
||||
silk/float/Release
|
||||
silk/float/x64
|
||||
silk/tests/test_unit_LPC_inv_pred_gain
|
||||
src/Debug
|
||||
src/Release
|
||||
src/x64
|
||||
/*[Bb]uild*/
|
||||
.vs/
|
||||
.vscode/
|
||||
CMakeSettings.json
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Creates and updates the package_version information used by configure.ac
|
||||
# (or other makefiles). When run inside a git repository it will use the
|
||||
# version information that can be queried from it unless AUTO_UPDATE is set
|
||||
# to 'no'. If no version is currently known it will be set to 'unknown'.
|
||||
#
|
||||
# If called with the argument 'release', the PACKAGE_VERSION will be updated
|
||||
# even if AUTO_UPDATE=no, but the value of AUTO_UPDATE shall be preserved.
|
||||
# This is used to force a version update whenever `make dist` is run.
|
||||
#
|
||||
# The exit status is 1 if package_version is not modified, else 0 is returned.
|
||||
#
|
||||
# This script should NOT be included in distributed tarballs, because if a
|
||||
# parent directory contains a git repository we do not want to accidentally
|
||||
# retrieve the version information from it instead. Tarballs should ship
|
||||
# with only the package_version file.
|
||||
#
|
||||
# Ron <ron@debian.org>, 2012.
|
||||
|
||||
SRCDIR=$(dirname $0)
|
||||
|
||||
if [ -e "$SRCDIR/package_version" ]; then
|
||||
. "$SRCDIR/package_version"
|
||||
fi
|
||||
|
||||
if [ "$AUTO_UPDATE" = no ]; then
|
||||
[ "$1" = release ] || exit 1
|
||||
else
|
||||
AUTO_UPDATE=yes
|
||||
fi
|
||||
|
||||
# We run `git status` before describe here to ensure that we don't get a false
|
||||
# -dirty from files that have been touched but are not actually altered in the
|
||||
# working dir.
|
||||
GIT_VERSION=$(cd "$SRCDIR" && git status > /dev/null 2>&1 \
|
||||
&& git describe --tags --match 'v*' --dirty 2> /dev/null)
|
||||
GIT_VERSION=${GIT_VERSION#v}
|
||||
|
||||
if [ -n "$GIT_VERSION" ]; then
|
||||
|
||||
[ "$GIT_VERSION" != "$PACKAGE_VERSION" ] || exit 1
|
||||
PACKAGE_VERSION="$GIT_VERSION"
|
||||
|
||||
elif [ -z "$PACKAGE_VERSION" ]; then
|
||||
# No current package_version and no git ...
|
||||
# We really shouldn't ever get here, because this script should only be
|
||||
# included in the git repository, and should usually be export-ignored.
|
||||
PACKAGE_VERSION="unknown"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat > "$SRCDIR/package_version" <<-EOF
|
||||
# Automatically generated by update_version.
|
||||
# This file may be sourced into a shell script or makefile.
|
||||
|
||||
# Set this to 'no' if you do not wish the version information
|
||||
# to be checked and updated for every build. Most people will
|
||||
# never want to change this, it is an option for developers
|
||||
# making frequent changes that they know will not be released.
|
||||
AUTO_UPDATE=$AUTO_UPDATE
|
||||
|
||||
PACKAGE_VERSION="$PACKAGE_VERSION"
|
||||
EOF
|
||||
@@ -1,26 +0,0 @@
|
||||
# Visual Studio ignores
|
||||
[Dd]ebug/
|
||||
[Dd]ebugDLL/
|
||||
[Dd]ebugDLL_fixed/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleaseDLL/
|
||||
[Rr]eleaseDLL_fixed/
|
||||
[Rr]eleases/
|
||||
*.manifest
|
||||
*.lastbuildstate
|
||||
*.lib
|
||||
*.log
|
||||
*.idb
|
||||
*.ipdb
|
||||
*.ilk
|
||||
*.iobj
|
||||
*.obj
|
||||
*.opensdf
|
||||
*.pdb
|
||||
*.sdf
|
||||
*.suo
|
||||
*.tlog
|
||||
*.vcxproj.user
|
||||
*.vc.db
|
||||
*.vc.opendb
|
||||
Reference in New Issue
Block a user