Don't save and restore previous mode in trap handlers. This allows us to
call KeGetPreviousMode() from exception handlers and get the right
value.
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
_____
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
--- trunk/reactos/ntoskrnl/ke/i386/trap.s 2005-08-05 17:28:17 UTC
(rev 17073)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s 2005-08-05 18:26:43 UTC
(rev 17074)
@@ -45,13 +45,8 @@
popl %edx
popl %ecx
popl %eax
-
- /* Restore the old previous mode */
popl %ebx
- cmpl $0, %esi
- je .L7
- movb %bl, %ss:KTHREAD_PREVIOUS_MODE(%esi)
-.L7:
+
/* Restore the old exception handler list */
popl %ebx
movl %ebx, %fs:KPCR_EXCEPTION_LIST
@@ -140,13 +135,6 @@
/* Set the new previous mode based on the saved CS selector */
movl KTRAP_FRAME_CS(%ebp), %eax
andl $0x0000FFFF, %eax
- cmpl $KERNEL_CS, %eax
- jne .L1
- movb $KernelMode, KTHREAD_PREVIOUS_MODE(%edi)
- jmp .L3
-.L1:
- movb $UserMode, KTHREAD_PREVIOUS_MODE(%edi)
-.L3:
/* Save the old trap frame. */
movl KTHREAD_TRAP_FRAME(%edi), %edx
Fixes a bug which disallows tab complete on empty input and a sorting
bug which didnt account for locale by Brandon Turner
Modified: trunk/reactos/subsys/system/cmd/filecomp.c
_____
Modified: trunk/reactos/subsys/system/cmd/filecomp.c
--- trunk/reactos/subsys/system/cmd/filecomp.c 2005-08-05 10:35:32 UTC
(rev 17069)
+++ trunk/reactos/subsys/system/cmd/filecomp.c 2005-08-05 15:40:53 UTC
(rev 17070)
@@ -413,7 +413,7 @@
szSearch = szSearch1;
/* Move one char past */
szSearch++;
- szSearch[0] = _T('\0');
+ szSearch[0] = _T('\0');
_tcscpy(szPrefix,str);
return;
@@ -501,7 +501,8 @@
memcpy(File1,arg1,sizeof(FileName));
memcpy(File2,arg2,sizeof(FileName));
- ret = _tcsicmp(File1->Name, File2->Name);
+ /* ret = _tcsicmp(File1->Name, File2->Name); */
+ ret = lstrcmpi(File1->Name, File2->Name);
free(File1);
free(File2);
@@ -552,17 +553,19 @@
str[cusor] = _T('\0');
/* Look to see if they hit tab again, if so cut off the diff
length */
- if(_tcscmp(str,LastReturned))
+ if(_tcscmp(str,LastReturned) || !_tcslen(str))
{
/* We need to know how many chars we added from the start */
StartLength = _tcslen(str);
/* no string, we need all files in that directory */
if(!StartLength)
+ {
_tcscat(str,_T("*"));
+ }
/* Zero it out first */
- szBaseWord[0] = _T('\0');
+ szBaseWord[0] = _T('\0');
szPrefix[0] = _T('\0');
/*What comes out of this needs to be: