Changeset 1484 for trunk/src/kernel32/conbuffer.cpp
- Timestamp:
- Oct 27, 1999, 8:36:36 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/conbuffer.cpp
r297 r1484 1 /* $Id: conbuffer.cpp,v 1. 4 1999-07-12 17:45:50phaller Exp $ */1 /* $Id: conbuffer.cpp,v 1.5 1999-10-27 18:36:33 phaller Exp $ */ 2 2 3 3 /* … … 18 18 #endif 19 19 20 #undef DEBUG_LOCAL21 #undef DEBUG_LOCAL220 //#undef DEBUG_LOCAL 21 //#undef DEBUG_LOCAL2 22 22 23 23 … … 73 73 #include "ConBuffer.H" 74 74 #include "Console2.h" 75 #include <heapstring.h> 75 76 76 77 … … 289 290 290 291 case 8: /* Backspace */ 292 // not correct if deleting expanded tab character 291 293 if (pConsoleBuffer->coordCursorPosition.X > 0) 292 294 pConsoleBuffer->coordCursorPosition.X--; 295 296 //@@@PH overwrite old character 297 *(pConsoleBuffer->ppszLine[pConsoleBuffer->coordCursorPosition.Y] + 298 pConsoleBuffer->coordCursorPosition.X * 2) = 0x20; 293 299 break; 294 300 … … 319 325 break; 320 326 327 case 13: /* CARRIAGE RETURN */ 328 pConsoleBuffer->coordCursorPosition.X = 0; 329 //@@@PH test break; 330 321 331 case 10: /* LINEFEED */ 322 332 pConsoleBuffer->coordCursorPosition.Y++; … … 329 339 pConsoleBuffer->coordCursorPosition.Y--; 330 340 } 331 break;332 333 case 13: /* CARRIAGE RETURN */334 pConsoleBuffer->coordCursorPosition.X = 0;335 341 break; 336 342 … … 2521 2527 { 2522 2528 PCONSOLEBUFFER pConsoleBuffer = (PCONSOLEBUFFER)pHMHandleData->lpHandlerData; 2529 DWORD rc; 2530 LPSTR pszAscii; 2523 2531 2524 2532 #ifdef DEBUG_LOCAL2 … … 2531 2539 #endif 2532 2540 2533 /* @@@PH AScii -> unicode translation */ 2541 /* Ascii -> unicode translation */ 2542 pszAscii = (LPSTR)HEAP_malloc(cchToWrite); 2543 if (pszAscii == NULL) 2544 return ERROR_NOT_ENOUGH_MEMORY; 2545 2546 lstrcpynWtoA(pszAscii, (LPWSTR)lpvBuffer, cchToWrite); 2534 2547 2535 2548 /* simply forward the request to that routine */ 2536 return (HMDeviceConsoleBufferClass::WriteFile(pHMHandleData, 2537 lpvBuffer, 2538 cchToWrite, 2539 lpcchWritten, 2540 NULL)); 2549 rc = HMDeviceConsoleBufferClass::WriteFile(pHMHandleData, 2550 pszAscii, 2551 cchToWrite, 2552 lpcchWritten, 2553 NULL); 2554 // free memory again 2555 HEAP_free(pszAscii); 2556 return (rc); 2541 2557 } 2542 2558
Note:
See TracChangeset
for help on using the changeset viewer.