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 }
222 break;
223
225
226 if (dwControlKeyState &
228 {
234
235 }
236 break;
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 }
255 break;
256
259 {
261 goto DoBackSpace;
262 }
263 break;
264 }
265 }
266
268
270 {
272 DoBackSpace:
273
274 if (
current > 0 && charcount > 0)
275 {
277 {
278
281 {
283 curx--;
284 }
285 else
286 {
290 cury--;
292 }
293 }
294 else
295 {
299 {
301 curx--;
302 }
303 else
304 {
306 cury--;
308 }
312 }
313 charcount--;
315 }
316 break;
317
319
322 break;
323
325
326 if (
current != charcount && charcount > 0)
327 {
330 charcount--;
334 }
335 break;
336
338
340 {
342 curx = orgx;
343 cury = orgy;
345 }
346 break;
347
349
351 {
356 }
357 break;
358
360#ifdef FEATURE_UNIX_FILENAME_COMPLETION
361
365 {
367 {
368
369 tempscreen = charcount;
373
376
377 if (tempscreen > charcount)
378 {
380 for (
count = tempscreen - charcount;
count--; )
383 }
384 else
385 {
386 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
387 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
388 }
389
390
394 }
395 else
396 {
397
398 if (ShowCompletionMatches (
str, charcount))
399 {
403
404
408 }
409
410 }
411 }
412 else
413 {
415 }
416#endif
417#ifdef FEATURE_4NT_FILENAME_COMPLETION
418
419 tempscreen = charcount;
421
422
423
424
426
428 curx = orgx;
429 cury = orgy;
431
432
434
435
438
440
442
443
444 if (tempscreen > charcount)
445 {
447 for(
count = tempscreen - charcount;
count--; )
450 }
451 else
452 {
453 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
454 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
455 }
458#endif
459 break;
460
462 if ((ir.
Event.KeyEvent.dwControlKeyState &
464 {
465
467 break;
468
469
470
471
472
475
476
477
478
479
481 curx = orgx;
482 cury = orgy;
485 }
486 else
487 {
488
490 }
491 break;
492
494
495#ifdef FEATURE_HISTORY
496
499#endif
500 str[charcount++] =
_T(
'\n');
501 str[charcount] =
_T(
'\0');
504 break;
505
507
509 curx = orgx;
510 cury = orgy;
512 break;
513
514#ifdef FEATURE_HISTORY
517#endif
519#ifdef FEATURE_HISTORY
520
524 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
525 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
528#endif
529 break;
530
532#ifdef FEATURE_HISTORY
533
537 if (((charcount + orgx) /
maxx) + orgy >
maxy - 1)
538 orgy +=
maxy - ((charcount + orgx) /
maxx + orgy + 1);
541#endif
542 break;
543
546 {
547
549 {
551 {
553 if (curx == 0)
554 {
555 cury--;
557 }
558 else
559 {
560 curx--;
561 }
562 }
563
565 {
567 if (curx == 0)
568 {
569 cury--;
571 }
572 else
573 {
574 curx--;
575 }
576 }
577
579 }
580 }
581 else
582 {
583
585 {
588 {
591 cury--;
592 }
593 else
594 {
596 curx--;
597 }
598 }
599 else
600 {
602 }
603 }
604 break;
605
608 {
609
611 {
613 {
615 if (curx ==
maxx - 1)
616 {
617 cury++;
618 curx = 0;
619 }
620 else
621 {
622 curx++;
623 }
624 }
625
627 {
629 if (curx ==
maxx - 1)
630 {
631 cury++;
632 curx = 0;
633 }
634 else
635 {
636 curx++;
637 }
638 }
639
641 }
642 }
643 else
644 {
645
647 {
650 {
652 curx = 0;
653 cury++;
654 }
655 else
656 {
658 curx++;
659 }
660 }
661#ifdef FEATURE_HISTORY
662 else
663 {
666 {
671 charcount++;
672 }
673 }
674#endif
675 }
676 break;
677
678 default:
679
681
682 }
683#ifdef _UNICODE
685 if (ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
686#else
688 if ((
UCHAR)ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
689#endif
690 {
691
693 {
694
695
697 if ((tempscreen %
maxx) == (
maxx - 1) &&
698 (tempscreen /
maxx) + cury == (
maxy - 1))
699 {
700 orgy--;
701 cury--;
702 }
703
707 if (curx ==
maxx - 1)
708 curx = 0, cury++;
709 else
710 curx++;
713 charcount++;
714 }
715 else
716 {
718 charcount++;
721 orgy--, cury--;
723 curx = 0, cury++;
724 else
725 curx++;
727 }
728 }
729
730
731 }
732 while (!bReturn);
733
735
736#ifdef FEATURE_ALIASES
737
739#endif
741}
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::@3285 uChar
#define STD_OUTPUT_HANDLE
#define LEFT_CTRL_PRESSED
#define RIGHT_CTRL_PRESSED
#define RIGHT_ALT_PRESSED
BOOL WINAPI MessageBeep(_In_ UINT uType)