Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
etc
config
src
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
55
const
char
*
foo
(
char
) {
return
"char"
; }
56
const
char
*
foo
(
short
) {
return
"short"
; }
57
const
char
*
foo
(
unsigned
short
) {
return
"unsigned short"
; }
58
const
char
*
foo
(
int
) {
return
"int"
; }
59
const
char
*
foo
(
unsigned
int
) {
return
"unsigned int"
; }
60
const
char
*
foo
(
long
) {
return
"long"
; }
61
const
char
*
foo
(
unsigned
long
) {
return
"unsigned long"
; }
62
63
64
#ifndef _RWSTD_NO_LONG_LONG
65
66
const
char
*
foo
(
long
long
) {
return
"long long"
; }
67
const
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
74
extern
"C"
typedef
_RWSTD_WINT_T
wctrans_fun_t
(
_RWSTD_WINT_T
);
75
76
const
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
84
template
<
class
T>
85
const
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
98
const
char
*
foo
(...)
99
{
100
return
0;
101
}
102
103
int
main
()
104
{
105
if
(
foo
(wctrans_t ()))
106
printf
(
"#define _RWSTD_WCTRANS_T %s\n"
,
foo
(wctrans_t ()));
107
}
T
#define T
Definition
17.names.cpp:163
printf
IMPORT_C SInt32 printf(const Char *,...)
foo
#define foo(buf, s,...)
Definition
VA_LIST_FUNC_MACRO.cpp:28
wctrans_fun_t
_RWSTD_WINT_T wctrans_fun_t(_RWSTD_WINT_T)
Definition
WCTRANS_T.cpp:74
main
int main()
Definition
WCTRANS_T.cpp:103
_RWSTD_WINT_T
#define _RWSTD_WINT_T
Definition
_defs.h:1266
foo
Definition
VARIADIC_TEMPLATES.cpp:25
name
const char * name
Definition
codecvt1.cpp:72
stdio.h
string.h
wchar.h
wctype.h
Generated by
1.9.8