code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
/** * Copyright (c) 2013 - 2017, Nordic Semiconductor ASA * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright...
YifuLiu/AliOS-Things
components/genie_service/utility/crc/crc16.c
C
apache-2.0
3,189
/** * Copyright (c) 2013 - 2017, Nordic Semiconductor ASA * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright...
YifuLiu/AliOS-Things
components/genie_service/utility/crc/crc16.h
C
apache-2.0
3,892
/** * Copyright (c) 2013 - 2017, Nordic Semiconductor ASA * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright...
YifuLiu/AliOS-Things
components/genie_service/utility/crc/crc32.c
C
apache-2.0
2,637
/** * Copyright (c) 2015 - 2017, Nordic Semiconductor ASA * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright...
YifuLiu/AliOS-Things
components/genie_service/utility/crc/crc32.h
C
apache-2.0
3,112
src = Split(''' crc16.c crc32.c ''') component = aos_component('crc', src) component.add_global_includes('include')
YifuLiu/AliOS-Things
components/genie_service/utility/crc/ucube.py
Python
apache-2.0
130
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include "httpclient.h" #if AOS_COMP_CLI #include "aos/cli.h" #endif #include <string.h> #include <stdio.h> /* @brief http request buffer */ #define REQ_BUF_SIZE 2048 static char req_buf[REQ_BUF_SIZE]; /* @brief http response buffer */ #define RSP_BUF_S...
YifuLiu/AliOS-Things
components/http/example/http_example.c
C
apache-2.0
1,386
/** * @file httpclient.h * http API header file. * * @version V1.0 * @date 2019-12-24 * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifndef HTTPCLIENT_H #define HTTPCLIENT_H #ifdef __cplusplus extern "C" { #endif #include <stdbool.h> #include <stdint.h> /** @defgroup aos_httpclient_api ht...
YifuLiu/AliOS-Things
components/http/include/httpclient.h
C
apache-2.0
11,145
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifndef HTTP_FORM_DATA #define HTTP_FORM_DATA #define HTTP_DATA_SIZE 1500 #define FORM_DATA_MAXLEN 32 #define CLIENT_FORM_DATA_NUM 1 typedef struct formdata_node_t formdata_node_t; struct formdata_node_t { formdata_node_t *next; int is_file...
YifuLiu/AliOS-Things
components/http/internal/http_form_data.h
C
apache-2.0
762
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifndef HTTP_OPTS_H #define HTTP_OPTS_H #ifndef HTTPCLIENT_AUTHB_SIZE #define HTTPCLIENT_AUTHB_SIZE 128 #endif #ifndef HTTPCLIENT_CHUNK_SIZE #define HTTPCLIENT_CHUNK_SIZE (2048) // 1024 #endif #ifndef HTTPCLIENT_SEND_BUF_SIZE #define HTTPCLIENT...
YifuLiu/AliOS-Things
components/http/internal/http_opts.h
C
apache-2.0
728
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifndef HTTP_CLIENT_WRAPPER_H #define HTTP_CLIENT_WRAPPER_H #define HTTP_CLIENT_DEBUG 0 #define HAL_Printf printf #if HTTP_CLIENT_DEBUG #define http_info(fmt, arg...) do { HAL_Printf("[%s %d] "fmt" \r\n", __func__, __LINE__, ##arg); } while (0) #defi...
YifuLiu/AliOS-Things
components/http/internal/http_wrappers.h
C
apache-2.0
1,512
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <stdio.h> #include <string.h> #include <sys/time.h> #include <unistd.h> #include "httpclient.h" #include "http_opts.h" #include "http_wrappers.h" #include <netdb.h> #include <sys/socket.h> #if CONFIG_HTTP_SECURE #include "mbedtls/net.h" #includ...
YifuLiu/AliOS-Things
components/http/src/http_aos_wrapper.c
C
apache-2.0
14,477
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "httpclient.h" #include "http_wrappers.h" #include "http_form_data.h" #include "http_opts.h" /* base64 encode */ static void httpclient_base64enc(char *out, const char *in) { const ...
YifuLiu/AliOS-Things
components/http/src/http_client.c
C
apache-2.0
32,881
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include "httpclient.h" #include "http_form_data.h" #include "http_wrappers.h" static formdata_info_t formdata_info[CLIENT_FORM_DATA_NUM] = {0}; static void form_data_clear(f...
YifuLiu/AliOS-Things
components/http/src/http_formdata.c
C
apache-2.0
12,012
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdlib.h> #include "httpclient.h" #include "http_wrappers.h" #include "http_form_data.h" static HTTPC_RESULT httpclient_common(httpclient_t *client, const char *url, int method, httpclient_data_t *client_data) { HTTPC_RE...
YifuLiu/AliOS-Things
components/http/src/http_method_api.c
C
apache-2.0
2,954
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <fcntl.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #if(CONFIG_AOS_LWIP > 0) #include <sys/socket.h> #endif #include "aos/init.h" #if(AOS_COMP_CLI > 0) #include "aos/cli.h" #endif #includ...
YifuLiu/AliOS-Things
components/init/aos_init.c
C
apache-2.0
8,728
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef AOS_INIT_H #define AOS_INIT_H #include <stdbool.h> /** @defgroup init_aos_api init * @{ */ /* aos_component_init初始化参数 */ typedef struct { int argc; /**< 参数个数 */ char **argv; /**< 参数内容 */ bool cli_enable; /**< cli是否初始化生...
YifuLiu/AliOS-Things
components/init/include/aos/init.h
C
apache-2.0
2,367
set(CMAKE_HOST_SYSTEM "Linux-4.4.0-87-generic") set(CMAKE_HOST_SYSTEM_NAME "Linux") set(CMAKE_HOST_SYSTEM_VERSION "4.4.0-87-generic") set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") set(CMAKE_SYSTEM "Linux-4.4.0-87-generic") set(CMAKE_SYSTEM_NAME "Linux") set(CMAKE_SYSTEM_VERSION "4.4.0-87-generic") set(CMAKE_SYSTEM_PROCE...
YifuLiu/AliOS-Things
components/jsoncpp/CMakeFiles/3.19.2/CMakeSystem.cmake
CMake
apache-2.0
398
/* This source file must have a .cpp extension so that all C++ compilers recognize the extension without flags. Borland does not know .cxx for example. */ #ifndef __cplusplus # error "A C compiler has been selected for C++." #endif /* Version number components: V=Version, R=Revision, P=Patch Version date c...
YifuLiu/AliOS-Things
components/jsoncpp/CMakeFiles/3.19.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
C++
apache-2.0
20,544
# vim: et ts=4 sts=4 sw=4 tw=0 # ==== Define cmake build policies that affect compilation and linkage default behaviors # # Set the JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION string to the newest cmake version # policies that provide successful builds. By setting JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION # to a value g...
YifuLiu/AliOS-Things
components/jsoncpp/CMakeLists.txt
CMake
apache-2.0
8,016
## This file should be placed in the root directory of your project. ## Then modify the CMakeLists.txt file in the root directory of your ## project to incorporate the testing dashboard. ## ## # The following are required to submit to the CDash dashboard: ## ENABLE_TESTING() ## INCLUDE(CTest) set(CTEST_PROJECT_NAM...
YifuLiu/AliOS-Things
components/jsoncpp/CTestConfig.cmake
CMake
apache-2.0
533
# This module provides a function for joining paths # known from most languages # # SPDX-License-Identifier: (MIT OR CC0-1.0) # Copyright 2020 Jan Tojnar # https://github.com/jtojnar/cmake-snips # # Modelled after Python’s os.path.join # https://docs.python.org/3.7/library/os.path.html#os.path.join # Windows not suppor...
YifuLiu/AliOS-Things
components/jsoncpp/cmake/JoinPaths.cmake
CMake
apache-2.0
819
# This is only for jsoncpp developers/contributors. # We use this to sign releases, generate documentation, etc. VER?=$(shell cat version.txt) default: @echo "VER=${VER}" sign: jsoncpp-${VER}.tar.gz gpg --armor --detach-sign $< gpg --verify $<.asc # Then upload .asc to the release. jsoncpp-%.tar.gz: curl https://...
YifuLiu/AliOS-Things
components/jsoncpp/dev.makefile
Makefile
apache-2.0
1,076
<!-- HTML footer for doxygen 1.8.13--> <!-- start footer part --> <!--BEGIN GENERATE_TREEVIEW--> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> $navpath <li class="footer">$generatedby <a href="http://www.doxygen.org/index.html"> <img class="footer" src="$relpath^...
YifuLiu/AliOS-Things
components/jsoncpp/doc/footer.html
HTML
apache-2.0
716
<!-- HTML header for doxygen 1.8.13--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" cont...
YifuLiu/AliOS-Things
components/jsoncpp/doc/header.html
HTML
apache-2.0
1,975
#vim: et ts =4 sts = 4 sw = 4 tw = 0 set(EXAMPLES readFromString readFromStream stringWrite streamWrite ) add_definitions(-D_GLIBCXX_USE_CXX11_ABI) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") add_compile_options(-Wall -Wextra) elseif(CMAKE_CXX_COMPILER_ID STRE...
YifuLiu/AliOS-Things
components/jsoncpp/example/CMakeLists.txt
CMake
apache-2.0
788
#include "json/json.h" #include <fstream> #include <iostream> #if AOS_COMP_CLI #include "aos/cli.h" #endif /** \brief Parse from stream, collect comments and capture error info. * Example Usage: * $g++ readFromStream.cpp -ljsoncpp -std=c++11 -o readFromStream * $./readFromStream * // comment head * { * // comm...
YifuLiu/AliOS-Things
components/jsoncpp/example/jsoncpp_comp_example.cpp
C++
apache-2.0
4,168
#include "json/json.h" #include <fstream> #include <iostream> /** \brief Parse from stream, collect comments and capture error info. * Example Usage: * $g++ readFromStream.cpp -ljsoncpp -std=c++11 -o readFromStream * $./readFromStream * // comment head * { * // comment before * "key" : "value" * } * // c...
YifuLiu/AliOS-Things
components/jsoncpp/example/readFromStream/readFromStream.cpp
C++
apache-2.0
727
#include "json/json.h" #include <iostream> /** * \brief Parse a raw string into Value object using the CharReaderBuilder * class, or the legacy Reader class. * Example Usage: * $g++ readFromString.cpp -ljsoncpp -std=c++11 -o readFromString * $./readFromString * colin * 20 */ int main() { const std::string raw...
YifuLiu/AliOS-Things
components/jsoncpp/example/readFromString/readFromString.cpp
C++
apache-2.0
1,094
#include "json/json.h" #include <iostream> /** \brief Write the Value object to a stream. * Example Usage: * $g++ streamWrite.cpp -ljsoncpp -std=c++11 -o streamWrite * $./streamWrite * { * "Age" : 20, * "Name" : "robin" * } */ int main() { Json::Value root; Json::StreamWriterBuilder builder; const...
YifuLiu/AliOS-Things
components/jsoncpp/example/streamWrite/streamWrite.cpp
C++
apache-2.0
500
#include "json/json.h" #include <iostream> /** \brief Write a Value object to a string. * Example Usage: * $g++ stringWrite.cpp -ljsoncpp -std=c++11 -o stringWrite * $./stringWrite * { * "action" : "run", * "data" : * { * "number" : 1 * } * } */ int main() { Json::Value root; Json...
YifuLiu/AliOS-Things
components/jsoncpp/example/stringWrite/stringWrite.cpp
C++
apache-2.0
785
file(GLOB INCLUDE_FILES "json/*.h") install(FILES ${INCLUDE_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/json)
YifuLiu/AliOS-Things
components/jsoncpp/include/CMakeLists.txt
CMake
apache-2.0
122
string(TOLOWER "${CMAKE_INSTALL_PREFIX}" _PREFIX) string(TOLOWER "${ITK_BINARY_DIR}" _BUILD) if("${_PREFIX}" STREQUAL "${_BUILD}") message(FATAL_ERROR "The current CMAKE_INSTALL_PREFIX points at the build tree:\n" " ${CMAKE_INSTALL_PREFIX}\n" "This is not supported." ) endif()
YifuLiu/AliOS-Things
components/jsoncpp/include/PreventInBuildInstalls.cmake
CMake
apache-2.0
297
# # This function will prevent in-source builds function(AssureOutOfSourceBuilds) # make sure the user doesn't play dirty with symlinks get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH) get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH) # disallow in-source builds if("${srcdir}" STREQU...
YifuLiu/AliOS-Things
components/jsoncpp/include/PreventInSourceBuilds.cmake
CMake
apache-2.0
1,913
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_ALLOCATOR_H_INCLUDED #define JSON_ALLOCATOR_H_INCLUDED #...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/allocator.h
C++
apache-2.0
2,447
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_ASSERTIONS_H_INCLUDED #define JSON_ASSERTIONS_H_INCLUDED ...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/assertions.h
C
apache-2.0
2,817
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_CONFIG_H_INCLUDED #define JSON_CONFIG_H_INCLUDED #include...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/config.h
C++
apache-2.0
5,272
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_FORWARDS_H_INCLUDED #define JSON_FORWARDS_H_INCLUDED #if...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/forwards.h
C++
apache-2.0
917
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_JSON_H_INCLUDED #define JSON_JSON_H_INCLUDED #include "c...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/json.h
C
apache-2.0
447
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_FEATURES_H_INCLUDED #define JSON_FEATURES_H_INCLUDED #if...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/json_features.h
C++
apache-2.0
1,793
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_READER_H_INCLUDED #define JSON_READER_H_INCLUDED #if !de...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/reader.h
C++
apache-2.0
14,110
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_H_INCLUDED #define JSON_H_INCLUDED #if !defined(JSON_IS_...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/value.h
C++
apache-2.0
30,234
#ifndef JSON_VERSION_H_INCLUDED #define JSON_VERSION_H_INCLUDED // Note: version must be updated in three places when doing a release. This // annoying process ensures that amalgamate, CMake, and meson all report the // correct version. // 1. /meson.build // 2. /include/json/version.h // 3. /CMakeLists.txt // IMPORTAN...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/version.h
C
apache-2.0
966
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_WRITER_H_INCLUDED #define JSON_WRITER_H_INCLUDED #if !de...
YifuLiu/AliOS-Things
components/jsoncpp/include/json/writer.h
C++
apache-2.0
12,202
project( 'jsoncpp', 'cpp', # Note: version must be updated in three places when doing a release. This # annoying process ensures that amalgamate, CMake, and meson all report the # correct version. # 1. /meson.build # 2. /include/json/version.h # 3. /CMakeLists.txt # IMPORTANT: also update the SOVERSI...
YifuLiu/AliOS-Things
components/jsoncpp/meson.build
Meson
apache-2.0
3,049
option( 'tests', type : 'boolean', value : true, description : 'Enable building tests')
YifuLiu/AliOS-Things
components/jsoncpp/meson_options.txt
Meson
apache-2.0
96
find src -name '*.cpp' -or -name '*.h' | xargs clang-format -i
YifuLiu/AliOS-Things
components/jsoncpp/reformat.sh
Shell
apache-2.0
63
add_subdirectory(lib_json) if(JSONCPP_WITH_TESTS) add_subdirectory(jsontestrunner) add_subdirectory(test_lib_json) endif()
YifuLiu/AliOS-Things
components/jsoncpp/src/CMakeLists.txt
CMake
apache-2.0
131
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0) # The new Python3 module is much more robust than the previous PythonInterp find_package(Python3 COMPONENTS Interpreter) # Set variables for backwards compatibility with cmake < 3.12.0 set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND}) set(PYTHON_EXEC...
YifuLiu/AliOS-Things
components/jsoncpp/src/jsontestrunner/CMakeLists.txt
CMake
apache-2.0
2,072
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnost...
YifuLiu/AliOS-Things
components/jsoncpp/src/jsontestrunner/main.cpp
C++
apache-2.0
10,862
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.1.2) #-Werror=* was introduced -after- GCC 4.1.2 add_compile_options("-Werror=strict-aliasing") endif() include(CheckIncludeFileCXX) include(CheckTypeSize) include(CheckStructHasMember) include(CheckCXXSymbolExists) check...
YifuLiu/AliOS-Things
components/jsoncpp/src/lib_json/CMakeLists.txt
CMake
apache-2.0
9,444
// Copyright 2007-2011 Baptiste Lepilleur and The JsonCpp Authors // Copyright (C) 2016 InfoTeCS JSC. All rights reserved. // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(...
YifuLiu/AliOS-Things
components/jsoncpp/src/lib_json/json_reader.cpp
C++
apache-2.0
58,050
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED #define LIB_JSONCPP_JSON_TOOL...
YifuLiu/AliOS-Things
components/jsoncpp/src/lib_json/json_tool.h
C++
apache-2.0
3,913
// Copyright 2011 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(JSON_IS_AMALGAMATION) #include <json/assertions.h> #include <j...
YifuLiu/AliOS-Things
components/jsoncpp/src/lib_json/json_value.cpp
C++
apache-2.0
48,209
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE // included by json_value.cpp namespace Json { // //////////////////...
YifuLiu/AliOS-Things
components/jsoncpp/src/lib_json/json_valueiterator.h
C++
apache-2.0
5,214
// Copyright 2011 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(JSON_IS_AMALGAMATION) #include "json_tool.h" #include <json/wr...
YifuLiu/AliOS-Things
components/jsoncpp/src/lib_json/json_writer.cpp
C++
apache-2.0
37,333
# vim: et ts=4 sts=4 sw=4 tw=0 add_executable(jsoncpp_test jsontest.cpp jsontest.h fuzz.cpp fuzz.h main.cpp ) if(BUILD_SHARED_LIBS) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0) add_compile_definitions( JSON_DLL ) else() add_definitions( -DJSON_DLL ) endif() targe...
YifuLiu/AliOS-Things
components/jsoncpp/src/test_lib_json/CMakeLists.txt
CMake
apache-2.0
1,163
// Copyright 2007-2019 The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #include "fuzz.h" #include <cstdint> #include <json/config.h> #include <json/json.h> #includ...
YifuLiu/AliOS-Things
components/jsoncpp/src/test_lib_json/fuzz.cpp
C++
apache-2.0
1,971
// Copyright 2007-2010 The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef FUZZ_H_INCLUDED #define FUZZ_H_INCLUDED #include <cstddef> #include <stdint.h> exte...
YifuLiu/AliOS-Things
components/jsoncpp/src/test_lib_json/fuzz.h
C
apache-2.0
423
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #define _CRT_SECURE_NO_WARNINGS 1 // Prevents deprecation warning with...
YifuLiu/AliOS-Things
components/jsoncpp/src/test_lib_json/jsontest.cpp
C++
apache-2.0
12,268
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSONTEST_H_INCLUDED #define JSONTEST_H_INCLUDED #include <cst...
YifuLiu/AliOS-Things
components/jsoncpp/src/test_lib_json/jsontest.h
C++
apache-2.0
12,005
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnost...
YifuLiu/AliOS-Things
components/jsoncpp/src/test_lib_json/main.cpp
C++
apache-2.0
140,187
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include "aos/kv.h" #if AOS_COMP_CLI #include "aos/cli.h" #endif /* kv_init has been called in aos_components_init, but can called repeatedly. #ifdef AOS_COMP_KV kv_init(); #endif */ static void kv_comp_example(int argc, char **argv) { (void)arg...
YifuLiu/AliOS-Things
components/kv/example/kv_example.c
C
apache-2.0
1,297
/* * Copyright (C) 2017-2021 Alibaba Group Holding Limited */ #ifndef AOS_KV_H #define AOS_KV_H #include <aos/kernel.h> #include <string.h> #ifdef __cplusplus extern "C" { #endif /** @defgroup kv_aos_api kv * @{ */ /** * Init the kv module. * * @retrun 0 on success, otherwise will be failed. */ int aos_kv_...
YifuLiu/AliOS-Things
components/kv/include/aos/kv.h
C
apache-2.0
2,833
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef KV_API_H #define KV_API_H #ifdef __cplusplus extern "C" { #endif #include <stdint.h> /* Key-value function return code description */ #define KV_OK 0 /* Successed */ #define KV_LOOP_CONTINUE 10000 /* Loop Continue */ #d...
YifuLiu/AliOS-Things
components/kv/include/kv_api.h
C
apache-2.0
3,648
/** * @file kv.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef AOS_KV_H #define AOS_KV_H #ifdef __cplusplus extern "C" { #endif #include <kv_api.h> /** @addtogroup aos_kv KV * KV AOS API: Data storing service based on key-value paring. * * @{ */ /** * Init the kv module. ...
YifuLiu/AliOS-Things
components/kv/internal/kv.h
C
apache-2.0
2,903
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef KV_ADAPT_H #define KV_ADAPT_H #ifdef __cplusplus extern "C" { #endif /** * @brief Read KV flash partition * * @param[in] offset the offset of the partition * @param[out] buf the store buffer for read * @param[in] nbytes the length t...
YifuLiu/AliOS-Things
components/kv/internal/kv_adapt.h
C
apache-2.0
4,154
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef KV_CONF_H #define KV_CONF_H /* The totally storage size for key-value store */ #ifndef KV_CONFIG_TOTAL_SIZE #define KV_TOTAL_SIZE (8 * 1024) #else #define KV_TOTAL_SIZE KV_CONFIG_TOTAL_SIZE #endif /* The physical parition for key-value store */ ...
YifuLiu/AliOS-Things
components/kv/internal/kv_conf.h
C
apache-2.0
1,631
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef KV_TYPES_H #define KV_TYPES_H #include <stdint.h> #include <stdlib.h> #include <stddef.h> #include <string.h> #include "kv_conf.h" #if (KV_BLOCK_SIZE_BITS >= 16) || (KV_TOTAL_SIZE >= 0x10000) typedef uint32_t kv_size_t; /* If more than 64KB */ ...
YifuLiu/AliOS-Things
components/kv/internal/kv_types.h
C
apache-2.0
5,112
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdint.h> #include "kv.h" #include "kv_conf.h" #include "kv_adapt.h" #include "kv_types.h" static kv_mgr_t g_kv_mgr; static void kv_gc_task(void *arg); kv_item_t *kv_item_traverse(item_func func, uint8_t blk_idx, const char *key); /*******...
YifuLiu/AliOS-Things
components/kv/src/kv.c
C
apache-2.0
26,301
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <unistd.h> #include <stdio.h> #include "k_api.h" #include "kv_conf.h" #include "kv_adapt.h" #include <aos/flashpart.h> #include <aos/hal/flash.h> static aos_flashpart_ref_t kv_flashpart_ref = AOS_DEV_REF_INIT_VAL; static aos_status_t kv_flash_op...
YifuLiu/AliOS-Things
components/kv/src/kv_adapt.c
C
apache-2.0
3,172
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <fcntl.h> #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <sys/ioctl.h> #include "kv_conf.h" #include "kv_adapt.h" #include "aos/kernel.h" #include "aos_hal_flash.h" static aos_task_t kv_task; int32_t kv_start_task(const ch...
YifuLiu/AliOS-Things
components/kv/src/kv_adapt_aos.c
C
apache-2.0
1,857
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdint.h> #include "kv.h" #include "aos/errno.h" static int _kv_to_aos_res(int res) { switch (res) { case KV_OK: return 0; case KV_ERR_NO_SPACE: return -ENOSPC; case KV_ERR_INVALID_PARAM: ...
YifuLiu/AliOS-Things
components/kv/src/kv_aos.c
C
apache-2.0
1,591
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #if AOS_COMP_CLI #include <stdint.h> #include "kv.h" #include "kv_adapt.h" #include "kv_types.h" #include "aos/cli.h" extern kv_item_t *kv_item_traverse(item_func func, uint8_t blk_idx, const char *key); extern int32_t cli_printf(const char *fmt, ...); s...
YifuLiu/AliOS-Things
components/kv/src/kv_cli.c
C
apache-2.0
3,829
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include "kv_conf.h" #if (KV_SECURE_SUPPORT) #include <stdint.h> #include <string.h> #include "aos/kv.h" #include "kv_adapt.h" #if (KV_SECURE_CRYPT_IMPL == 1) #include "mbedtls/aes.h" #define OFB_KEY_LEN 32 #define OFB_IV_LEN 16 static mbedtls_ae...
YifuLiu/AliOS-Things
components/kv/src/kv_secure.c
C
apache-2.0
2,246
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <string.h> #include <stdio.h> #include <sys/time.h> #include "k_config.h" #include "aos/kernel.h" #include "aos/hal/uart.h" volatile int errno = 0; extern uart_dev_t uart_0; #if defined (__CC_ARM) && defined(__MICROLIB) void __aeabi_assert(con...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/armcc_libc.c
C
apache-2.0
2,474
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <string.h> #include <stdio.h> #include <sys/time.h> #include "k_config.h" #include <aos/hal/uart.h> #include <umm.h> #if defined (__CC_ARM) #pragma weak __aeabi_assert void __aeabi_assert(const char *expr, const char *file, int line) { whil...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/armcc_libc_uspace.c
C
apache-2.0
2,155
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include "sys/fcntl.h"
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/fcntl.h
C
apache-2.0
88
#include "aos/compiler.h" #define adc_dev_t void #define pwm_dev_t void #define rtc_dev_t void #define rtc_time_t void #define wdg_dev_t void WEAK int hal_adc_finalize(adc_dev_t *adc) { return 0; } WEAK int hal_adc_init(adc_dev_t *adc) { return 0; } WEAK int hal_adc_value_get(adc_dev_t *adc, unsigned int *outp...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/hal_stub.c
C
apache-2.0
1,024
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_ERRNO_H__ #define _SYS_ERRNO_H__ #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted syste...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/sys/errno_bak.h
C
apache-2.0
8,446
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef LIBC_FCNTL_H__ #define LIBC_FCNTL_H__ #define O_RDONLY 00 #define O_WRONLY 01 #define O_RDWR 02 #define O_CREAT 0100 #define O_EXCL 0200 #define O_NOCTTY 0400 #define O_TRUNC 01000 #define O_A...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/sys/fcntl.h
C
apache-2.0
1,160
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_SELECT_H__ #define _SYS_SELECT_H__ #ifndef FD_SETSIZE #define FD_SETSIZE 256 #endif #define NBBY 8 /* number of bits in a byte */ typedef long fd_mask; #define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ #ifndef howmany #define ...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/sys/select.h
C
apache-2.0
875
#ifndef _SIGNAL_H_ #define _SIGNAL_H_ #define SIGALRM 14 #endif // eof
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/sys/signal.h
C
apache-2.0
75
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_STAT_H__ #define _SYS_STAT_H__ #define S_IFMT 00170000 #define S_IFSOCK 0140000 #define S_IFLNK 0120000 #define S_IFREG 0100000 #define S_IFBLK 0060000 #define S_IFDIR ...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/sys/stat.h
C
apache-2.0
1,551
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_TIME_H_ #define _SYS_TIME_H_ #include <time.h> #include <sys/types.h> #ifdef __cplusplus extern "C" { #endif #ifndef _TIMEVAL_DEFINED #define _TIMEVAL_DEFINED /* * Structure returned by gettimeofday(2) system call, * and used in other ca...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/sys/time.h
C
apache-2.0
956
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_TYPES_H #define _SYS_TYPES_H #include <stdint.h> typedef uint32_t clockid_t; typedef uint32_t key_t; /* Used for interprocess communication. */ typedef uint32_t pid_t; /* Used for process IDs and process group IDs. ...
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/sys/types.h
C
apache-2.0
595
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_UNISTD_H #define _SYS_UNISTD_H #endif /* _SYS_UNISTD_H */
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/sys/unistd.h
C
apache-2.0
138
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include "sys/unistd.h"
YifuLiu/AliOS-Things
components/libc_stub/compilers/armlibc/unistd.h
C
apache-2.0
89
/* * Copyright (C) 2019-2020 Alibaba Group Holding Limited */ #ifndef SYS_IOCTL_H #define SYS_IOCTL_H #ifdef __cplusplus extern "C" { #endif int ioctl(int fd, int req, ...); #ifdef __cplusplus } #endif #endif /* SYS_IOCTL_H */
YifuLiu/AliOS-Things
components/libc_stub/compilers/gcc/sys/ioctl.h
C
apache-2.0
234
/* * Copyright (C) 2020-2021 Alibaba Group Holding Limited * A modified version of termios in Haiku OS * Distributed under the terms of the MIT License. */ #ifndef SYS_TERMIOS_H #define SYS_TERMIOS_H #include <errno.h> #if (defined(AOS_KERNEL_BUILD) && defined(AOS_COMP_DEVFS)) || !defined(AOS_KERNEL_BUILD) #inclu...
YifuLiu/AliOS-Things
components/libc_stub/compilers/gcc/sys/termios.h
C
apache-2.0
12,827
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include "sys/fcntl.h"
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/fcntl.h
C
apache-2.0
88
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifdef __ICCARM__ #include <stdarg.h> #include <sys/types.h> #include <time.h> #include <stdio.h> #include <string.h> #include "aos/kernel.h" #include "aos/hal/uart.h" int errno; extern void *aos_malloc(unsigned int size); extern void aos_al...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/iar_libc.c
C
apache-2.0
2,666
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifdef __ICCARM__ #include <stdarg.h> #include <stdio.h> #include <string.h> #include "aos/kernel.h" #include "sys/types.h" #include "sys/time.h" #include "aos/hal/uart.h" #include "umm.h" int errno; extern long long aos_now_ms(void); __ATTRIBUTES vo...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/iar_libc_uspace.c
C
apache-2.0
2,142
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ /* This header file provides the reentrancy. */ /* The reentrant system calls here serve two purposes: 1) Provide reentrant versions of the system calls the ANSI C library requires. 2) Provide these system calls in a namespace clean way. ...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/reent.h
C
apache-2.0
4,748
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_ERRNO_H__ #define _SYS_ERRNO_H__ #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted syste...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/sys/errno.h
C
apache-2.0
8,447
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef LIBC_FCNTL_H__ #define LIBC_FCNTL_H__ #define O_RDONLY 00 #define O_WRONLY 01 #define O_RDWR 02 #define O_CREAT 0100 #define O_EXCL 0200 #define O_NOCTTY 0400 #define O_TRUNC 01000 #define O_A...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/sys/fcntl.h
C
apache-2.0
1,160
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ /* This header file provides the reentrancy. */ /* WARNING: All identifiers here must begin with an underscore. This file is included by stdio.h and others and we therefore must only use identifiers in the namespace allotted to us. */ #ifndef _...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/sys/reent.h
C
apache-2.0
784
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_SELECT_H__ #define _SYS_SELECT_H__ #ifndef FD_SETSIZE #define FD_SETSIZE 256 #endif #define NBBY 8 /* number of bits in a byte */ typedef long fd_mask; #define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ #ifndef howmany #define ...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/sys/select.h
C
apache-2.0
875
#ifndef _SIGNAL_H_ #define _SIGNAL_H_ #define SIGALRM 14 #endif // eof
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/sys/signal.h
C
apache-2.0
75
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_STAT_H__ #define _SYS_STAT_H__ #define S_IFMT 00170000 #define S_IFSOCK 0140000 #define S_IFLNK 0120000 #define S_IFREG 0100000 #define S_IFBLK 0060000 #define S_IFDIR ...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/sys/stat.h
C
apache-2.0
1,551
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef _SYS_TIME_H_ #define _SYS_TIME_H_ #include <time.h> #include <sys/types.h> #ifdef __cplusplus extern "C" { #endif #ifndef _TIMEVAL_DEFINED #define _TIMEVAL_DEFINED /* * Structure returned by gettimeofday(2) system call, * and used in other ca...
YifuLiu/AliOS-Things
components/libc_stub/compilers/iar/sys/time.h
C
apache-2.0
970