1
0
Fork 0

Merge pull request #34 from farrrb/inject-config-file

Added the possibility to inject a config file.
development
Marco Paland 7 years ago committed by GitHub
commit e7f6a916be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,10 +10,10 @@
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in // The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software. // all copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -32,29 +32,47 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include "printf.h" #include "printf.h"
// define this globally (e.g. gcc -DPRINTF_INCLUDE_CONFIG_H ...) to include the
// printf_config.h header file
#ifdef PRINTF_INCLUDE_CONFIG_H
#include "printf_config.h"
#endif
// ntoa conversion buffer size, this must be big enough to hold // 'ntoa' conversion buffer size, this must be big enough to hold one converted
// one converted numeric number including padded zeros (dynamically created on stack) // numeric number including padded zeros (dynamically created on stack)
// 32 byte is a good default // default: 32 byte
#define PRINTF_NTOA_BUFFER_SIZE 32U #ifndef PRINTF_NTOA_BUFFER_SIZE
#define PRINTF_NTOA_BUFFER_SIZE 32U
#endif
// ftoa conversion buffer size, this must be big enough to hold // 'ftoa' conversion buffer size, this must be big enough to hold one converted
// one converted float number including padded zeros (dynamically created on stack) // float number including padded zeros (dynamically created on stack)
// 32 byte is a good default // default: 32 byte
#define PRINTF_FTOA_BUFFER_SIZE 32U #ifndef PRINTF_FTOA_BUFFER_SIZE
#define PRINTF_FTOA_BUFFER_SIZE 32U
#endif
// define this to support floating point (%f) // support for the floating point type (%f)
#define PRINTF_SUPPORT_FLOAT // default: activated
#ifndef PRINTF_DISABLE_SUPPORT_FLOAT
#define PRINTF_SUPPORT_FLOAT
#endif
// define this to support long long types (%llu or %p) // support for the long long types (%llu or %p)
#define PRINTF_SUPPORT_LONG_LONG // default: activated
#ifndef PRINTF_DISABLE_SUPPORT_LONG_LONG
#define PRINTF_SUPPORT_LONG_LONG
#endif
// define this to support the ptrdiff_t type (%t) // support for the ptrdiff_t type (%t)
// ptrdiff_t is normally defined in <stddef.h> as long or long long type // ptrdiff_t is normally defined in <stddef.h> as long or long long type
#define PRINTF_SUPPORT_PTRDIFF_T // default: activated
#ifndef PRINTF_DISABLE_SUPPORT_PTRDIFF_T
#define PRINTF_SUPPORT_PTRDIFF_T
#endif
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

Loading…
Cancel
Save