Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
21.cwchar.cpp File Reference
#include <cwchar>
#include <rw_any.h>
#include <rw_driver.h>
#include <cstdarg>
#include <cstdio>
#include <rw_file.h>
#include <rw_printf.h>
Include dependency graph for 21.cwchar.cpp:

Go to the source code of this file.

Data Structures

struct  Fallback::size_t
 
struct  Fallback::mbstate_t
 
struct  Fallback::wint_t
 

Namespaces

namespace  Fallback
 
namespace  std
 
namespace  std::Nested
 

Macros

#define GET_TYPE_NAME(T)
 
#define EVAL2(macro)   !!(macro - 1)
 
#define EVAL(name)   EVAL2 (_RWSTD_NO_ ## name + 0)
 
#define EVAL_IN_LIBC(name)   EVAL (name ## _IN_LIBC)
 
#define TEST(T, fun, args, macro, overload)
 

Typedefs

typedef size_t std::Nested::test_size_t
 
typedef mbstate_t std::Nested::test_mbstate_t
 
typedef wint_t std::Nested::test_wint_t
 
typedef tm std::Nested::test_tm
 
typedef std::Nested::test_size_t test_size_t
 
typedef std::Nested::test_mbstate_t test_mbstate_t
 
typedef std::Nested::test_wint_t test_wint_t
 
typedef std::Nested::test_tm test_tm
 
typedef FILE std::Nested::test_FILE
 
typedef va_list std::Nested::test_va_list
 
typedef std::Nested::test_FILE test_FILE
 
typedef std::Nested::test_va_list test_va_list
 

Enumerations

enum  {
  _RWSTD_NO_BTOWC = 1 , _RWSTD_NO_BTOWC_IN_LIBC = 1 , _RWSTD_NO_FGETWC = 1 , _RWSTD_NO_FGETWC_IN_LIBC = 1 ,
  _RWSTD_NO_FGETWS = 1 , _RWSTD_NO_FGETWS_IN_LIBC = 1 , _RWSTD_NO_FPUTWC = 1 , _RWSTD_NO_FPUTWC_IN_LIBC = 1 ,
  _RWSTD_NO_FPUTWS = 1 , _RWSTD_NO_FPUTWS_IN_LIBC = 1 , _RWSTD_NO_FWIDE = 1 , _RWSTD_NO_FWIDE_IN_LIBC = 1 ,
  _RWSTD_NO_FWPRINTF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WMEMCHR = 1 , _RWSTD_NO_WMEMCHR_IN_LIBC = 1 ,
  _RWSTD_NO_WMEMCMP = 1 , _RWSTD_NO_WMEMCMP_IN_LIBC = 1 , _RWSTD_NO_WMEMCPY = 1 , _RWSTD_NO_WMEMCPY_IN_LIBC = 1 ,
  _RWSTD_NO_WMEMMOVE = 1 , _RWSTD_NO_WMEMMOVE_IN_LIBC = 1 , _RWSTD_NO_WMEMSET = 1 , _RWSTD_NO_WMEMSET_IN_LIBC = 1 ,
  _RWSTD_NO_WPRINTF = 1 , _RWSTD_NO_WPRINTF_IN_LIBC = 1 , _RWSTD_NO_WSCANF = 1 , _RWSTD_NO_WSCANF_IN_LIBC = 1
}
 

Functions

template<class StructTm >
int tm_defined (const StructTm *)
 
int tm_defined (const Fallback::tm *)
 
 _RWSTD_NAMESPACE (std)
 
 GET_TYPE_NAME (short)
 
 GET_TYPE_NAME (unsigned short)
 
 GET_TYPE_NAME (int)
 
 GET_TYPE_NAME (unsigned int)
 
 GET_TYPE_NAME (long)
 
 GET_TYPE_NAME (unsigned long)
 
 GET_TYPE_NAME (double)
 
 GET_TYPE_NAME (_RWSTD_LONG_LONG)
 
 GET_TYPE_NAME (unsigned _RWSTD_LONG_LONG)
 
 GET_TYPE_NAME (wchar_t *)
 
 GET_TYPE_NAME (const wchar_t *)
 
void test_functions ()
 
void test_file_functions (int dummy,...)
 
int main (int argc, char *argv[])
 

Variables

const char *const missing_macros []
 
const char *const masking_macros []
 
const char std_name [] = "std"
 
int ncalls
 

Macro Definition Documentation

◆ EVAL

#define EVAL (   name)    EVAL2 (_RWSTD_NO_ ## name + 0)

Definition at line 842 of file 21.cwchar.cpp.

◆ EVAL2

#define EVAL2 (   macro)    !!(macro - 1)

Definition at line 841 of file 21.cwchar.cpp.

◆ EVAL_IN_LIBC

#define EVAL_IN_LIBC (   name)    EVAL (name ## _IN_LIBC)

Definition at line 843 of file 21.cwchar.cpp.

◆ GET_TYPE_NAME

#define GET_TYPE_NAME (   T)
Value:
template <class Type> \
const char* get_type_name (T, Type) { \
return rw_any_t (Type ()).type_name (); \
} \
const char* get_type_name (T, T) { return 0; } \
typedef void unused_typedef /* allow a terminating semicolon */
#define T
Definition 17.names.cpp:163
const char * get_type_name(...)
Definition VA_LIST.cpp:72
const char * type_name() const
Definition any.cpp:310

Definition at line 812 of file 21.cwchar.cpp.

◆ TEST

#define TEST (   T,
  fun,
  args,
  macro,
  overload 
)
Value:
do { \
cstr = (str = array); \
wcstr = (wstr = warray); \
*str = '\0'; *wstr = L'\0'; \
ncalls = 0; \
rw_info (0, 0, __LINE__, "%s::%s(" \
"%{?}%{:}/* %{?}non-%{;}const overload */%{;})", \
std_name, #fun, overload < 0, 0 == overload); \
const char* const return_type_name = \
get_type_name ((T)0, std::fun args); \
rw_warn (0 == ncalls, 0, __LINE__, \
"%s::%s(" \
"%{?}%{:}/* %{?}non-%{;}const overload */%{;}) " \
"not declared (_RWSTD_NO_%s = %d, " \
"_RWSTD_NO_%s_IN_LIBC = %d)", \
std_name, #fun, overload < 0, 0 == overload, \
#macro, EVAL (macro), #macro, EVAL_IN_LIBC (macro)); \
if (0 == ncalls) \
rw_assert (0 == return_type_name, 0, __LINE__, "%s::%s(" \
"%{?}%{:}/* %{?}non-%{;}const overload */%{;}) " \
"expected return type %s, got %s", \
std_name, #fun, overload < 0, 0 == overload, \
#T, return_type_name); \
} while (0)
#define fun
Definition 17.names.cpp:471
#define array
Definition 17.names.cpp:447
#define EVAL(name)
int ncalls
#define EVAL_IN_LIBC(name)
const char std_name[]
const char * str
Definition exec.cpp:170

Typedef Documentation

◆ test_FILE

typedef std::Nested::test_FILE test_FILE

Definition at line 1015 of file 21.cwchar.cpp.

◆ test_mbstate_t

typedef std::Nested::test_mbstate_t test_mbstate_t

Definition at line 582 of file 21.cwchar.cpp.

◆ test_size_t

typedef std::Nested::test_size_t test_size_t

Definition at line 581 of file 21.cwchar.cpp.

◆ test_tm

typedef std::Nested::test_tm test_tm

Definition at line 584 of file 21.cwchar.cpp.

◆ test_va_list

typedef std::Nested::test_va_list test_va_list

Definition at line 1016 of file 21.cwchar.cpp.

◆ test_wint_t

typedef std::Nested::test_wint_t test_wint_t

Definition at line 583 of file 21.cwchar.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

21.cwchar.cpp - test exercising [lib.string.c.strings], Table 48

$Id$

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2004-2005 Rogue Wave Software.

Enumerator
_RWSTD_NO_BTOWC 
_RWSTD_NO_BTOWC_IN_LIBC 
_RWSTD_NO_FGETWC 
_RWSTD_NO_FGETWC_IN_LIBC 
_RWSTD_NO_FGETWS 
_RWSTD_NO_FGETWS_IN_LIBC 
_RWSTD_NO_FPUTWC 
_RWSTD_NO_FPUTWC_IN_LIBC 
_RWSTD_NO_FPUTWS 
_RWSTD_NO_FPUTWS_IN_LIBC 
_RWSTD_NO_FWIDE 
_RWSTD_NO_FWIDE_IN_LIBC 
_RWSTD_NO_FWPRINTF 
_RWSTD_NO_FWPRINTF_IN_LIBC 
_RWSTD_NO_FWSCANF 
_RWSTD_NO_FWSCANF_IN_LIBC 
_RWSTD_NO_GETWC 
_RWSTD_NO_GETWC_IN_LIBC 
_RWSTD_NO_GETWCHAR 
_RWSTD_NO_GETWCHAR_IN_LIBC 
_RWSTD_NO_MBRLEN 
_RWSTD_NO_MBRLEN_IN_LIBC 
_RWSTD_NO_MBRTOWC 
_RWSTD_NO_MBRTOWC_IN_LIBC 
_RWSTD_NO_MBSINIT 
_RWSTD_NO_MBSINIT_IN_LIBC 
_RWSTD_N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_WCSRCHR_IN_LIBC 
_RWSTD_NO_WCSRTOMBS 
_RWSTD_NO_WCSRTOMBS_IN_LIBC 
_RWSTD_NO_WCSSPN 
_RWSTD_NO_WCSSPN_IN_LIBC 
_RWSTD_NO_WCSSTR 
_RWSTD_NO_WCSSTR_IN_LIBC 
_RWSTD_NO_WCSTOD 
_RWSTD_NO_WCSTOD_IN_LIBC 
_RWSTD_NO_WCSTOK 
_RWSTD_NO_WCSTOK_IN_LIBC 
_RWSTD_NO_WCSTOL 
_RWSTD_NO_WCSTOL_IN_LIBC 
_RWSTD_NO_WCSTOUL 
_RWSTD_NO_WCSTOUL_IN_LIBC 
_RWSTD_NO_WCSXFRM 
_RWSTD_NO_WCSXFRM_IN_LIBC 
_RWSTD_NO_WCTOB 
_RWSTD_NO_WCTOB_IN_LIBC 
_RWSTD_NO_WMEMCHR 
_RWSTD_NO_WMEMCHR_IN_LIBC 
_RWSTD_NO_WMEMCMP 
_RWSTD_NO_WMEMCMP_IN_LIBC 
_RWSTD_NO_WMEMCPY 
_RWSTD_NO_WMEMCPY_IN_LIBC 
_RWSTD_NO_WMEMMOVE 
_RWSTD_NO_WMEMMOVE_IN_LIBC 
_RWSTD_NO_WMEMSET 
_RWSTD_NO_WMEMSET_IN_LIBC 
_RWSTD_NO_WPRINTF 
_RWSTD_NO_WPRINTF_IN_LIBC 
_RWSTD_NO_WSCANF 
_RWSTD_NO_WSCANF_IN_LIBC 

Definition at line 33 of file 21.cwchar.cpp.

Function Documentation

◆ _RWSTD_NAMESPACE()

_RWSTD_NAMESPACE ( std  )

Definition at line 632 of file 21.cwchar.cpp.

◆ GET_TYPE_NAME() [1/11]

GET_TYPE_NAME ( _RWSTD_LONG_LONG  )

◆ GET_TYPE_NAME() [2/11]

GET_TYPE_NAME ( const wchar_t *  )

◆ GET_TYPE_NAME() [3/11]

GET_TYPE_NAME ( double  )

◆ GET_TYPE_NAME() [4/11]

GET_TYPE_NAME ( int  )

◆ GET_TYPE_NAME() [5/11]

GET_TYPE_NAME ( long  )

◆ GET_TYPE_NAME() [6/11]

GET_TYPE_NAME ( short  )

◆ GET_TYPE_NAME() [7/11]

GET_TYPE_NAME ( unsigned  _RWSTD_LONG_LONG)

◆ GET_TYPE_NAME() [8/11]

GET_TYPE_NAME ( unsigned int  )

◆ GET_TYPE_NAME() [9/11]

GET_TYPE_NAME ( unsigned long  )

◆ GET_TYPE_NAME() [10/11]

GET_TYPE_NAME ( unsigned short  )

◆ GET_TYPE_NAME() [11/11]

GET_TYPE_NAME ( wchar_t *  )

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 1098 of file 21.cwchar.cpp.

◆ test_file_functions()

void test_file_functions ( int  dummy,
  ... 
)

Definition at line 1019 of file 21.cwchar.cpp.

◆ test_functions()

void test_functions ( )

Definition at line 852 of file 21.cwchar.cpp.

◆ tm_defined() [1/2]

int tm_defined ( const Fallback::tm *  )

Definition at line 589 of file 21.cwchar.cpp.

◆ tm_defined() [2/2]

template<class StructTm >
int tm_defined ( const StructTm *  )

Definition at line 588 of file 21.cwchar.cpp.

Variable Documentation

◆ masking_macros

const char* const masking_macros[]

Definition at line 131 of file 21.cwchar.cpp.

◆ missing_macros

const char* const missing_macros[]
Initial value:
= {
"NULL",
"WCHAR_MIN",
"WCHAR_MAX",
"WEOF",
0
}

Definition at line 98 of file 21.cwchar.cpp.

◆ ncalls

int ncalls

Definition at line 630 of file 21.cwchar.cpp.

◆ std_name

const char std_name[] = "std"

Definition at line 592 of file 21.cwchar.cpp.