1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
t_toto_index *toto_ntohl(t_toto_index *src)
{
uint32_t tmp;
size_t i;
src->id = ntohl(src->id);
src->info.LANG = ntohl(src->info.LANG);
src->info.MODE = ntohl(src->info.MODE);
src->info.OS = ntohl(src->info.OS);
src->info.TYPE = ntohl(src->info.TYPE);
src->info.size = ntohl(src->info.size);
src->info.perms = ntohl(src->info.perms);
src->info.start_offset = ntohl(src->info.start_offset);
for (i = 0; i < sizeof(src->fullPath); ++i) {
memcpy(&tmp, src->fullPath + i,sizeof (tmp));
tmp = ntohl(tmp) ;
memcpy(src->fullPath + i, &tmp, sizeof (tmp));
}
return src;
} |
Partager