shithub: scc

ref: a2e3a665294b6d10575f0108a5ec56ead724ae17
dir: /lib/coff32/coff32_unpack_hdr.c/

View raw version

#include <assert.h>

#include "../../inc/coff32/filehdr.h"
#include "../../inc/coff32/coff32.h"

void
coff32_unpack_hdr(packfun fun, unsigned char *buff, FILHDR *hdr)
{
	int n;

	n = (*fun)(buff,
	           "sslllss",
	           &hdr->f_magic,
	           &hdr->f_nscns,
	           &hdr->f_timdat,
	           &hdr->f_symptr,
	           &hdr->f_nsyms,
	           &hdr->f_opthdr,
	           &hdr->f_flags);
	assert(n == FILHSZ);
}