1/* Packed decimal conversion module header for the decNumber C Library. 2 Copyright (C) 2007, 2009 Free Software Foundation, Inc. 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 9 Software Foundation; either version 3, or (at your option) any later 10 version. 11 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 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/>. */ 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 */ 34 #define DECPAUTHOR "Mike Cowlishaw" /* Who to blame */ 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) 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) */ 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 66