messagepack implementation for embedded systems (mbed / arduino)
Dependents: hello_message_pack
div_base.hpp
00001 # /* Copyright (C) 2001 00002 # * Housemarque Oy 00003 # * http://www.housemarque.com 00004 # * 00005 # * Distributed under the Boost Software License, Version 1.0. (See 00006 # * accompanying file LICENSE_1_0.txt or copy at 00007 # * http://www.boost.org/LICENSE_1_0.txt) 00008 # */ 00009 # 00010 # /* Revised by Paul Mensonides (2002) */ 00011 # 00012 # /* See http://www.boost.org for most recent version. */ 00013 # 00014 # ifndef MSGPACK_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP 00015 # define MSGPACK_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP 00016 # 00017 # include <msgpack/preprocessor/arithmetic/inc.hpp> 00018 # include <msgpack/preprocessor/arithmetic/sub.hpp> 00019 # include <msgpack/preprocessor/comparison/less_equal.hpp> 00020 # include <msgpack/preprocessor/config/config.hpp> 00021 # include <msgpack/preprocessor/control/while.hpp> 00022 # include <msgpack/preprocessor/tuple/elem.hpp> 00023 # include <msgpack/preprocessor/tuple/rem.hpp> 00024 # 00025 # /* MSGPACK_PP_DIV_BASE */ 00026 # 00027 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG() 00028 # define MSGPACK_PP_DIV_BASE(x, y) MSGPACK_PP_WHILE(MSGPACK_PP_DIV_BASE_P, MSGPACK_PP_DIV_BASE_O, (0, x, y)) 00029 # else 00030 # define MSGPACK_PP_DIV_BASE(x, y) MSGPACK_PP_DIV_BASE_I(x, y) 00031 # define MSGPACK_PP_DIV_BASE_I(x, y) MSGPACK_PP_WHILE(MSGPACK_PP_DIV_BASE_P, MSGPACK_PP_DIV_BASE_O, (0, x, y)) 00032 # endif 00033 # 00034 # if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT() 00035 # define MSGPACK_PP_DIV_BASE_P(d, rxy) MSGPACK_PP_DIV_BASE_P_IM(d, MSGPACK_PP_TUPLE_REM_3 rxy) 00036 # define MSGPACK_PP_DIV_BASE_P_IM(d, im) MSGPACK_PP_DIV_BASE_P_I(d, im) 00037 # else 00038 # define MSGPACK_PP_DIV_BASE_P(d, rxy) MSGPACK_PP_DIV_BASE_P_I(d, MSGPACK_PP_TUPLE_ELEM(3, 0, rxy), MSGPACK_PP_TUPLE_ELEM(3, 1, rxy), MSGPACK_PP_TUPLE_ELEM(3, 2, rxy)) 00039 # endif 00040 # 00041 # define MSGPACK_PP_DIV_BASE_P_I(d, r, x, y) MSGPACK_PP_LESS_EQUAL_D(d, y, x) 00042 # 00043 # if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT() 00044 # define MSGPACK_PP_DIV_BASE_O(d, rxy) MSGPACK_PP_DIV_BASE_O_IM(d, MSGPACK_PP_TUPLE_REM_3 rxy) 00045 # define MSGPACK_PP_DIV_BASE_O_IM(d, im) MSGPACK_PP_DIV_BASE_O_I(d, im) 00046 # else 00047 # define MSGPACK_PP_DIV_BASE_O(d, rxy) MSGPACK_PP_DIV_BASE_O_I(d, MSGPACK_PP_TUPLE_ELEM(3, 0, rxy), MSGPACK_PP_TUPLE_ELEM(3, 1, rxy), MSGPACK_PP_TUPLE_ELEM(3, 2, rxy)) 00048 # endif 00049 # 00050 # define MSGPACK_PP_DIV_BASE_O_I(d, r, x, y) (MSGPACK_PP_INC(r), MSGPACK_PP_SUB_D(d, x, y), y) 00051 # 00052 # /* MSGPACK_PP_DIV_BASE_D */ 00053 # 00054 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG() 00055 # define MSGPACK_PP_DIV_BASE_D(d, x, y) MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_DIV_BASE_P, MSGPACK_PP_DIV_BASE_O, (0, x, y)) 00056 # else 00057 # define MSGPACK_PP_DIV_BASE_D(d, x, y) MSGPACK_PP_DIV_BASE_D_I(d, x, y) 00058 # define MSGPACK_PP_DIV_BASE_D_I(d, x, y) MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_DIV_BASE_P, MSGPACK_PP_DIV_BASE_O, (0, x, y)) 00059 # endif 00060 # 00061 # endif
Generated on Tue Jul 12 2022 22:51:45 by 1.7.2