Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
WINT_T.cpp
Go to the documentation of this file.
1// checking for wint_t in <wchar.h> and <wctype.h>
2
3
25#include "config.h"
26
27#if defined (__EDG__) \
28 && !defined (__DECCXX) \
29 && !defined (__HP_aCC) \
30 && !defined (__INTEL_COMPILER) \
31 && !defined (_SGI_COMPILER_VERSION)
32 // disable error #450-D: the type "long long" is nonstandard
33 // when using the vanilla EDG eccp in strict mode (i.e., w/o
34 // long long support)
35# pragma diag_suppress 450
36#endif // EDG eccp on Linux
37
38
39#ifndef _RWSTD_NO_WCHAR_H
40# include <wchar.h>
41#endif // _RWSTD_NO_WCHAR_H
42
43#ifndef _RWSTD_NO_WCTYPE_H
44# include <wctype.h>
45#endif // _RWSTD_NO_WCTYPE_H
46
47#include <stdio.h>
48
49// establish a dependency on the test for long long
50// and #define the LONG_LONG macro used in "type.h"
51#ifndef _RWSTD_NO_LONG_LONG
52# define LONG_LONG long long
53#else // if defined (_RWSTD_NO_LONG_LONG)
54# if defined (_MSC_VER)
55# define LONG_LONG __int64
56# endif // _MSC_VER
57#endif // _RWSTD_NO_LONG_LONG
58
59#include "types.h" // for type_name()
60
61
62int main ()
63{
65 // determine the underlying arithmetic type
66
67 wint_t wi = 0;
68 const char* const tname = type_name (wi);
69 printf ("#define _RWSTD_WINT_T %s\n", tname);
70
71 // compute the type's minimum and maximum
72 const char* const symbol = type_name (++wi);
73
74 printf ("#define _RWSTD_WINT_MIN _RWSTD_%s_MIN\n"
75 "#define _RWSTD_WINT_MAX _RWSTD_%s_MAX\n",
76 symbol, symbol);
77
78 return 0;
79}
const char * type_name()
IMPORT_C SInt32 printf(const Char *,...)
int main()
Definition WINT_T.cpp:62