Subversion Repositories freemyipod

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
71 theseven 1
/***************************************************************************
2
 *             __________               __   ___.
3
 *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
4
 *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
5
 *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
6
 *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
7
 *                     \/            \/     \/    \/            \/
8
 * $Id: inttypes.h 26412 2010-05-30 16:07:54Z funman $
9
 *
10
 * Copyright (C) 2005 by Dave Chapman
11
 *
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.
16
 *
17
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18
 * KIND, either express or implied.
19
 *
20
 ****************************************************************************/
21
 
22
#ifndef __INTTYPES_H__
23
#define __INTTYPES_H__
24
 
113 theseven 25
#include "../../global.h"
26
#include "stdint.h"
71 theseven 27
 
28
/* could possibly have (f)scanf format specifiers here */
29
 
30
/* 8 bit */
31
#define PRId8   "d"
32
#define PRIi8   "d"
33
#define PRIu8   "u"
34
#define PRIx8   "x"
35
#define PRIX8   "X"
36
 
37
/* 16 bit */
38
#if USHRT_MAX == 0xffff
39
 
40
#define PRId16  "d"
41
#define PRIi16  "d"
42
#define PRIu16  "u"
43
#define PRIx16  "x"
44
#define PRIX16  "X"
45
 
46
#endif
47
 
48
/* 32 bit */
49
#if ULONG_MAX == 0xfffffffful
50
 
51
#define PRId32  "ld"
52
#define PRIi32  "ld"
53
#define PRIu32  "lu"
54
#define PRIx32  "lx"
55
#define PRIX32  "lX"
56
#define PRIdPTR "ld"
57
#define PRIiPTR "ld"
58
#define PRIuPTR "lu"
59
#define PRIxPTR "lx"
60
#define PRIXPTR "lX"
61
 
62
#elif UINT_MAX == 0xffffffffu
63
 
64
#define PRId32  "d"
65
#define PRIi32  "d"
66
#define PRIu32  "u"
67
#define PRIx32  "x"
68
#define PRIX32  "X"
69
 
70
#endif
71
 
72
/* 64 bit */
73
#if ULONG_MAX == 0xffffffffffffffffull
74
 
75
#define PRId64  "ld"
76
#define PRIi64  "ld"
77
#define PRIu64  "lu"
78
#define PRIx64  "lx"
79
#define PRIX64  "lX"
80
#define PRIdPTR "ld"
81
#define PRIiPTR "ld"
82
#define PRIuPTR "lu"
83
#define PRIxPTR "lx"
84
#define PRIXPTR "lX"
85
 
86
 
87
#else
88
 
89
#define PRId64  "lld"
90
#define PRIi64  "lld"
91
#define PRIu64  "llu"
92
#define PRIx64  "llx"
93
#define PRIX64  "llX"
94
 
95
#endif
96
 
97
#endif /* __INTTYPES_H__ */