wined3d: Fix introduced regression in shader_glsl_mnxn and vshader_hw_mnxn.
[wine.git] / dlls / msvcrt / wcs.c
bloba7a014d8f3b015310080dc58c906fb2c1177a24e
1 /*
2 * msvcrt.dll wide-char functions
4 * Copyright 1999 Alexandre Julliard
5 * Copyright 2000 Jon Griffiths
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <limits.h>
22 #include <stdio.h>
23 #include <math.h>
24 #include <assert.h>
25 #include "msvcrt.h"
26 #include "winnls.h"
27 #include "wine/unicode.h"
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
33 /* INTERNAL: MSVCRT_malloc() based wstrndup */
34 MSVCRT_wchar_t* msvcrt_wstrndup(const MSVCRT_wchar_t *buf, unsigned int size)
36 MSVCRT_wchar_t* ret;
37 unsigned int len = strlenW(buf), max_len;
39 max_len = size <= len? size : len + 1;
41 ret = MSVCRT_malloc(max_len * sizeof (MSVCRT_wchar_t));
42 if (ret)
44 memcpy(ret,buf,max_len * sizeof (MSVCRT_wchar_t));
45 ret[max_len] = 0;
47 return ret;
50 /*********************************************************************
51 * _wcsdup (MSVCRT.@)
53 MSVCRT_wchar_t* CDECL _wcsdup( const MSVCRT_wchar_t* str )
55 MSVCRT_wchar_t* ret = NULL;
56 if (str)
58 int size = (strlenW(str) + 1) * sizeof(MSVCRT_wchar_t);
59 ret = MSVCRT_malloc( size );
60 if (ret) memcpy( ret, str, size );
62 return ret;
65 /*********************************************************************
66 * _wcsicoll (MSVCRT.@)
68 INT CDECL _wcsicoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
70 /* FIXME: handle collates */
71 return strcmpiW( str1, str2 );
74 /*********************************************************************
75 * _wcsnset (MSVCRT.@)
77 MSVCRT_wchar_t* CDECL _wcsnset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c, MSVCRT_size_t n )
79 MSVCRT_wchar_t* ret = str;
80 while ((n-- > 0) && *str) *str++ = c;
81 return ret;
84 /*********************************************************************
85 * _wcsrev (MSVCRT.@)
87 MSVCRT_wchar_t* CDECL _wcsrev( MSVCRT_wchar_t* str )
89 MSVCRT_wchar_t* ret = str;
90 MSVCRT_wchar_t* end = str + strlenW(str) - 1;
91 while (end > str)
93 MSVCRT_wchar_t t = *end;
94 *end-- = *str;
95 *str++ = t;
97 return ret;
100 /*********************************************************************
101 * _wcsset (MSVCRT.@)
103 MSVCRT_wchar_t* CDECL _wcsset( MSVCRT_wchar_t* str, MSVCRT_wchar_t c )
105 MSVCRT_wchar_t* ret = str;
106 while (*str) *str++ = c;
107 return ret;
110 /*********************************************************************
111 * wcstod (MSVCRT.@)
113 double CDECL MSVCRT_wcstod(const MSVCRT_wchar_t* lpszStr, MSVCRT_wchar_t** end)
115 const MSVCRT_wchar_t* str = lpszStr;
116 int negative = 0;
117 double ret = 0, divisor = 10.0;
119 TRACE("(%s,%p) semi-stub\n", debugstr_w(lpszStr), end);
121 /* FIXME:
122 * - Should set errno on failure
123 * - Should fail on overflow
124 * - Need to check which input formats are allowed
126 while (isspaceW(*str))
127 str++;
129 if (*str == '-')
131 negative = 1;
132 str++;
135 while (isdigitW(*str))
137 ret = ret * 10.0 + (*str - '0');
138 str++;
140 if (*str == '.')
141 str++;
142 while (isdigitW(*str))
144 ret = ret + (*str - '0') / divisor;
145 divisor *= 10;
146 str++;
149 if (*str == 'E' || *str == 'e' || *str == 'D' || *str == 'd')
151 int negativeExponent = 0;
152 int exponent = 0;
153 if (*(++str) == '-')
155 negativeExponent = 1;
156 str++;
158 while (isdigitW(*str))
160 exponent = exponent * 10 + (*str - '0');
161 str++;
163 if (exponent != 0)
165 if (negativeExponent)
166 ret = ret / pow(10.0, exponent);
167 else
168 ret = ret * pow(10.0, exponent);
172 if (negative)
173 ret = -ret;
175 if (end)
176 *end = (MSVCRT_wchar_t*)str;
178 TRACE("returning %g\n", ret);
179 return ret;
183 typedef struct pf_output_t
185 int used;
186 int len;
187 BOOL unicode;
188 union {
189 LPWSTR W;
190 LPSTR A;
191 } buf;
192 } pf_output;
194 typedef struct pf_flags_t
196 char Sign, LeftAlign, Alternate, PadZero;
197 int FieldLength, Precision;
198 char IntegerLength, IntegerDouble;
199 char WideString;
200 char Format;
201 } pf_flags;
204 * writes a string of characters to the output
205 * returns -1 if the string doesn't fit in the output buffer
206 * return the length of the string if all characters were written
208 static inline int pf_output_stringW( pf_output *out, LPCWSTR str, int len )
210 int space = out->len - out->used;
212 if( len < 0 )
213 len = strlenW( str );
214 if( out->unicode )
216 LPWSTR p = out->buf.W + out->used;
218 if( space >= len )
220 memcpy( p, str, len*sizeof(WCHAR) );
221 out->used += len;
222 return len;
224 if( space > 0 )
225 memcpy( p, str, space*sizeof(WCHAR) );
226 out->used += len;
228 else
230 int n = WideCharToMultiByte( CP_ACP, 0, str, len, NULL, 0, NULL, NULL );
231 LPSTR p = out->buf.A + out->used;
233 if( space >= n )
235 WideCharToMultiByte( CP_ACP, 0, str, len, p, n, NULL, NULL );
236 out->used += n;
237 return len;
239 if( space > 0 )
240 WideCharToMultiByte( CP_ACP, 0, str, len, p, space, NULL, NULL );
241 out->used += n;
243 return -1;
246 static inline int pf_output_stringA( pf_output *out, LPCSTR str, int len )
248 int space = out->len - out->used;
250 if( len < 0 )
251 len = strlen( str );
252 if( !out->unicode )
254 LPSTR p = out->buf.A + out->used;
256 if( space >= len )
258 memcpy( p, str, len );
259 out->used += len;
260 return len;
262 if( space > 0 )
263 memcpy( p, str, space );
264 out->used += len;
266 else
268 int n = MultiByteToWideChar( CP_ACP, 0, str, len, NULL, 0 );
269 LPWSTR p = out->buf.W + out->used;
271 if( space >= n )
273 MultiByteToWideChar( CP_ACP, 0, str, len, p, n );
274 out->used += n;
275 return len;
277 if( space > 0 )
278 MultiByteToWideChar( CP_ACP, 0, str, len, p, space );
279 out->used += n;
281 return -1;
284 static inline int pf_fill( pf_output *out, int len, pf_flags *flags, char left )
286 int i, r = 0;
288 if( flags->Sign && !( flags->Format == 'd' || flags->Format == 'i' ) )
289 flags->Sign = 0;
291 if( left && flags->Sign )
293 flags->FieldLength--;
294 if( flags->PadZero )
295 r = pf_output_stringA( out, &flags->Sign, 1 );
298 if( ( !left && flags->LeftAlign ) ||
299 ( left && !flags->LeftAlign ))
301 for( i=0; (i<(flags->FieldLength-len)) && (r>=0); i++ )
303 if( left && flags->PadZero )
304 r = pf_output_stringA( out, "0", 1 );
305 else
306 r = pf_output_stringA( out, " ", 1 );
310 if( left && flags->Sign && !flags->PadZero )
311 r = pf_output_stringA( out, &flags->Sign, 1 );
313 return r;
316 static inline int pf_output_format_W( pf_output *out, LPCWSTR str,
317 int len, pf_flags *flags )
319 int r = 0;
321 if( len < 0 )
322 len = strlenW( str );
324 if (flags->Precision >= 0 && flags->Precision < len)
325 len = flags->Precision;
327 r = pf_fill( out, len, flags, 1 );
329 if( r>=0 )
330 r = pf_output_stringW( out, str, len );
332 if( r>=0 )
333 r = pf_fill( out, len, flags, 0 );
335 return r;
338 static inline int pf_output_format_A( pf_output *out, LPCSTR str,
339 int len, pf_flags *flags )
341 int r = 0;
343 if( len < 0 )
344 len = strlen( str );
346 if (flags->Precision >= 0 && flags->Precision < len)
347 len = flags->Precision;
349 r = pf_fill( out, len, flags, 1 );
351 if( r>=0 )
352 r = pf_output_stringA( out, str, len );
354 if( r>=0 )
355 r = pf_fill( out, len, flags, 0 );
357 return r;
360 static int pf_handle_string_format( pf_output *out, const void* str, int len,
361 pf_flags *flags, BOOL capital_letter)
363 if(str == NULL) /* catch NULL pointer */
364 return pf_output_format_A( out, "(null)", -1, flags);
366 /* prefixes take priority over %c,%s vs. %C,%S, so we handle them first */
367 if(flags->WideString || flags->IntegerLength == 'l')
368 return pf_output_format_W( out, str, len, flags);
369 if(flags->IntegerLength == 'h')
370 return pf_output_format_A( out, str, len, flags);
372 /* %s,%c -> chars in ansi functions & wchars in unicode
373 * %S,%C -> wchars in ansi functions & chars in unicode */
374 if( capital_letter == out->unicode) /* either both TRUE or both FALSE */
375 return pf_output_format_A( out, str, len, flags);
376 else
377 return pf_output_format_W( out, str, len, flags);
380 static inline BOOL pf_is_integer_format( char fmt )
382 static const char float_fmts[] = "diouxX";
383 if (!fmt)
384 return FALSE;
385 return strchr( float_fmts, fmt ) ? TRUE : FALSE;
388 static inline BOOL pf_is_double_format( char fmt )
390 static const char float_fmts[] = "aeEfgG";
391 if (!fmt)
392 return FALSE;
393 return strchr( float_fmts, fmt ) ? TRUE : FALSE;
396 static inline BOOL pf_is_valid_format( char fmt )
398 static const char float_fmts[] = "acCdeEfgGinouxX";
399 if (!fmt)
400 return FALSE;
401 return strchr( float_fmts, fmt ) ? TRUE : FALSE;
404 static void pf_rebuild_format_string( char *p, pf_flags *flags )
406 *p++ = '%';
407 if( flags->Sign )
408 *p++ = flags->Sign;
409 if( flags->LeftAlign )
410 *p++ = flags->LeftAlign;
411 if( flags->Alternate )
412 *p++ = flags->Alternate;
413 if( flags->PadZero )
414 *p++ = flags->PadZero;
415 if( flags->FieldLength )
417 sprintf(p, "%d", flags->FieldLength);
418 p += strlen(p);
420 if( flags->Precision >= 0 )
422 sprintf(p, ".%d", flags->Precision);
423 p += strlen(p);
425 *p++ = flags->Format;
426 *p++ = 0;
429 /* pf_integer_conv: prints x to buf, including alternate formats,
430 but not the sign */
431 static void pf_integer_conv( char *buf, pf_flags *flags, LONGLONG x )
433 unsigned int base;
434 const char *digits;
436 int i, j, k;
437 char tmp[40];
439 base = 10;
440 if( flags->Format == 'o' )
441 base = 8;
442 else if( flags->Format == 'x' || flags->Format == 'X' )
443 base = 16;
445 if( flags->Format == 'X' )
446 digits = "0123456789ABCDEFX";
447 else
448 digits = "0123456789abcdefx";
450 if( x < 0 && ( flags->Format == 'd' || flags->Format == 'i' ) )
452 x = -x;
453 flags->Sign = '-';
456 /* Do conversion (backwards) */
457 i = 0;
458 if( x == 0 && flags->Precision )
459 tmp[i++] = '0';
460 else
461 while( x != 0 )
463 j = (ULONGLONG) x % base;
464 x = (ULONGLONG) x / base;
465 tmp[i++] = digits[j];
467 k = flags->Precision - i;
468 while( k-- > 0 )
469 tmp[i++] = '0';
470 if( flags->Alternate )
472 if( base == 16 )
474 tmp[i++] = digits[16];
475 tmp[i++] = '0';
477 else if( base == 8 && tmp[i-1] != '0' )
478 tmp[i++] = '0';
481 /* Reverse for buf */
482 j = 0;
483 while( i-- > 0 )
484 buf[j++] = tmp[i];
485 buf[j] = '\0';
487 /* Adjust precision so pf_fill won't truncate the number later */
488 flags->Precision = strlen( buf );
490 return;
493 /*********************************************************************
494 * pf_vsnprintf (INTERNAL)
496 * implements both A and W vsnprintf functions
498 static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
500 int r;
501 LPCWSTR q, p = format;
502 pf_flags flags;
504 TRACE("format is %s\n",debugstr_w(format));
505 while (*p)
507 q = strchrW( p, '%' );
509 /* there's no % characters left, output the rest of the string */
510 if( !q )
512 r = pf_output_stringW(out, p, -1);
513 if( r<0 )
514 return r;
515 p += r;
516 continue;
519 /* there's characters before the %, output them */
520 if( q != p )
522 r = pf_output_stringW(out, p, q - p);
523 if( r<0 )
524 return r;
525 p = q;
528 /* we must be at a % now, skip over it */
529 assert( *p == '%' );
530 p++;
532 /* output a single % character */
533 if( *p == '%' )
535 r = pf_output_stringW(out, p++, 1);
536 if( r<0 )
537 return r;
538 continue;
541 /* parse the flags */
542 memset( &flags, 0, sizeof flags );
543 while (*p)
545 if( *p == '+' || *p == ' ' )
547 if ( flags.Sign != '+' )
548 flags.Sign = *p;
550 else if( *p == '-' )
551 flags.LeftAlign = *p;
552 else if( *p == '0' )
553 flags.PadZero = *p;
554 else if( *p == '#' )
555 flags.Alternate = *p;
556 else
557 break;
558 p++;
561 /* deal with the field width specifier */
562 flags.FieldLength = 0;
563 if( *p == '*' )
565 flags.FieldLength = va_arg( valist, int );
566 p++;
568 else while( isdigit(*p) )
570 flags.FieldLength *= 10;
571 flags.FieldLength += *p++ - '0';
574 /* deal with precision */
575 flags.Precision = -1;
576 if( *p == '.' )
578 flags.Precision = 0;
579 p++;
580 if( *p == '*' )
582 flags.Precision = va_arg( valist, int );
583 p++;
585 else while( isdigit(*p) )
587 flags.Precision *= 10;
588 flags.Precision += *p++ - '0';
592 /* deal with integer width modifier */
593 while( *p )
595 if( *p == 'h' || *p == 'l' || *p == 'L' )
597 flags.IntegerLength = *p;
598 p++;
600 else if( *p == 'I' )
602 if( *(p+1) == '6' && *(p+2) == '4' )
604 flags.IntegerDouble++;
605 p += 3;
607 else if( *(p+1) == '3' && *(p+2) == '2' )
608 p += 3;
609 else if( isdigit(*(p+1)) || *(p+1) == 0 )
610 break;
611 else
612 p++;
614 else if( *p == 'w' )
615 flags.WideString = *p++;
616 else if( *p == 'F' )
617 p++; /* ignore */
618 else
619 break;
622 flags.Format = *p;
623 r = 0;
625 /* output a string */
626 if( flags.Format == 's' || flags.Format == 'S' )
627 r = pf_handle_string_format( out, va_arg(valist, const void*), -1,
628 &flags, (flags.Format == 'S') );
630 /* output a single character */
631 else if( flags.Format == 'c' || flags.Format == 'C' )
633 INT ch = va_arg( valist, int );
635 r = pf_handle_string_format( out, &ch, 1, &flags, (flags.Format == 'C') );
638 /* output a pointer */
639 else if( flags.Format == 'p' )
641 char pointer[11];
643 flags.PadZero = 0;
644 if( flags.Alternate )
645 sprintf(pointer, "0X%08lX", va_arg(valist, long));
646 else
647 sprintf(pointer, "%08lX", va_arg(valist, long));
648 r = pf_output_format_A( out, pointer, -1, &flags );
651 /* deal with %n */
652 else if( flags.Format == 'n' )
654 int *x = va_arg(valist, int *);
655 *x = out->used;
658 /* deal with 64-bit integers */
659 else if( pf_is_integer_format( flags.Format ) && flags.IntegerDouble )
661 char number[40], *x = number;
663 if( flags.FieldLength >= sizeof number )
664 x = HeapAlloc( GetProcessHeap(), 0, flags.FieldLength+1 );
666 pf_integer_conv( x, &flags, va_arg(valist, LONGLONG) );
668 r = pf_output_format_A( out, x, -1, &flags );
669 if( x != number )
670 HeapFree( GetProcessHeap(), 0, number );
673 /* deal with integers and floats using libc's printf */
674 else if( pf_is_valid_format( flags.Format ) )
676 char fmt[20], number[40], *x = number;
678 if( flags.FieldLength >= sizeof number )
679 x = HeapAlloc( GetProcessHeap(), 0, flags.FieldLength+1 );
681 pf_rebuild_format_string( fmt, &flags );
683 if( pf_is_double_format( flags.Format ) )
684 sprintf( x, fmt, va_arg(valist, double) );
685 else
686 sprintf( x, fmt, va_arg(valist, int) );
688 r = pf_output_stringA( out, x, -1 );
689 if( x != number )
690 HeapFree( GetProcessHeap(), 0, number );
692 else
693 continue;
695 if( r<0 )
696 return r;
697 p++;
700 /* check we reached the end, and null terminate the string */
701 assert( *p == 0 );
702 pf_output_stringW( out, p, 1 );
704 return out->used - 1;
707 /*********************************************************************
708 * _vsnprintf (MSVCRT.@)
710 int CDECL MSVCRT_vsnprintf( char *str, unsigned int len,
711 const char *format, va_list valist )
713 DWORD sz;
714 LPWSTR formatW = NULL;
715 pf_output out;
716 int r;
718 out.unicode = FALSE;
719 out.buf.A = str;
720 out.used = 0;
721 out.len = len;
723 if( format )
725 sz = MultiByteToWideChar( CP_ACP, 0, format, -1, NULL, 0 );
726 formatW = HeapAlloc( GetProcessHeap(), 0, sz*sizeof(WCHAR) );
727 MultiByteToWideChar( CP_ACP, 0, format, -1, formatW, sz );
730 r = pf_vsnprintf( &out, formatW, valist );
732 HeapFree( GetProcessHeap(), 0, formatW );
734 return r;
737 /*********************************************************************
738 * _snprintf (MSVCRT.@)
740 int CDECL MSVCRT__snprintf(char *str, unsigned int len, const char *format, ...)
742 int retval;
743 va_list valist;
744 va_start(valist, format);
745 retval = MSVCRT_vsnprintf(str, len, format, valist);
746 va_end(valist);
747 return retval;
750 /*********************************************************************
751 * _vsnwsprintf (MSVCRT.@)
753 int CDECL MSVCRT_vsnwprintf( MSVCRT_wchar_t *str, unsigned int len,
754 const MSVCRT_wchar_t *format, va_list valist )
756 pf_output out;
758 out.unicode = TRUE;
759 out.buf.W = str;
760 out.used = 0;
761 out.len = len;
763 return pf_vsnprintf( &out, format, valist );
766 /*********************************************************************
767 * _snwprintf (MSVCRT.@)
769 int CDECL MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT_wchar_t *format, ...)
771 int retval;
772 va_list valist;
773 va_start(valist, format);
774 retval = MSVCRT_vsnwprintf(str, len, format, valist);
775 va_end(valist);
776 return retval;
779 /*********************************************************************
780 * sprintf (MSVCRT.@)
782 int CDECL MSVCRT_sprintf( char *str, const char *format, ... )
784 va_list ap;
785 int r;
787 va_start( ap, format );
788 r = MSVCRT_vsnprintf( str, INT_MAX, format, ap );
789 va_end( ap );
790 return r;
793 /*********************************************************************
794 * swprintf (MSVCRT.@)
796 int CDECL MSVCRT_swprintf( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ... )
798 va_list ap;
799 int r;
801 va_start( ap, format );
802 r = MSVCRT_vsnwprintf( str, INT_MAX, format, ap );
803 va_end( ap );
804 return r;
807 /*********************************************************************
808 * vswprintf (MSVCRT.@)
810 int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, va_list args )
812 return MSVCRT_vsnwprintf( str, INT_MAX, format, args );
815 /*********************************************************************
816 * wcscoll (MSVCRT.@)
818 int CDECL MSVCRT_wcscoll( const MSVCRT_wchar_t* str1, const MSVCRT_wchar_t* str2 )
820 /* FIXME: handle collates */
821 return strcmpW( str1, str2 );
824 /*********************************************************************
825 * wcspbrk (MSVCRT.@)
827 MSVCRT_wchar_t* CDECL MSVCRT_wcspbrk( const MSVCRT_wchar_t* str, const MSVCRT_wchar_t* accept )
829 const MSVCRT_wchar_t* p;
830 while (*str)
832 for (p = accept; *p; p++) if (*p == *str) return (MSVCRT_wchar_t*)str;
833 str++;
835 return NULL;
838 /*********************************************************************
839 * wcstok (MSVCRT.@)
841 MSVCRT_wchar_t * CDECL MSVCRT_wcstok( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *delim )
843 thread_data_t *data = msvcrt_get_thread_data();
844 MSVCRT_wchar_t *ret;
846 if (!str)
847 if (!(str = data->wcstok_next)) return NULL;
849 while (*str && strchrW( delim, *str )) str++;
850 if (!*str) return NULL;
851 ret = str++;
852 while (*str && !strchrW( delim, *str )) str++;
853 if (*str) *str++ = 0;
854 data->wcstok_next = str;
855 return ret;
859 /*********************************************************************
860 * wctomb (MSVCRT.@)
862 INT CDECL MSVCRT_wctomb( char *dst, MSVCRT_wchar_t ch )
864 return WideCharToMultiByte( CP_ACP, 0, &ch, 1, dst, 6, NULL, NULL );
867 /*********************************************************************
868 * iswalnum (MSVCRT.@)
870 INT CDECL MSVCRT_iswalnum( MSVCRT_wchar_t wc )
872 return isalnumW( wc );
875 /*********************************************************************
876 * iswalpha (MSVCRT.@)
878 INT CDECL MSVCRT_iswalpha( MSVCRT_wchar_t wc )
880 return isalphaW( wc );
883 /*********************************************************************
884 * iswcntrl (MSVCRT.@)
886 INT CDECL MSVCRT_iswcntrl( MSVCRT_wchar_t wc )
888 return iscntrlW( wc );
891 /*********************************************************************
892 * iswdigit (MSVCRT.@)
894 INT CDECL MSVCRT_iswdigit( MSVCRT_wchar_t wc )
896 return isdigitW( wc );
899 /*********************************************************************
900 * iswgraph (MSVCRT.@)
902 INT CDECL MSVCRT_iswgraph( MSVCRT_wchar_t wc )
904 return isgraphW( wc );
907 /*********************************************************************
908 * iswlower (MSVCRT.@)
910 INT CDECL MSVCRT_iswlower( MSVCRT_wchar_t wc )
912 return islowerW( wc );
915 /*********************************************************************
916 * iswprint (MSVCRT.@)
918 INT CDECL MSVCRT_iswprint( MSVCRT_wchar_t wc )
920 return isprintW( wc );
923 /*********************************************************************
924 * iswpunct (MSVCRT.@)
926 INT CDECL MSVCRT_iswpunct( MSVCRT_wchar_t wc )
928 return ispunctW( wc );
931 /*********************************************************************
932 * iswspace (MSVCRT.@)
934 INT CDECL MSVCRT_iswspace( MSVCRT_wchar_t wc )
936 return isspaceW( wc );
939 /*********************************************************************
940 * iswupper (MSVCRT.@)
942 INT CDECL MSVCRT_iswupper( MSVCRT_wchar_t wc )
944 return isupperW( wc );
947 /*********************************************************************
948 * iswxdigit (MSVCRT.@)
950 INT CDECL MSVCRT_iswxdigit( MSVCRT_wchar_t wc )
952 return isxdigitW( wc );