Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: hello_message_pack
fbuffer.h
00001 /* 00002 * MessagePack for C FILE* buffer adaptor 00003 * 00004 * Copyright (C) 2013 Vladimir Volodko 00005 * 00006 * Distributed under the Boost Software License, Version 1.0. 00007 * (See accompanying file LICENSE_1_0.txt or copy at 00008 * http://www.boost.org/LICENSE_1_0.txt) 00009 */ 00010 #ifndef MSGPACK_FBUFFER_H 00011 #define MSGPACK_FBUFFER_H 00012 00013 #include <stdio.h> 00014 00015 #ifdef __cplusplus 00016 extern "C" { 00017 #endif 00018 00019 00020 /** 00021 * @defgroup msgpack_fbuffer FILE* buffer 00022 * @ingroup msgpack_buffer 00023 * @{ 00024 */ 00025 00026 static inline int msgpack_fbuffer_write(void* data, const char* buf, size_t len) 00027 { 00028 return (1 == fwrite(buf, len, 1, (FILE *)data)) ? 0 : -1; 00029 } 00030 00031 /** @} */ 00032 00033 00034 #ifdef __cplusplus 00035 } 00036 #endif 00037 00038 #endif /* msgpack/fbuffer.h */
Generated on Tue Jul 12 2022 22:51:45 by
1.7.2