Changeset 3976 for trunk/src/kernel32
- Timestamp:
- Aug 10, 2000, 4:19:58 AM (25 years ago)
- 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 sandervlExp $ */1 /* $Id: conin.cpp,v 1.10 2000-08-10 02:19:53 phaller Exp $ */ 2 2 3 3 /* … … 149 149 { 150 150 // continue until buffer full or CR entered 151 // Note: CRLF is actually returned at the end of the buffer! 151 152 if (InputRecord.Event.KeyEvent.uChar.AsciiChar == 0x0d) 152 153 fLoop = FALSE; 153 154 } 154 155 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); 156 161 157 162 // record key stroke … … 162 167 { 163 168 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 165 172 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 167 195 break; 168 196 -
trunk/src/kernel32/console.cpp
r3894 r3976 1 /* $Id: console.cpp,v 1.2 0 2000-07-25 18:22:47 sandervlExp $ */1 /* $Id: console.cpp,v 1.21 2000-08-10 02:19:54 phaller Exp $ */ 2 2 3 3 /* … … 2768 2768 nSize); 2769 2769 2770 /* @@@PH Ascii2Unicode */2771 2772 2770 return (nSize < ulLength) ? nSize : ulLength; 2773 2771 } … … 3700 3698 *****************************************************************************/ 3701 3699 3702 BOOL WIN32API SetConsoleTitleW(LP TSTR lpszTitle)3700 BOOL WIN32API SetConsoleTitleW(LPWSTR lpszTitle) 3703 3701 { 3704 3702 #ifdef DEBUG_LOCAL2 … … 3707 3705 #endif 3708 3706 3709 /* @@@PH Unicode2Ascii */ 3710 3707 if (lpszTitle == NULL) /* check parameters */ 3708 return FALSE; 3709 3711 3710 if (ConsoleGlobals.pszWindowTitle != NULL) /* previously set name */ 3712 3711 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); 3715 3721 3716 3722 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 sandervlExp $ */1 /* $Id: console2.h,v 1.9 2000-08-10 02:19:56 phaller Exp $ */ 2 2 3 3 /* … … 620 620 BOOL WIN32API SetConsoleTitleA (LPTSTR lpszTitle); 621 621 622 BOOL WIN32API SetConsoleTitleW (LP TSTR lpszTitle);622 BOOL WIN32API SetConsoleTitleW (LPWSTR lpszTitle); 623 623 624 624 BOOL WIN32API SetConsoleWindowInfo (HANDLE hConsoleOutput, -
trunk/src/kernel32/heapstring.cpp
r3815 r3976 1 /* $Id: heapstring.cpp,v 1.3 0 2000-07-10 18:38:51 sandervlExp $ */1 /* $Id: heapstring.cpp,v 1.31 2000-08-10 02:19:57 phaller Exp $ */ 2 2 3 3 /* … … 524 524 (void**)&out_buf, &out_bytes_left, 525 525 &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 /* 527 533 unilen -= 1+out_bytes_left; //end + left bytes 528 534 astring[unilen] = 0; //terminate 535 */ 529 536 530 537 return unilen; //length of string (excluding terminator) … … 621 628 &out_buf, &uni_chars_left, 622 629 &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 /* 624 637 asciilen -= 1+uni_chars_left; //end + left bytes 625 638 626 639 unicode[asciilen] = 0; // always terminate string 640 */ 641 627 642 return asciilen; //length of string (excluding terminator) 628 643 } -
trunk/src/kernel32/oslibdos.cpp
r3819 r3976 1 /* $Id: oslibdos.cpp,v 1.3 5 2000-07-12 18:21:45 sandervlExp $ */1 /* $Id: oslibdos.cpp,v 1.36 2000-08-10 02:19:58 phaller Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 1857 1857 1858 1858 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 /* 1859 1867 if(strlen(fsname) < nFileSystemNameSize) { 1860 1868 strcpy(lpFileSystemNameBuffer, fsname); 1861 1869 } 1862 1870 else return ERROR_BUFFER_OVERFLOW_W; 1871 */ 1863 1872 return 0; 1864 1873 }
Note:
See TracChangeset
for help on using the changeset viewer.