Ignore:
Timestamp:
Jun 9, 1999, 10:16:53 PM (26 years ago)
Author:
phaller
Message:

Fix: various unicode fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/NTDLL/rtlstr.cpp

    r56 r83  
    22 * Project Odin Software License can be found in LICENSE.TXT
    33 * Win32 NT Runtime / NTDLL for OS/2
    4  *
    5  * Copyright 1998       original WINE Author
    6  * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
    7  *
    84 * Rtl string functions
    95 *
    106 * Copyright 1996-1998 Marcus Meissner
     7 * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
    118 */
    129
     
    1613#include <string.h>
    1714#include <ctype.h>
     15
     16#include <os2win.h>
     17#include <unicode.h>
    1818
    1919#include "ntdll.h"
     
    6161    return STATUS_BUFFER_OVERFLOW;
    6262
    63   lstrcpynAtoW(uni->Buffer,ansi->Buffer,unilen/2);
     63  AsciiToUnicodeN(ansi->Buffer,
     64                  uni->Buffer,
     65                  unilen/2);
    6466
    6567  return STATUS_SUCCESS;
     
    99101    return STATUS_BUFFER_OVERFLOW;
    100102
    101   lstrcpynAtoW(uni->Buffer,
    102                ansi->Buffer,
     103  AsciiToUnicodeN(ansi->Buffer,
     104               uni->Buffer,
    103105               unilen/2);
    104106  return STATUS_SUCCESS;
     
    135137                      (len+1)*sizeof(WCHAR));
    136138
    137   lstrcpynAtoW(x,
    138                oemstr,
    139                len+1);
     139  AsciiToUnicodeN(oemstr,
     140                  x,
     141                  len+1);
    140142
    141143  memcpy(unistr,
     
    178180                      (len+1)*sizeof(WCHAR));
    179181
    180   lstrcpynAtoW(x,
    181                oemstr,
    182                len+1);
     182  AsciiToUnicodeN(oemstr,
     183                  x,
     184                  len+1);
    183185
    184186  memcpy(unistr,
     
    214216
    215217/**************************************************************************
    216  *                 RtlInitOemString           
     218 *                 RtlInitOemString
    217219 */
    218220VOID WINAPI RtlInitOemString(POEM_STRING target,
     
    348350                     len+1);
    349351
    350   lstrcpynWtoA(x,
    351                unistr,
    352                len+1);
     352  UnicodeToAsciiN(unistr,
     353                  x,
     354                  len+1);
    353355
    354356  memcpy(oemstr,
     
    384386
    385387  oem->Length = uni->Length/2;
    386   lstrcpynWtoA(oem->Buffer,
    387                uni->Buffer,
    388                uni->Length/2+1);
     388  UnicodeToAsciiN(uni->Buffer,
     389                  oem->Buffer,
     390                  oem->MaximumLength);
    389391  return 0;
    390392}
     
    411413
    412414  oem->Length = uni->Length/2;
    413   lstrcpynWtoA(oem->Buffer,
    414                uni->Buffer,
    415                uni->Length/2+1);
     415  UnicodeToAsciiN(uni->Buffer,
     416                  oem->Buffer,
     417                  oem->MaximumLength);
    416418
    417419  return 0;
Note: See TracChangeset for help on using the changeset viewer.