Ignore:
Timestamp:
Aug 10, 2000, 4:19:58 AM (25 years ago)
Author:
phaller
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/console.cpp

    r3894 r3976  
    1 /* $Id: console.cpp,v 1.20 2000-07-25 18:22:47 sandervl Exp $ */
     1/* $Id: console.cpp,v 1.21 2000-08-10 02:19:54 phaller Exp $ */
    22
    33/*
     
    27682768               nSize);
    27692769
    2770   /* @@@PH Ascii2Unicode */
    2771 
    27722770  return (nSize < ulLength) ? nSize : ulLength;
    27732771}
     
    37003698 *****************************************************************************/
    37013699
    3702 BOOL WIN32API SetConsoleTitleW(LPTSTR lpszTitle)
     3700BOOL WIN32API SetConsoleTitleW(LPWSTR lpszTitle)
    37033701{
    37043702#ifdef DEBUG_LOCAL2
     
    37073705#endif
    37083706
    3709   /* @@@PH Unicode2Ascii */
    3710 
     3707  if (lpszTitle == NULL)                                 /* check parameters */
     3708    return FALSE;
     3709 
    37113710  if (ConsoleGlobals.pszWindowTitle != NULL)           /* previously set name */
    37123711    free (ConsoleGlobals.pszWindowTitle);                     /* then free it */
    3713 
    3714   ConsoleGlobals.pszWindowTitle = strdup(lpszTitle);     /* copy the new name */
     3712 
     3713  /* create an ascii copy of the lpszTitle */
     3714  int iLength = UniStrlen(lpszTitle);
     3715 
     3716  ConsoleGlobals.pszWindowTitle = (PSZ)malloc(iLength+1);
     3717  ConsoleGlobals.pszWindowTitle[iLength] = 0;
     3718  lstrcpynWtoA(ConsoleGlobals.pszWindowTitle,
     3719               lpszTitle,
     3720               iLength);
    37153721
    37163722  WinSetWindowText(ConsoleGlobals.hwndFrame,           /* set new title text */
Note: See TracChangeset for help on using the changeset viewer.