1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include "tar.h" const char* tar_filename(struct tar_header *file) { return file->filename; } int tar_filesize(struct tar_header *file) { int r = 0; const char *oct = file->size; for(; *oct; oct++) r = (r * 8) + (*oct - '0'); return r; }