Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Dereferencing Coding Help

Dereferencing Coding Help

From: Benjamin <mailinglists_at_samuraipanda.com>
Date: Sat, 4 Jan 2003 12:55:30 -0800

Hi all,
I'm trying to implement a bookmark capability in RockBox, but I'm
running into a problem. Below is the code snippet. When I compile
with this, I recieve the error "dereferencing pointer to incomplete
type" at the write line. I'm not sure why. Any help is appreciated.


Thanks,
Ben


***Code***

void CreateBookmark(void)
{
  int f;
  f = open ("/bookmark.txt", O_RDWR | O_CREAT | O_TRUNC);
  if(f >= 0)
  {
          struct mp3entry *id3 = NULL;
          id3 = mpeg_current_track();
            write (f, id3->path, MAX_PATH); // <--Error causing line
           close (f);
  }
  else
  {
    bool done = false;
    int key;
    while(!done)
    {
            char buffer[40];
            snprintf(buffer, sizeof(buffer), " Failed: %2d", f);
        int y=0;
        lcd_clear_display();
        lcd_puts(0, y++, buffer);
        lcd_update();

        /* Wait for a key to be pushed */
        key = button_get_w_tmo(HZ*5);
        switch(key)
        {
            case BUTTON_LEFT | BUTTON_REL:
            case BUTTON_OFF | BUTTON_REL:
                done = true;
                break;
        }
    }

  }

}
Received on 2003-01-04

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy