mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-11 22:22:33 -05:00
Unify fourcc macro and some style changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23664 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
556daaf34a
commit
2e28c1853b
8 changed files with 79 additions and 75 deletions
|
|
@ -60,15 +60,16 @@ struct real_object_t
|
|||
uint16_t version;
|
||||
};
|
||||
|
||||
#define FOURCC(a,b,c,d) (((a)<<24) | ((b) << 16) | ((c) << 8) | (d))
|
||||
|
||||
static int real_read_object_header(int fd, struct real_object_t* obj)
|
||||
{
|
||||
int n;
|
||||
|
||||
if ((n = read_uint32be(fd, &obj->fourcc)) <= 0) return n;
|
||||
if ((n = read_uint32be(fd, &obj->size)) <= 0) return n;
|
||||
if ((n = read_uint16be(fd, &obj->version)) <= 0) return n;
|
||||
if ((n = read_uint32be(fd, &obj->fourcc)) <= 0)
|
||||
return n;
|
||||
if ((n = read_uint32be(fd, &obj->size)) <= 0)
|
||||
return n;
|
||||
if ((n = read_uint16be(fd, &obj->version)) <= 0)
|
||||
return n;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue