Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
WCTRANS_T.cpp
Go to the documentation of this file.
1// checking for wctrans_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
46
47
48#include <stdio.h>
49#include <string.h>
50
51#undef strcpy
52#undef strcat
53
54
55const char* foo (char) { return "char"; }
56const char* foo (short) { return "short"; }
57const char* foo (unsigned short) { return "unsigned short"; }
58const char* foo (int) { return "int"; }
59const char* foo (unsigned int) { return "unsigned int"; }
60const char* foo (long) { return "long"; }
61const char* foo (unsigned long) { return "unsigned long"; }
62
63
64#ifndef _RWSTD_NO_LONG_LONG
65
66const char* foo (long long) { return "long long"; }
67const char* foo (unsigned long long) { return "unsigned long long"; }
68
69#endif // _RWSTD_NO_LONG_LONG
70
71
72#ifndef _RWSTD_NO_WINT_T
73
75
76const char* foo (wctrans_fun_t*)
77{
78 return "__rw_wctrans_t\n"
79 "typedef _RWSTD_WINT_T (*__rw_wctrans_t)(_RWSTD_WINT_T);\n";
80}
81
82#endif // _RWSTD_NO_WINT_T
83
84template<class T>
85const char* foo (const T*)
86{
87 static char name [256];
88
89 const char *nm = foo (T ());
90
91 strcpy (name, nm);
92 strcat (name, "*");
93
94 return name;
95}
96
97
98const char* foo (...)
99{
100 return 0;
101}
102
103int main ()
104{
105 if (foo (wctrans_t ()))
106 printf ("#define _RWSTD_WCTRANS_T %s\n", foo (wctrans_t ()));
107}
#define T
Definition 17.names.cpp:163
IMPORT_C SInt32 printf(const Char *,...)
#define foo(buf, s,...)
_RWSTD_WINT_T wctrans_fun_t(_RWSTD_WINT_T)
Definition WCTRANS_T.cpp:74
int main()
#define _RWSTD_WINT_T
Definition _defs.h:1266
const char * name
Definition codecvt1.cpp:72