Changeset 2213 for trunk/src


Ignore:
Timestamp:
Dec 27, 1999, 7:42:49 PM (26 years ago)
Author:
sandervl
Message:

VT's codepage changes

Location:
trunk/src/kernel32
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.DEF

    r2197 r2213  
    1 ; $Id: KERNEL32.DEF,v 1.60 1999-12-24 18:40:08 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.61 1999-12-27 18:42:25 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    10621062    IsExeStarted__Fv     @2001
    10631063
     1064   GetDisplayCodepage__Fv                  @3000
     1065   GetWindowsCodepage__Fv                  @3001
  • trunk/src/kernel32/makefile

    r2129 r2213  
    1 # $Id: makefile,v 1.71 1999-12-18 21:45:55 sandervl Exp $
     1# $Id: makefile,v 1.72 1999-12-27 18:42:25 sandervl Exp $
    22
    33#
     
    4444atom.obj disk.obj directory.obj cvtbitmap.obj hmmmap.obj winfakepeldr.obj \
    4545cvtaccel.obj cvticon.obj cvticongrp.obj oslibexcept.obj cpu.obj process.obj \
    46 cvtcursor.obj cvtcursorgrp.obj stubs.obj interlock.obj toolhelp.obj
     46cvtcursor.obj cvtcursorgrp.obj stubs.obj interlock.obj toolhelp.obj codepage.obj
    4747
    4848
     
    400400cpuhlp.obj: cpuhlp.asm
    401401environ.obj: environ.cpp $(PDWIN32_INCLUDE)\misc.h
     402codepage.obj: codepage.cpp oslibdos.h profile.h $(PDWIN32_INCLUDE)\codepage.h
    402403
    403404clean:
  • trunk/src/kernel32/profile.h

    r1811 r2213  
    1 /* $Id: profile.h,v 1.5 1999-11-22 20:35:51 sandervl Exp $ */
     1/* $Id: profile.h,v 1.6 1999-12-27 18:42:25 sandervl Exp $ */
    22/*
    33 * Profile header for initterm
     
    2828                                          LPCSTR value);
    2929
     30int ODIN_EXTERN(PROFILE_GetOdinIniInt)(LPCSTR section_name, LPCSTR key_name,
     31                                          int value);
     32
    3033#endif
  • trunk/src/kernel32/unicode.cpp

    r1986 r2213  
    1 /* $Id: unicode.cpp,v 1.19 1999-12-05 21:11:40 sandervl Exp $ */
     1/* $Id: unicode.cpp,v 1.20 1999-12-27 18:42:25 sandervl Exp $ */
    22
    33/*
     
    1717#include <string.h>
    1818#include "misc.h"
     19#include "codepage.h"
    1920#include <unicode.h>
    2021
    21 static UconvObject uconv_object = NULL;
     22/*static UconvObject uconv_object = NULL;*/
     23/*
    2224BOOL getUconvObject( void )
    2325{
     
    4042  return ret;
    4143}
    42 
     44*/
    4345/***********************************************************************
    4446 *              MultiByteToWideChar                (KERNEL32.534)
     
    200202  return(TRUE);
    201203}
     204
    202205//******************************************************************************
    203206// unilen: length of astring buffer (including 0 terminator)
    204207// returns string length
    205208//******************************************************************************
    206 int WIN32API UnicodeToAsciiN(LPCWSTR ustring, char *astring, int unilen)
     209int UnicodeToCodepageN(LPCWSTR ustring, char *astring, int unilen, UconvObject uconv_object)
    207210{
    208211  int i;
     
    227230//  unilen = min(length, unilen);
    228231
    229   if (getUconvObject())
     232  if (uconv_object)
    230233  {
    231234    if (unilen == 1)
     
    264267  }
    265268}
     269
     270int WIN32API UnicodeToAsciiN(LPCWSTR ustring, char *astring, int unilen)
     271{
     272    return UnicodeToCodepageN(ustring, astring, unilen, GetWindowsUconvObject());
     273}
     274
    266275//******************************************************************************
    267276// Converts unicode string to ascii string
     
    327336// asciilen: max length of unicode buffer (including end 0)
    328337//******************************************************************************
    329 void WIN32API AsciiToUnicodeN(const char *ascii, WCHAR *unicode, int asciilen)
     338void CodepageToUnicodeN(const char *ascii, WCHAR *unicode, int asciilen, UconvObject uconv_object)
    330339{
    331340  int rc;
     
    352361
    353362//  dprintf(("KERNEL32: AsciiToUnicodeN %s\n", ascii));
    354   if (getUconvObject())
     363  if (uconv_object)
    355364  {
    356365    if (asciilen == 1)
     
    389398  }
    390399}
     400
     401void WIN32API AsciiToUnicodeN(const char *ascii, WCHAR *unicode, int asciilen)
     402{
     403    CodepageToUnicodeN(ascii, unicode, asciilen, GetWindowsUconvObject());
     404}
     405
     406
    391407//******************************************************************************
    392408// Copies the full string from ascii to unicode
Note: See TracChangeset for help on using the changeset viewer.