Ignore:
Timestamp:
Feb 22, 2000, 12:11:31 AM (26 years ago)
Author:
sandervl
Message:

PD: Added wtol, wtoi, setsystime, getsystime

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/crtdll/crt_wc.cpp

    r2618 r2855  
    1 /* $Id: crt_wc.cpp,v 1.1 2000-02-03 21:37:48 sandervl Exp $ */
     1/* $Id: crt_wc.cpp,v 1.2 2000-02-21 23:11:30 sandervl Exp $ */
    22
    33/*
     
    1212 * Copyright 1997 Uwe Bonnes
    1313 * Copyright 1999-2000 Jens Wiessner
     14 * Copyright 2000 Przemyslaw Dobrowolski
    1415 *
    1516 * CRTDLL - widechar functions
     
    184185
    185186/*********************************************************************
     187 *      _wtoi                                   (CRTDLL.330)
     188 */
     189int CDECL CRTDLL__wtoi( const wchar_t *s )
     190{
     191  // int -32768-32768 = size 6 + null-terminatedstr
     192  char tempstr[7];
     193
     194  WideCharToMultiByte(0, // = CP_ACP
     195                      0,
     196                      (LPCWSTR)s,
     197                      -1,
     198                      tempstr,
     199                      7,
     200                      NULL,
     201                      NULL);
     202
     203  return (atoi(tempstr));
     204}
     205
     206
     207/*********************************************************************
     208 *      _wtol                                   (CRTDLL.331)
     209 */
     210long int CDECL CRTDLL__wtol( const wchar_t *s )
     211{
     212  // long int -2147483647-2147483647 = size 10 + null-terminatedstr
     213  char tempstr[11];
     214  WideCharToMultiByte(0, // = CP_ACP
     215                      0,
     216                      (LPCWSTR)s,
     217                      -1,
     218                      tempstr,
     219                      11,
     220                      NULL,
     221                      NULL);
     222
     223  return (atol(tempstr));
     224
     225  return 0;
     226}
     227
     228
     229/*********************************************************************
    186230 *                  fgetwc      (CRTDLL.366)
    187231 */
Note: See TracChangeset for help on using the changeset viewer.