Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by fml2 - 2009-04-01
Last edited by fml2 - 2009-04-03

FS#10087 - Improvements to rocklife: file loading; code readability

The patch does the following:

1. Reading of the file is now done char by char. This makes it not dangerous if the file is big
2. Code readability is improved via introducing of get_cell
3. Slight speed improvement in calculating the next generation (n[4] is taken from the previous generation)
4. A first step is made in decoupling of the grid size from the LCD size

Closed by  fml2
2009-04-03 20:26
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Committed in r20610

char is unsigned by default on ARM, so checking buf ⇐ 0 (implicating signed) might be problematic. Shouldn’t it be checking for EOF anyway?

Yes, that sounds right. I am trying to teach myself C on-the-fly, so please make whatever changes seem appropriate and I will learn by example.

fml2 commented on 2009-04-02 21:24

@kugel: read returns the number of bytes read, or 0 on EOF, or a negative value on error. The return value is stored in an int and then tested. Where do you see a problem?

fml2 commented on 2009-04-02 21:56

Sync to r20608

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing