[haiku-bugs] Re: [Haiku] #6227: Terminal TermParse::EscParse() 2 issues.

  • From: "jackburton" <trac@xxxxxxxxxxxx>
  • Date: Thu, 15 Jul 2010 09:19:27 -0000

#6227: Terminal TermParse::EscParse() 2 issues.
------------------------------------+---------------------------------------
  Reporter:  h.z                    |         Owner:  jackburton
      Type:  bug                    |        Status:  new       
  Priority:  normal                 |     Milestone:  R1        
 Component:  Applications/Terminal  |       Version:  R1/alpha2 
Resolution:                         |      Keywords:            
Blocked By:                         |   Has a Patch:  1         
  Platform:  All                    |      Blocking:            
------------------------------------+---------------------------------------

Comment (by jackburton):

 First of all: sorry to reply this late, and thanks for working on this!
 I tried to apply the patch but doesn't applies cleanly. I'm applying it
 manually.
 Only, I can't understand some of the comparison in TermParse.cpp:

 if ((c > 0xA1 && c < 0xA9)
  || (c>0xB0 && c< 0xF7)
  || (c>0x81 && c< 0xA0)
  || (c>0xAA && c< 0xFE)
  || (c>0xA8 && c< 0xA9))

 Besides that the comparisons would be more readable if they were done in
 order (first 0x81, then 0xA1, etc), the last case (c>0xA8 && c< 0xA9)
 seems to be covered already by the first check (c > 0xA1 && c < 0xA9), and
 there are other checks which overlap (c>0xB0 && c< 0xF7) vs (c>0xAA && c<
 0xFE) so I'm not sure if I understand this.
 Then there is some coding style violations (parenthesis go to the end of
 the line, missing spaces between "c" and ">", etc.)

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6227#comment:6>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: