Changeset 3976 for trunk/src/kernel32


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

.

Location:
trunk/src/kernel32
Files:
5 edited

Legend:

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

    r2984 r3976  
    1 /* $Id: conin.cpp,v 1.9 2000-03-03 11:15:57 sandervl Exp $ */
     1/* $Id: conin.cpp,v 1.10 2000-08-10 02:19:53 phaller Exp $ */
    22
    33/*
     
    149149          {
    150150            // continue until buffer full or CR entered
     151            // Note: CRLF is actually returned at the end of the buffer!
    151152            if (InputRecord.Event.KeyEvent.uChar.AsciiChar == 0x0d)
    152153              fLoop = FALSE;
    153154          }
    154155          else
    155             fLoop = FALSE; // return on any single key in buffer :)
     156            // return on any single key in buffer :)
     157            // fLoop = FALSE;
     158            // @@@PH 2000/08/10 changed behaviour to return ALL input events
     159            // recorded in the console.
     160            fLoop = (iConsoleInputQueryEvents() != 0);
    156161
    157162          // record key stroke
     
    162167            {
    163168              case 0x03: // ctrl-c is filtered!
    164               case 0x0a: // LF
     169                // @@@PH we're supposed to call a ctrl-c break handler here!
     170                break;
     171             
    165172              case 0x0d: // CR
    166                 // do NOT insert those keys into the resulting buffer
     173                // CR is automatically expanded to CRLF if in line input mode!
     174                if (pConsoleInput->dwConsoleMode & ENABLE_LINE_INPUT)
     175                {
     176                  *pszTarget = 0x0d; // CR
     177                  pszTarget++;
     178                  ulCounter++;
     179                  if (ulCounter < nNumberOfBytesToRead)  // check for room
     180                  {
     181                    *pszTarget = 0x0a; // LF
     182                    pszTarget++;
     183                    ulCounter++;
     184                  }
     185                 
     186                  if (pConsoleInput->dwConsoleMode & ENABLE_ECHO_INPUT)
     187                    HMWriteFile(pConsoleGlobals->hConsoleBuffer,
     188                        pszTarget-2,
     189                        2,
     190                        &ulPostCounter,                      /* dummy result */
     191                        NULL);
     192                 
     193                }
     194             
    167195                break;
    168196
  • 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 */
  • trunk/src/kernel32/console2.h

    r3804 r3976  
    1 /* $Id: console2.h,v 1.8 2000-07-06 21:18:41 sandervl Exp $ */
     1/* $Id: console2.h,v 1.9 2000-08-10 02:19:56 phaller Exp $ */
    22
    33/*
     
    620620BOOL   WIN32API SetConsoleTitleA              (LPTSTR        lpszTitle);
    621621
    622 BOOL   WIN32API SetConsoleTitleW              (LPTSTR        lpszTitle);
     622BOOL   WIN32API SetConsoleTitleW              (LPWSTR        lpszTitle);
    623623
    624624BOOL   WIN32API SetConsoleWindowInfo          (HANDLE        hConsoleOutput,
  • trunk/src/kernel32/heapstring.cpp

    r3815 r3976  
    1 /* $Id: heapstring.cpp,v 1.30 2000-07-10 18:38:51 sandervl Exp $ */
     1/* $Id: heapstring.cpp,v 1.31 2000-08-10 02:19:57 phaller Exp $ */
    22
    33/*
     
    524524                         (void**)&out_buf, &out_bytes_left,
    525525                         &num_subs);
    526 
     526   
     527    /* @@@PH 2000/08/10
     528     * this causes the last character in the converted
     529     * target string to be chopped off. I.e. causes CMD.EXE
     530     * to loose the CRLF functionality.
     531     */
     532     /*
    527533    unilen -= 1+out_bytes_left; //end + left bytes
    528534    astring[unilen] = 0; //terminate
     535    */
    529536
    530537    return unilen; //length of string (excluding terminator)
     
    621628                        &out_buf,        &uni_chars_left,
    622629                        &num_subs );
    623 
     630   
     631    /* @@@PH 2000/08/10
     632     * this causes the last character in the converted
     633     * target string to be chopped off. I.e. causes CMD.EXE
     634     * to enter command correctly.
     635     */
     636    /*
    624637    asciilen -= 1+uni_chars_left; //end + left bytes
    625638
    626639    unicode[asciilen] = 0; // always terminate string
     640    */
     641     
    627642    return asciilen; //length of string (excluding terminator)
    628643  }
  • trunk/src/kernel32/oslibdos.cpp

    r3819 r3976  
    1 /* $Id: oslibdos.cpp,v 1.35 2000-07-12 18:21:45 sandervl Exp $ */
     1/* $Id: oslibdos.cpp,v 1.36 2000-08-10 02:19:58 phaller Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    18571857
    18581858   fsname = (char *)&fsinfo->szName[0] + fsinfo->cbName + 1;
     1859 
     1860  /* @@@PH 2000/08/10 CMD.EXE querys with nFileSystemNameSize == 0
     1861   * however does NOT expect to receive an error.
     1862   */
     1863   strncpy(lpFileSystemNameBuffer,
     1864           fsname,
     1865           nFileSystemNameSize);
     1866  /*
    18591867   if(strlen(fsname) < nFileSystemNameSize) {
    18601868        strcpy(lpFileSystemNameBuffer, fsname);
    18611869   }
    18621870   else return ERROR_BUFFER_OVERFLOW_W;
     1871   */
    18631872   return 0;
    18641873}
Note: See TracChangeset for help on using the changeset viewer.