source: mainline/uspace/lib/c/include/double_to_str.h@ cd1e3fc0

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
RevLine 
[34b9299]1/*
[d7f7a4a]2 * SPDX-FileCopyrightText: 2012 Adam Hraska
[34b9299]3 *
[d7f7a4a]4 * SPDX-License-Identifier: BSD-3-Clause
[34b9299]5 */
[82d062d8]6
[34b9299]7#ifndef DOUBLE_TO_STR_H_
8#define DOUBLE_TO_STR_H_
9
[582a0b8]10#include <stddef.h>
[34b9299]11
[1b20da0]12/** Maximum number of digits double_to_*_str conversion functions produce.
[34b9299]13 *
14 * Both double_to_short_str and double_to_fixed_str generate digits out
[1b20da0]15 * of a 64bit unsigned int number representation. The max number of
[34b9299]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
[1b20da0]21/** Maximum buffer size needed to store the output of double_to_*_str
22 * functions.
[34b9299]23 */
24#define MAX_DOUBLE_STR_BUF_SIZE 21
25
[d1582b50]26/* Fwd decl. */
[34b9299]27struct ieee_double_t_tag;
28
[82d062d8]29extern int double_to_short_str(struct ieee_double_t_tag, char *, size_t, int *);
30extern int double_to_fixed_str(struct ieee_double_t_tag, int, int, char *,
31 size_t, int *);
[34b9299]32
[1b20da0]33#endif
Note: See TracBrowser for help on using the repository browser.