2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
/*
|
|
|
32 |
STANDARD WIDE STRING FUNCTION DEFINITIONS
|
|
|
33 |
|
|
|
34 |
These routines define the standard C wide string functions which C++
|
|
|
35 |
overloads.
|
|
|
36 |
*/
|
|
|
37 |
|
|
|
38 |
#include <cstddef>
|
|
|
39 |
using namespace std ;
|
|
|
40 |
|
|
|
41 |
extern "C" {
|
|
|
42 |
// Declare the C versions
|
|
|
43 |
wchar_t *wcschr ( const wchar_t *, wchar_t ) ;
|
|
|
44 |
wchar_t *wcsrchr ( const wchar_t *, wchar_t ) ;
|
|
|
45 |
wchar_t *wcspbrk ( const wchar_t *, const wchar_t * ) ;
|
|
|
46 |
wchar_t *wcsstr ( const wchar_t *, const wchar_t * ) ;
|
|
|
47 |
wchar_t *wmemchr ( const wchar_t *, wchar_t, size_t ) ;
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
namespace std {
|
|
|
51 |
wchar_t *wcschr ( wchar_t *s, wchar_t c )
|
|
|
52 |
{
|
|
|
53 |
return ( ::wcschr ( s, c ) ) ;
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
const wchar_t *wcschr ( const wchar_t *s, wchar_t c )
|
|
|
57 |
{
|
|
|
58 |
return ( ( const wchar_t * ) ::wcschr ( s, c ) ) ;
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
wchar_t *wcsrchr ( wchar_t *s, wchar_t c )
|
|
|
62 |
{
|
|
|
63 |
return ( ::wcsrchr ( s, c ) ) ;
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
const wchar_t *wcsrchr ( const wchar_t *s, wchar_t c )
|
|
|
67 |
{
|
|
|
68 |
return ( ( const wchar_t * ) ::wcsrchr ( s, c ) ) ;
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
wchar_t *wcspbrk ( wchar_t *s, const wchar_t *t )
|
|
|
72 |
{
|
|
|
73 |
return ( ::wcspbrk ( s, t ) ) ;
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
const wchar_t *wcspbrk ( const wchar_t *s, const wchar_t *t )
|
|
|
77 |
{
|
|
|
78 |
return ( ( const wchar_t * ) ::wcspbrk ( s, t ) ) ;
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
wchar_t *wcsstr ( wchar_t *s, const wchar_t *t )
|
|
|
82 |
{
|
|
|
83 |
return ( ::wcsstr ( s, t ) ) ;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
const wchar_t *wcsstr ( const wchar_t *s, const wchar_t *t )
|
|
|
87 |
{
|
|
|
88 |
return ( ( const wchar_t * ) ::wcsstr ( s, t ) ) ;
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
wchar_t *wmemchr ( wchar_t *s, wchar_t c, size_t n )
|
|
|
92 |
{
|
|
|
93 |
return ( ::wmemchr ( s, c, n ) ) ;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
const wchar_t *wmemchr ( const wchar_t *s, wchar_t c, size_t n )
|
|
|
97 |
{
|
|
|
98 |
return ( ( const wchar_t * ) ::wmemchr ( s, c, n ) ) ;
|
|
|
99 |
}
|
|
|
100 |
}
|