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/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
Note: See TracChangeset for help on using the changeset viewer.