Theme Editor: Implemented %xd tag with subimages
[kugel-rb.git] / firmware / libc / include / inttypes.h
blobddcaa988b1a04a1711bafc28071ad0a4e379915b
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Dave Chapman
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __INTTYPES_H__
23 #define __INTTYPES_H__
25 #include <stdint.h>
27 /* could possibly have (f)scanf format specifiers here */
29 /* 8 bit */
30 #define PRId8 "d"
31 #define PRIi8 "d"
32 #define PRIu8 "u"
33 #define PRIx8 "x"
34 #define PRIX8 "X"
36 /* 16 bit */
37 #if USHRT_MAX == 0xffff
39 #define PRId16 "d"
40 #define PRIi16 "d"
41 #define PRIu16 "u"
42 #define PRIx16 "x"
43 #define PRIX16 "X"
45 #endif
47 /* 32 bit */
48 #if ULONG_MAX == 0xfffffffful
50 #define PRId32 "ld"
51 #define PRIi32 "ld"
52 #define PRIu32 "lu"
53 #define PRIx32 "lx"
54 #define PRIX32 "lX"
55 #define PRIdPTR "ld"
56 #define PRIiPTR "ld"
57 #define PRIuPTR "lu"
58 #define PRIxPTR "lx"
59 #define PRIXPTR "lX"
61 #elif UINT_MAX == 0xffffffffu
63 #define PRId32 "d"
64 #define PRIi32 "d"
65 #define PRIu32 "u"
66 #define PRIx32 "x"
67 #define PRIX32 "X"
69 #endif
71 /* 64 bit */
72 #if ULONG_MAX == 0xffffffffffffffffull
74 #define PRId64 "ld"
75 #define PRIi64 "ld"
76 #define PRIu64 "lu"
77 #define PRIx64 "lx"
78 #define PRIX64 "lX"
79 #define PRIdPTR "ld"
80 #define PRIiPTR "ld"
81 #define PRIuPTR "lu"
82 #define PRIxPTR "lx"
83 #define PRIXPTR "lX"
86 #else
88 #define PRId64 "lld"
89 #define PRIi64 "lld"
90 #define PRIu64 "llu"
91 #define PRIx64 "llx"
92 #define PRIX64 "llX"
94 #endif
96 #endif /* __INTTYPES_H__ */