|
Last change
on this file since cd1e3fc0 was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago |
|
Replace some license headers with SPDX identifier
Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.
|
-
Property mode
set to
100644
|
|
File size:
884 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * SPDX-FileCopyrightText: 2012 Adam Hraska
|
|---|
| 3 | *
|
|---|
| 4 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #ifndef DOUBLE_TO_STR_H_
|
|---|
| 8 | #define DOUBLE_TO_STR_H_
|
|---|
| 9 |
|
|---|
| 10 | #include <stddef.h>
|
|---|
| 11 |
|
|---|
| 12 | /** Maximum number of digits double_to_*_str conversion functions produce.
|
|---|
| 13 | *
|
|---|
| 14 | * Both double_to_short_str and double_to_fixed_str generate digits out
|
|---|
| 15 | * of a 64bit unsigned int number representation. The max number of
|
|---|
| 16 | * of digits is therefore 20. Add 1 to help users who forget to reserve
|
|---|
| 17 | * space for a null terminator.
|
|---|
| 18 | */
|
|---|
| 19 | #define MAX_DOUBLE_STR_LEN (20 + 1)
|
|---|
| 20 |
|
|---|
| 21 | /** Maximum buffer size needed to store the output of double_to_*_str
|
|---|
| 22 | * functions.
|
|---|
| 23 | */
|
|---|
| 24 | #define MAX_DOUBLE_STR_BUF_SIZE 21
|
|---|
| 25 |
|
|---|
| 26 | /* Fwd decl. */
|
|---|
| 27 | struct ieee_double_t_tag;
|
|---|
| 28 |
|
|---|
| 29 | extern int double_to_short_str(struct ieee_double_t_tag, char *, size_t, int *);
|
|---|
| 30 | extern int double_to_fixed_str(struct ieee_double_t_tag, int, int, char *,
|
|---|
| 31 | size_t, int *);
|
|---|
| 32 |
|
|---|
| 33 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.