epoc32/include/stdapis/wchar.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
/*-
williamr@2
     2
 * Copyright (c)1999 Citrus Project,
williamr@2
     3
 * All rights reserved.
williamr@2
     4
 *
williamr@2
     5
 * Redistribution and use in source and binary forms, with or without
williamr@2
     6
 * modification, are permitted provided that the following conditions
williamr@2
     7
 * are met:
williamr@2
     8
 * 1. Redistributions of source code must retain the above copyright
williamr@2
     9
 *    notice, this list of conditions and the following disclaimer.
williamr@2
    10
 * 2. Redistributions in binary form must reproduce the above copyright
williamr@2
    11
 *    notice, this list of conditions and the following disclaimer in the
williamr@2
    12
 *    documentation and/or other materials provided with the distribution.
williamr@2
    13
 *
williamr@2
    14
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
williamr@2
    15
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
williamr@2
    16
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
williamr@2
    17
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
williamr@2
    18
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
williamr@2
    19
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
williamr@2
    20
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
williamr@2
    21
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
williamr@2
    22
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
williamr@2
    23
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
williamr@2
    24
 * SUCH DAMAGE.
williamr@2
    25
 *
williamr@2
    26
 * $FreeBSD: src/include/wchar.h,v 1.45 2004/08/12 12:19:10 tjr Exp $
williamr@2
    27
 *
williamr@2
    28
 * © Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
williamr@2
    29
 * © Portions copyright (c) 2007 Symbian Software Ltd. All rights reserved.
williamr@2
    30
 */
williamr@2
    31
williamr@2
    32
/*-
williamr@2
    33
 * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
williamr@2
    34
 * All rights reserved.
williamr@2
    35
 *
williamr@2
    36
 * This code is derived from software contributed to The NetBSD Foundation
williamr@2
    37
 * by Julian Coleman.
williamr@2
    38
 *
williamr@2
    39
 * Redistribution and use in source and binary forms, with or without
williamr@2
    40
 * modification, are permitted provided that the following conditions
williamr@2
    41
 * are met:
williamr@2
    42
 * 1. Redistributions of source code must retain the above copyright
williamr@2
    43
 *    notice, this list of conditions and the following disclaimer.
williamr@2
    44
 * 2. Redistributions in binary form must reproduce the above copyright
williamr@2
    45
 *    notice, this list of conditions and the following disclaimer in the
williamr@2
    46
 *    documentation and/or other materials provided with the distribution.
williamr@2
    47
 * 4. Neither the name of The NetBSD Foundation nor the names of its
williamr@2
    48
 *    contributors may be used to endorse or promote products derived
williamr@2
    49
 *    from this software without specific prior written permission.
williamr@2
    50
 *
williamr@2
    51
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
williamr@2
    52
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
williamr@2
    53
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
williamr@2
    54
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
williamr@2
    55
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
williamr@2
    56
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
williamr@2
    57
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
williamr@2
    58
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
williamr@2
    59
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
williamr@2
    60
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
williamr@2
    61
 * POSSIBILITY OF SUCH DAMAGE.
williamr@2
    62
 *
williamr@2
    63
 *	$NetBSD: wchar.h,v 1.8 2000/12/22 05:31:42 itojun Exp $
williamr@2
    64
 */
williamr@2
    65
williamr@2
    66
#ifndef _WCHAR_H_
williamr@2
    67
#define _WCHAR_H_
williamr@2
    68
williamr@2
    69
#ifdef __cplusplus
williamr@2
    70
extern "C"
williamr@2
    71
{
williamr@2
    72
#endif //__cplusplus
williamr@2
    73
williamr@2
    74
#include <sys/cdefs.h>
williamr@2
    75
#include <sys/_null.h>
williamr@2
    76
#include <sys/_types.h>
williamr@2
    77
#include <sys/stat.h>
williamr@2
    78
#include <machine/_limits.h>
williamr@2
    79
#include <_ctype.h>
williamr@2
    80
#include <_ansi.h>
williamr@2
    81
#include <stdio.h>
williamr@2
    82
#include <sys/dirent.h>
williamr@2
    83
#ifdef __SYMBIAN32__
williamr@2
    84
#include <stdarg.h>
williamr@2
    85
#endif //__SYMBIAN32__
williamr@2
    86
williamr@2
    87
#ifndef _MBSTATE_T_DECLARED
williamr@2
    88
typedef	__mbstate_t	mbstate_t;
williamr@2
    89
#define	_MBSTATE_T_DECLARED
williamr@2
    90
#endif
williamr@2
    91
williamr@2
    92
#ifndef _SIZE_T_DECLARED
williamr@2
    93
typedef	__size_t	size_t;
williamr@2
    94
#define	_SIZE_T_DECLARED
williamr@2
    95
#endif
williamr@2
    96
williamr@2
    97
#ifndef __SYMBIAN32__
williamr@2
    98
#ifndef	__cplusplus
williamr@2
    99
#ifndef _WCHAR_T_DECLARED
williamr@2
   100
typedef	__wchar_t	wchar_t;
williamr@2
   101
#define	_WCHAR_T_DECLARED
williamr@2
   102
#endif //_WCHAR_T_DECLARED
williamr@2
   103
#endif //__cplusplus
williamr@2
   104
#else //__SYMBIAN32__
williamr@2
   105
//C++ built-in wchar data type which doesn't clash with the definition of wchar
williamr@2
   106
#if !defined _WCHAR_T_DECLARED && defined __cplusplus && defined __WINSCW__
williamr@2
   107
#if __option(wchar_type)
williamr@2
   108
#define	_WCHAR_T_DECLARED
williamr@2
   109
#endif //__option (wchar_type)
williamr@2
   110
#endif //__WINSCW__
williamr@2
   111
williamr@2
   112
#if !defined _WCHAR_T_DECLARED && !defined __wchar_t_defined
williamr@2
   113
#if defined __cplusplus
williamr@2
   114
#if defined __WINSCW__
williamr@2
   115
typedef unsigned short int wchar_t;
williamr@2
   116
#define	_WCHAR_T_DECLARED
williamr@2
   117
#endif // __WINSCW__
williamr@2
   118
#else
williamr@2
   119
typedef unsigned short int wchar_t;
williamr@2
   120
#define	_WCHAR_T_DECLARED
williamr@2
   121
#endif // __cplusplus 
williamr@2
   122
#endif // __wchar_t_defined
williamr@2
   123
#endif //__SYMBIAN32__
williamr@2
   124
williamr@2
   125
#ifndef _WINT_T_DECLARED
williamr@2
   126
typedef	__wint_t	wint_t;
williamr@2
   127
#define	_WINT_T_DECLARED
williamr@2
   128
#endif
williamr@2
   129
williamr@2
   130
#ifndef	WCHAR_MIN 
williamr@2
   131
#define	WCHAR_MIN	(wchar_t)__INT_MIN
williamr@2
   132
#define	WCHAR_MAX	(wchar_t)__INT_MAX
williamr@2
   133
#endif
williamr@2
   134
williamr@2
   135
#ifndef WEOF
williamr@2
   136
#define	WEOF 	((wint_t)-1)
williamr@2
   137
#endif
williamr@2
   138
williamr@2
   139
struct __sFILE;
williamr@2
   140
struct tm;
williamr@2
   141
williamr@2
   142
__BEGIN_DECLS
williamr@2
   143
IMPORT_C wint_t	btowc(int);
williamr@2
   144
IMPORT_C wint_t	fgetwc(struct __sFILE *);
williamr@2
   145
IMPORT_C wchar_t	*
williamr@2
   146
	fgetws(wchar_t * __restrict, int, struct __sFILE * __restrict);
williamr@2
   147
IMPORT_C wint_t	fputwc(wchar_t, struct __sFILE *);
williamr@2
   148
IMPORT_C int	fputws(const wchar_t * __restrict, struct __sFILE * __restrict);
williamr@2
   149
IMPORT_C int	fwide(struct __sFILE *, int);
williamr@2
   150
IMPORT_C int	fwprintf(struct __sFILE * __restrict, const wchar_t * __restrict, ...);
williamr@2
   151
IMPORT_C int	fwscanf(struct __sFILE * __restrict, const wchar_t * __restrict, ...);
williamr@2
   152
IMPORT_C wint_t	getwc(struct __sFILE *);
williamr@2
   153
IMPORT_C wint_t	getwchar(void);
williamr@2
   154
IMPORT_C size_t	mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
williamr@2
   155
IMPORT_C size_t	mbrtowc(wchar_t * __restrict, const char * __restrict, size_t,
williamr@2
   156
	    mbstate_t * __restrict);
williamr@2
   157
IMPORT_C int	mbsinit(const mbstate_t *);
williamr@2
   158
IMPORT_C size_t	mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
williamr@2
   159
	    mbstate_t * __restrict);
williamr@2
   160
IMPORT_C wint_t	putwc(wchar_t, struct __sFILE *);
williamr@2
   161
IMPORT_C wint_t	putwchar(wchar_t);
williamr@2
   162
IMPORT_C int	swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
williamr@2
   163
	    ...);
williamr@2
   164
IMPORT_C int	swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...);
williamr@2
   165
IMPORT_C wint_t	ungetwc(wint_t, struct __sFILE *);
williamr@2
   166
IMPORT_C int	vfwprintf(struct __sFILE * __restrict, const wchar_t * __restrict,
williamr@2
   167
	    va_list);
williamr@2
   168
IMPORT_C int	vswprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
williamr@2
   169
	    va_list);
williamr@2
   170
IMPORT_C int	vwprintf(const wchar_t * __restrict, va_list);
williamr@2
   171
IMPORT_C size_t	wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict);
williamr@2
   172
IMPORT_C wchar_t	*wcscat(wchar_t * __restrict, const wchar_t * __restrict);
williamr@2
   173
IMPORT_C wchar_t	*wcschr(const wchar_t *, wchar_t) __pure;
williamr@2
   174
IMPORT_C int	wcscmp(const wchar_t *, const wchar_t *) __pure;
williamr@2
   175
IMPORT_C int	wcscoll(const wchar_t *, const wchar_t *);
williamr@2
   176
IMPORT_C wchar_t	*wcscpy(wchar_t * __restrict, const wchar_t * __restrict);
williamr@2
   177
IMPORT_C size_t	wcscspn(const wchar_t *, const wchar_t *) __pure;
williamr@2
   178
IMPORT_C size_t	wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict,
williamr@2
   179
	    const struct tm * __restrict);
williamr@2
   180
IMPORT_C size_t	wcslen(const wchar_t *) __pure;
williamr@2
   181
IMPORT_C wchar_t	*wcsncat(wchar_t * __restrict, const wchar_t * __restrict,
williamr@2
   182
	    size_t);
williamr@2
   183
IMPORT_C int	wcsncmp(const wchar_t *, const wchar_t *, size_t) __pure;
williamr@2
   184
IMPORT_C wchar_t	*wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t);
williamr@2
   185
IMPORT_C wchar_t	*wcspbrk(const wchar_t *, const wchar_t *) __pure;
williamr@2
   186
IMPORT_C wchar_t	*wcsrchr(const wchar_t *, wchar_t) __pure;
williamr@2
   187
IMPORT_C size_t	wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
williamr@2
   188
	    mbstate_t * __restrict);
williamr@2
   189
IMPORT_C size_t	wcsspn(const wchar_t *, const wchar_t *) __pure;
williamr@2
   190
IMPORT_C wchar_t	*wcsstr(const wchar_t * __restrict, const wchar_t * __restrict)
williamr@2
   191
	    __pure;
williamr@2
   192
IMPORT_C size_t	wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t);
williamr@2
   193
IMPORT_C int	wctob(wint_t);
williamr@2
   194
IMPORT_C double	wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
williamr@2
   195
IMPORT_C wchar_t	*wcstok(wchar_t * __restrict, const wchar_t * __restrict,
williamr@2
   196
	    wchar_t ** __restrict);
williamr@2
   197
IMPORT_C long	 wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int);
williamr@2
   198
IMPORT_C unsigned long
williamr@2
   199
	 wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int);
williamr@2
   200
IMPORT_C wchar_t	*wmemchr(const wchar_t *, wchar_t, size_t) __pure;
williamr@2
   201
IMPORT_C int	wmemcmp(const wchar_t *, const wchar_t *, size_t) __pure;
williamr@2
   202
IMPORT_C wchar_t	*wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t);
williamr@2
   203
IMPORT_C wchar_t	*wmemmove(wchar_t *, const wchar_t *, size_t);
williamr@2
   204
IMPORT_C wchar_t	*wmemset(wchar_t *, wchar_t, size_t);
williamr@2
   205
IMPORT_C int	wprintf(const wchar_t * __restrict, ...);
williamr@2
   206
IMPORT_C int	wscanf(const wchar_t * __restrict, ...);
williamr@2
   207
#ifdef __SYMBIAN32__
williamr@2
   208
IMPORT_C long long 	 wcstoq(const wchar_t * __restrict, wchar_t ** __restrict, int);
williamr@2
   209
IMPORT_C unsigned long long wcstouq(const wchar_t * __restrict, wchar_t ** __restrict, int);
williamr@2
   210
IMPORT_C wchar_t *wcswcs(const wchar_t * __restrict s, const wchar_t * __restrict find);
williamr@2
   211
IMPORT_C int wpopen3 (const wchar_t* file, const wchar_t* cmd, wchar_t** env, int fids[3]);
williamr@2
   212
#endif //__SYMBIAN32__
williamr@2
   213
williamr@2
   214
#ifndef _STDSTREAM_DECLARED
williamr@2
   215
extern struct __sFILE *__stdinp;
williamr@2
   216
extern struct __sFILE *__stdoutp;
williamr@2
   217
extern struct __sFILE *__stderrp;
williamr@2
   218
#define	_STDSTREAM_DECLARED
williamr@2
   219
#endif
williamr@2
   220
williamr@2
   221
#ifndef __SYMBIAN32__
williamr@2
   222
#define	getwc(fp)	fgetwc(fp)
williamr@2
   223
#define	getwchar()	fgetwc(__stdinp)
williamr@2
   224
#define	putwc(wc, fp)	fputwc(wc, fp)
williamr@2
   225
#define	putwchar(wc)	fputwc(wc, __stdoutp)
williamr@2
   226
#else //__SYMBIAN32__
williamr@2
   227
IMPORT_C wint_t	getwc(struct __sFILE *);
williamr@2
   228
IMPORT_C wint_t	getwchar(void);
williamr@2
   229
IMPORT_C wint_t	putwc(wchar_t, struct __sFILE *);
williamr@2
   230
IMPORT_C wint_t	putwchar(wchar_t);
williamr@2
   231
#endif //__SYMBIAN32__
williamr@2
   232
williamr@2
   233
williamr@2
   234
#if __ISO_C_VISIBLE >= 1999
williamr@2
   235
IMPORT_C int	vfwscanf(struct __sFILE * __restrict, const wchar_t * __restrict,
williamr@2
   236
	    va_list);
williamr@2
   237
IMPORT_C int	vswscanf(const wchar_t * __restrict, const wchar_t * __restrict,
williamr@2
   238
	    va_list);
williamr@2
   239
IMPORT_C int	vwscanf(const wchar_t * __restrict, va_list);
williamr@2
   240
IMPORT_C float	wcstof(const wchar_t * __restrict, wchar_t ** __restrict);
williamr@2
   241
IMPORT_C long double
williamr@2
   242
	wcstold(const wchar_t * __restrict, wchar_t ** __restrict);
williamr@2
   243
#ifdef __LONG_LONG_SUPPORTED
williamr@2
   244
/* LONGLONG */
williamr@2
   245
IMPORT_C long long
williamr@2
   246
	wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int);
williamr@2
   247
/* LONGLONG */
williamr@2
   248
IMPORT_C unsigned long long
williamr@2
   249
	 wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int);
williamr@2
   250
#endif
williamr@2
   251
#endif	/* __ISO_C_VISIBLE >= 1999 */
williamr@2
   252
williamr@2
   253
#if __XSI_VISIBLE
williamr@2
   254
IMPORT_C int	wcswidth(const wchar_t *, size_t);
williamr@2
   255
IMPORT_C int	wcwidth(wchar_t);
williamr@2
   256
#ifndef __SYMBIAN32__
williamr@2
   257
#define	wcwidth(_c)	__wcwidth(_c)
williamr@2
   258
#endif //__SYMBIAN32__
williamr@2
   259
#endif
williamr@2
   260
williamr@2
   261
#if __BSD_VISIBLE
williamr@2
   262
williamr@2
   263
#ifdef __SYMBIAN_COMPILE_UNUSED__
williamr@2
   264
wchar_t	*fgetwln(struct __sFILE * __restrict, size_t * __restrict);
williamr@2
   265
#endif
williamr@2
   266
williamr@2
   267
IMPORT_C size_t	mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
williamr@2
   268
	    size_t, mbstate_t * __restrict);
williamr@2
   269
IMPORT_C size_t	wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
williamr@2
   270
	    size_t, mbstate_t * __restrict);
williamr@2
   271
#endif
williamr@2
   272
#ifdef __SYMBIAN32__
williamr@2
   273
IMPORT_C wchar_t *wcpcpy(wchar_t *dst, const wchar_t *src);
williamr@2
   274
IMPORT_C wchar_t *wcpncpy(wchar_t * dst, const wchar_t * src, size_t n);
williamr@2
   275
IMPORT_C int wcscasecmp(const wchar_t *s1, const wchar_t *s2);
williamr@2
   276
IMPORT_C wchar_t *wcsdup (const wchar_t *srcwcs);
williamr@2
   277
IMPORT_C int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
williamr@2
   278
IMPORT_C size_t wcsnlen(const wchar_t *s, size_t maxlen);
williamr@2
   279
williamr@2
   280
IMPORT_C wchar_t* wrealpath (const wchar_t* , wchar_t* );
williamr@2
   281
IMPORT_C int wrmdir (const wchar_t *);
williamr@2
   282
IMPORT_C int wstat (const wchar_t *name, struct stat *st);
williamr@2
   283
IMPORT_C int wsystem (const wchar_t* );
williamr@2
   284
IMPORT_C int wunlink (const wchar_t *);
williamr@2
   285
IMPORT_C FILE* wpopen( const wchar_t* command, const wchar_t* mode );
williamr@2
   286
williamr@2
   287
IMPORT_C int wopen(const wchar_t *, int, ...);
williamr@2
   288
IMPORT_C FILE 	*wfopen(const wchar_t * __restrict,	const wchar_t * __restrict);
williamr@2
   289
IMPORT_C int wrename (const wchar_t *oldpath, const wchar_t *newpath);
williamr@2
   290
IMPORT_C int wchdir (const wchar_t *_path);
williamr@2
   291
IMPORT_C int wchmod (const wchar_t *_path, mode_t _mode);
williamr@2
   292
IMPORT_C  wchar_t* wgetcwd (wchar_t *_buf, size_t _size);
williamr@2
   293
IMPORT_C int wmkdir (const wchar_t *_path, mode_t _mode);
williamr@2
   294
IMPORT_C int wclosedir (WDIR *dp);
williamr@2
   295
IMPORT_C struct wdirent *wreaddir (WDIR *dp);
williamr@2
   296
IMPORT_C void wrewinddir (WDIR *dp);
williamr@2
   297
IMPORT_C int waccess(const wchar_t *fn, int flags);
williamr@2
   298
IMPORT_C int wcreat(const wchar_t* file, mode_t mode);
williamr@2
   299
IMPORT_C void wseekdir(WDIR *dp,off_t index);
williamr@2
   300
IMPORT_C  off_t wtelldir(const WDIR *dp);
williamr@2
   301
IMPORT_C WDIR *wopendir (const wchar_t *_path);
williamr@2
   302
williamr@2
   303
#define _wcsupr(wcs) 						wcsupr(wcs)
williamr@2
   304
#define _wcslwr(wcs) 						wcslwr(wcs)
williamr@2
   305
#define _wcsset(wcs, wc) 				wcsset(wcs,wc)
williamr@2
   306
#define _wcsnset(wcs, wc, size) 	wcsnset(wcs, wc, size)
williamr@2
   307
#define _wcsrev(wcs) 						wcsrev(wcs)
williamr@2
   308
#define _wcsicmp(wcs1, wcs2) 		wcsicmp(wcs1, wcs2)
williamr@2
   309
#define _wstrdate(datestr) 			wstrdate(datestr)
williamr@2
   310
#define _wstrtime(timestr) 			wstrtime(timestr)
williamr@2
   311
williamr@2
   312
IMPORT_C wchar_t* wcsupr(wchar_t *wcs);
williamr@2
   313
IMPORT_C wchar_t* wcslwr(wchar_t *wcs);
williamr@2
   314
IMPORT_C wchar_t* wcsset (wchar_t* wcs, wchar_t wc);
williamr@2
   315
IMPORT_C wchar_t* wcsnset (wchar_t* wcs, wchar_t wc, size_t maxSize);
williamr@2
   316
IMPORT_C wchar_t* wcsrev(wchar_t *wcs);
williamr@2
   317
IMPORT_C int wcsicmp(const wchar_t* wcs1,const wchar_t * wcs2);
williamr@2
   318
IMPORT_C wchar_t* wstrdate( const wchar_t *dateStr );
williamr@2
   319
IMPORT_C wchar_t* wstrtime(const wchar_t *timeStr);
williamr@2
   320
IMPORT_C FILE * wfdopen (int fd, const wchar_t *mode);
williamr@2
   321
IMPORT_C FILE * wfreopen(const wchar_t * file,const wchar_t * mode,FILE *fp);	
williamr@2
   322
IMPORT_C wchar_t* getws(wchar_t* str);
williamr@2
   323
IMPORT_C int wremove(const wchar_t *file);
williamr@2
   324
IMPORT_C int putws(wchar_t* str);
williamr@2
   325
williamr@2
   326
struct _wfinddata_t 
williamr@2
   327
{
williamr@2
   328
    unsigned    attrib;
williamr@2
   329
    time_t      time_create;    /* -1 for symbian */
williamr@2
   330
    time_t      time_access;    /* -1 for symbian*/
williamr@2
   331
    time_t      time_write;
williamr@2
   332
    size_t    	size;
williamr@2
   333
    wchar_t     name[260];
williamr@2
   334
};
williamr@2
   335
williamr@2
   336
#define _A_ARCH   0x0020		//Archive. Set whenever the file is changed and cleared by the BACKUP command. Value: 0x20.
williamr@2
   337
#define _A_HIDDEN 0x0002 		//Hidden file. Not normally seen with the DIR command, unless the /AH option is used. Returns information about normal files and files with this attribute. Value: 0x02.
williamr@2
   338
#define _A_NORMAL 0x0000	//Normal. File has no other attributes set and can be read or written to without restriction. Value: 0x00.
williamr@2
   339
#define _A_RDONLY 0x0001		//Read-only. File cannot be opened for writing and a file with the same name cannot be created. Value: 0x01.
williamr@2
   340
#define _A_SYSTEM  0x0004		//System file. Not normally seen with the DIR command, unless the /A or /A:S option is used
williamr@2
   341
williamr@2
   342
IMPORT_C size_t	wcslcat(wchar_t *, const wchar_t *, size_t);
williamr@2
   343
IMPORT_C size_t	 wcslcpy(wchar_t *, const wchar_t *, size_t);
williamr@2
   344
IMPORT_C wchar_t *wasctime(const struct tm *);
williamr@2
   345
IMPORT_C wchar_t *wctime(const time_t *);
williamr@2
   346
IMPORT_C wchar_t *wsetlocale(int, const wchar_t *);
williamr@2
   347
IMPORT_C void wperror(const wchar_t *);
williamr@2
   348
IMPORT_C wchar_t*	wcserror(int num);
williamr@2
   349
IMPORT_C int wfindnext(intptr_t, struct _wfinddata_t *); 
williamr@2
   350
IMPORT_C intptr_t wfindfirst(const wchar_t* , struct _wfinddata_t* );
williamr@2
   351
IMPORT_C	int findclose( intptr_t handle);
williamr@2
   352
williamr@2
   353
#define snwprintf swprintf
williamr@2
   354
#define vsnwprintf vswprintf
williamr@2
   355
williamr@2
   356
IMPORT_C int wcsnicmp (const wchar_t *wcs1, const wchar_t *wcs2, size_t n);
williamr@2
   357
IMPORT_C int wcsicoll(const wchar_t *wcs1, const wchar_t *wcs2);
williamr@2
   358
IMPORT_C int wcsncoll(const wchar_t* wcs1, const wchar_t* wcs2, size_t n);
williamr@2
   359
IMPORT_C int wcsnicoll(const wchar_t* wcs1, const wchar_t* wcs2, size_t n);
williamr@2
   360
IMPORT_C wchar_t* wtmpnam(wchar_t *s);
williamr@2
   361
williamr@2
   362
#endif //__SYMBIAN32__
williamr@2
   363
__END_DECLS
williamr@2
   364
williamr@2
   365
#ifdef __cplusplus
williamr@2
   366
}
williamr@2
   367
#endif //__cplusplus
williamr@2
   368
#endif /* !_WCHAR_H_ */