139{
150 DWORD dwControlKeyState;
151#ifdef FEATURE_UNIX_FILENAME_COMPLETION
153#endif
157#ifdef FEATURE_4NT_FILENAME_COMPLETION
159#endif
160#ifdef FEATURE_HISTORY
161
163#endif
164
166 {
167
171 do
172 {
175#ifdef _UNICODE
177#endif
178 } while (chr != '\n' && charcount < maxlen);
179 str[charcount] =
_T(
'\0');
181 }
182
183
186
189
191
193
194 do
195 {
198
200
201 if (dwControlKeyState &
204 {
206 {
207#ifdef FEATURE_HISTORY
209
210 if (dwControlKeyState &
212 {
215
218 curx = orgx;
219 cury = orgy;
220
221 break;
222 }
223
225
226 if (dwControlKeyState &
228 {
234
235 break;
236 }
237#endif
238
240
241 if (dwControlKeyState &
243 {
244
245#ifdef FEATURE_HISTORY
246
249#endif
250 str[charcount++] =
_T(
'\n');
251 str[charcount] =
_T(
'\0');
254 break;
255 }
256 }
257 }
258
260
262 {
264
265 if (
current > 0 && charcount > 0)
266 {
268 {
269
272 {
274 curx--;
275 }
276 else
277 {
281 cury--;
283 }
284 }
285 else
286 {
290 {
292 curx--;
293 }
294 else
295 {
297 cury--;
299 }
303 }
304 charcount--;
306 }
307 break;
308
310
313 break;
314
316
317 if (
current != charcount && charcount > 0)
318 {
321 charcount--;
325 }
326 break;
327
329
331 {
333 curx = orgx;
334 cury = orgy;
336 }
337 break;
338
340
342 {
347 }
348 break;
349
351#ifdef FEATURE_UNIX_FILENAME_COMPLETION
352
356 {
358 {
359
360 tempscreen = charcount;
364
367
368 if (tempscreen > charcount)
369 {
371 for (
count = tempscreen - charcount;
count--; )
374 }
375 else
376 {
377 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
378 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
379 }
380
381
385 }
386 else
387 {
388
389 if (ShowCompletionMatches (
str, charcount))
390 {
394
395
399 }
400
401 }
402 }
403 else
404 {
406 }
407#endif
408#ifdef FEATURE_4NT_FILENAME_COMPLETION
409
410 tempscreen = charcount;
412
413
414
415
417
419 curx = orgx;
420 cury = orgy;
422
423
425
426
429
431
433
434
435 if (tempscreen > charcount)
436 {
438 for(
count = tempscreen - charcount;
count--; )
441 }
442 else
443 {
444 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
445 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
446 }
449#endif
450 break;
451
453 if ((ir.
Event.KeyEvent.dwControlKeyState &
455 {
456
458 break;
459
460
461
462
463
466
467
468
469
470
472 curx = orgx;
473 cury = orgy;
476 }
477 else
478 {
479
481 }
482 break;
483
485
486#ifdef FEATURE_HISTORY
487
490#endif
491 str[charcount++] =
_T(
'\n');
492 str[charcount] =
_T(
'\0');
495 break;
496
498
500 curx = orgx;
501 cury = orgy;
503 break;
504
505#ifdef FEATURE_HISTORY
508#endif
510#ifdef FEATURE_HISTORY
511
515 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
516 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
519#endif
520 break;
521
523#ifdef FEATURE_HISTORY
524
528 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
529 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
532#endif
533 break;
534
537 {
538
540 {
542 {
544 if (curx == 0)
545 {
546 cury--;
548 }
549 else
550 {
551 curx--;
552 }
553 }
554
556 {
558 if (curx == 0)
559 {
560 cury--;
562 }
563 else
564 {
565 curx--;
566 }
567 }
568
570 }
571 }
572 else
573 {
574
576 {
579 {
582 cury--;
583 }
584 else
585 {
587 curx--;
588 }
589 }
590 else
591 {
593 }
594 }
595 break;
596
599 {
600
602 {
604 {
606 if (curx ==
maxx - 1)
607 {
608 cury++;
609 curx = 0;
610 }
611 else
612 {
613 curx++;
614 }
615 }
616
618 {
620 if (curx ==
maxx - 1)
621 {
622 cury++;
623 curx = 0;
624 }
625 else
626 {
627 curx++;
628 }
629 }
630
632 }
633 }
634 else
635 {
636
638 {
641 {
643 curx = 0;
644 cury++;
645 }
646 else
647 {
649 curx++;
650 }
651 }
652#ifdef FEATURE_HISTORY
653 else
654 {
657 {
662 charcount++;
663 }
664 }
665#endif
666 }
667 break;
668
669 default:
670
672
673 }
674#ifdef _UNICODE
676 if (ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
677#else
679 if ((
UCHAR)ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
680#endif
681 {
682
684 {
685
686
688 if ((tempscreen %
maxx) == (
maxx - 1) &&
689 (tempscreen /
maxx) + cury == (
maxy - 1))
690 {
691 orgy--;
692 cury--;
693 }
694
698 if (curx ==
maxx - 1)
699 curx = 0, cury++;
700 else
701 curx++;
704 charcount++;
705 }
706 else
707 {
709 charcount++;
712 orgy--, cury--;
714 curx = 0, cury++;
715 else
716 curx++;
718 }
719 }
720
721
722 }
723 while (!bReturn);
724
726
727#ifdef FEATURE_ALIASES
728
730#endif
732}
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
BOOL WINAPI GetConsoleScreenBufferInfo(IN HANDLE hConsoleOutput, OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
VOID ExpandAlias(LPTSTR cmd, INT maxlen)
VOID GetCursorXY(PSHORT x, PSHORT y)
VOID ConInKey(PINPUT_RECORD lpBuffer)
VOID SetCursorType(BOOL bInsert, BOOL bVisible)
#define ConOutPrintf(szStr,...)
VOID History_move_to_bottom(VOID)
VOID History(INT dir, LPTSTR commandline)
VOID History_del_current_entry(LPTSTR str)
LPCTSTR PeekHistory(INT dir)
#define ReadFile(a, b, c, d, e)
#define MultiByteToWideChar
VOID CompleteFilename(LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
struct task_struct * current
union _KEY_EVENT_RECORD::@3258 uChar
#define STD_OUTPUT_HANDLE
#define LEFT_CTRL_PRESSED
#define RIGHT_CTRL_PRESSED
#define RIGHT_ALT_PRESSED
BOOL WINAPI MessageBeep(_In_ UINT uType)