]> git.ipfire.org Git - thirdparty/gcc.git/blame - libdecnumber/decPacked.h
[Ada] Small improvement to Expand_N_Unchecked_Type_Conversion
[thirdparty/gcc.git] / libdecnumber / decPacked.h
CommitLineData
2533577f 1/* Packed decimal conversion module header for the decNumber C Library.
8d9254fc 2 Copyright (C) 2007-2020 Free Software Foundation, Inc.
2533577f
JJ
3 Contributed by IBM Corporation. Author Mike Cowlishaw.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
748086b7 9 Software Foundation; either version 3, or (at your option) any later
2533577f
JJ
10 version.
11
2533577f
JJ
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16
748086b7
JJ
17Under Section 7 of GPL version 3, you are granted additional
18permissions described in the GCC Runtime Library Exception, version
193.1, as published by the Free Software Foundation.
20
21You should have received a copy of the GNU General Public License and
22a copy of the GCC Runtime Library Exception along with this program;
23see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24<http://www.gnu.org/licenses/>. */
2533577f
JJ
25
26/* ------------------------------------------------------------------ */
27/* Packed Decimal conversion module header */
28/* ------------------------------------------------------------------ */
29
30#if !defined(DECPACKED)
31 #define DECPACKED
32 #define DECPNAME "decPacked" /* Short name */
33 #define DECPFULLNAME "Packed Decimal conversions" /* Verbose name */
7bd36a9c 34 #define DECPAUTHOR "Mike Cowlishaw" /* Who to blame */
2533577f
JJ
35
36 #define DECPACKED_DefP 32 /* default precision */
37
38 #ifndef DECNUMDIGITS
39 #define DECNUMDIGITS DECPACKED_DefP /* size if not already defined*/
40 #endif
41 #include "decNumber.h" /* context and number library */
42
43 /* Sign nibble constants */
44 #if !defined(DECPPLUSALT)
7bd36a9c
BE
45 #define DECPPLUSALT 0x0A /* alternate plus nibble */
46 #define DECPMINUSALT 0x0B /* alternate minus nibble */
47 #define DECPPLUS 0x0C /* preferred plus nibble */
48 #define DECPMINUS 0x0D /* preferred minus nibble */
49 #define DECPPLUSALT2 0x0E /* alternate plus nibble */
50 #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */
2533577f
JJ
51 #endif
52
53 /* ---------------------------------------------------------------- */
54 /* decPacked public routines */
55 /* ---------------------------------------------------------------- */
56
57 #include "decPackedSymbols.h"
58
59 /* Conversions */
60 uint8_t * decPackedFromNumber(uint8_t *, int32_t, int32_t *,
61 const decNumber *);
62 decNumber * decPackedToNumber(const uint8_t *, int32_t, const int32_t *,
63 decNumber *);
64
65#endif