Re: [2/2] ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 7]

2008-06-26 Thread Zac Brown
Zac Brown wrote: > Add checking for control characters in both standard and byte-reversed > forms to (Rtl)IsTextUnicode. > > Changelog: > * Add if-statement to ensure we only found control characters in the > first 256 indices. If we found them beyond that, we don't care since > Windows doesn't

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]

2008-06-20 Thread Roy Shea
Hello Zac, > Does anyone have feedback on whether they believe the tests for normal > control characters vs reversed control characters should be mutually > exlusive? I took a look at the documentation. My read is that the tests are not mutually exclusive. Given your current version and my read

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]

2008-06-19 Thread Zac Brown
Michael Karcher wrote: > Am Donnerstag, den 19.06.2008, 12:52 -0700 schrieb Zac Brown: >> - Because these tests are mutually exclusive, a single goto label suffices >> for >> breaking the loop. > > As written, your tests are not mutually exclusive. It could happen that > flags has IS_TEXT_UNICOD

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]

2008-06-19 Thread Zac Brown
Zac Brown wrote: > Michael Karcher wrote: >> Am Donnerstag, den 19.06.2008, 12:52 -0700 schrieb Zac Brown: >>> - Because these tests are mutually exclusive, a single goto label suffices >>> for >>> breaking the loop. >> As written, your tests are not mutually exclusive. It could happen that >> fl

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]

2008-06-19 Thread Zac Brown
Michael Karcher wrote: > Am Donnerstag, den 19.06.2008, 12:52 -0700 schrieb Zac Brown: >> - Because these tests are mutually exclusive, a single goto label suffices >> for >> breaking the loop. > > As written, your tests are not mutually exclusive. It could happen that > flags has IS_TEXT_UNICOD

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]

2008-06-19 Thread Michael Karcher
Am Donnerstag, den 19.06.2008, 12:52 -0700 schrieb Zac Brown: > - Because these tests are mutually exclusive, a single goto label suffices > for > breaking the loop. As written, your tests are not mutually exclusive. It could happen that flags has IS_TEXT_UNICODE_CONTROLS and IS_TEXT_UNICODE_REV

Re: ntdll: rtlstr.c: Implement checking for control characters in, RtlIsTextUnicode [try 3]

2008-06-19 Thread Zac Brown
Zac Brown wrote: > Implement setting of IS_TEXT_UNICODE_CONTROLS and > IS_TEXT_UNICODE_REVERSE_CONTROLS when control characters are present in > RtlIsTextUnicode. > > -Zac Brown > > > > > --- > dlls/ntdll/rtlstr.c

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 2]

2008-06-19 Thread Zac Brown
John Klehm wrote: > On Wed, Jun 18, 2008 at 7:02 PM, Zac Brown <[EMAIL PROTECTED]> wrote: >> Implement setting of IS_TEXT_UNICODE_CONTROLS and >> IS_TEXT_UNICODE_REVERSE_CONTROLS when control characters are present >> in RtlIsTextUnicode. >> >> > > Just a minor point: AFAIK the rule is to use C s

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 2]

2008-06-19 Thread Zac Brown
Dan Kegel wrote: > The array doesn't make much sense if you're not going to iterate over it. > It might be more readable if you replaced the array and long if > with a switch statement. > It would be nice to break out of the loop early. > The last two suggestions together kind of mean a goto, which

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 2]

2008-06-19 Thread John Klehm
On Wed, Jun 18, 2008 at 7:02 PM, Zac Brown <[EMAIL PROTECTED]> wrote: > Implement setting of IS_TEXT_UNICODE_CONTROLS and > IS_TEXT_UNICODE_REVERSE_CONTROLS when control characters are present > in RtlIsTextUnicode. > > Just a minor point: AFAIK the rule is to use C style /* comments */ only. --

re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 2]

2008-06-19 Thread Dan Kegel
The array doesn't make much sense if you're not going to iterate over it. It might be more readable if you replaced the array and long if with a switch statement. It would be nice to break out of the loop early. The last two suggestions together kind of mean a goto, which is ugly, but not too uncom

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode

2008-06-18 Thread Zac Brown
Zac Brown wrote: > Implement setting of IS_TEXT_UNICODE_CONTROLS and > IS_TEXT_UNICODE_REVERSE_CONTROLS when control characters are present > in RtlIsTextUnicode. > > > > > --- > dlls/ntdll/rtlstr.c | 54 > ++

Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode

2008-06-18 Thread James Hawkins
On Wed, Jun 18, 2008 at 5:10 PM, Zac Brown <[EMAIL PROTECTED]> wrote: > Implement setting of IS_TEXT_UNICODE_CONTROLS and > IS_TEXT_UNICODE_REVERSE_CONTROLS when control characters are present > in RtlIsTextUnicode. > You've mixed tabs and spaces in this patch. -- James Hawkins