[haiku-bugs] Re: [Haiku] #5535: Save window pos and size with all text file

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Thu, 06 May 2010 15:50:00 -0000

#5535: Save window pos and size with all text file
--------------------------------------+-------------------------------------
  Reporter:  humdinger                |       Owner:  axeld         
      Type:  enhancement              |      Status:  closed        
  Priority:  normal                   |   Milestone:  R1            
 Component:  Applications/StyledEdit  |     Version:  R1/Development
Resolution:  fixed                    |    Keywords:                
 Blockedby:                           |    Platform:  All           
  Blocking:                           |  
--------------------------------------+-------------------------------------
Changes (by axeld):

  * status:  in-progress => closed
  * resolution:  => fixed


Comment:

 Thanks! Looks almost good, in any case I've applied it in r36656.

 Besides minor coding style issues like lines longer than 80 columns, and
 two blank lines between functions, there was one actual issue that I
 changed: the Haiku API does usually not return -1 on error, but returns
 the error directly (which are negative in Haiku). Therefore, you must
 never check against -1 (that would be a specific error, in this case
 B_ERROR), but only check if the return value is not B_OK, or in a case
 where the actually transferred bytes are returned, check for < 0.

 In r36659 I've improved your patch to be endian aware - Haiku should be
 able to run on big endian platforms, so this is something to keep in mind
 for all on-disk storage.

 Also, I'm now checking if the values read actually make sense, and fit on
 the screen.
 This is something one should always do when importing data from an
 external source.

 Anyway, thanks for your patch!

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

Other related posts: