Lines Matching refs:header

102 	tar_header *header = (tar_header *) buf;  in phar_is_tar()  local
103 php_uint32 checksum = phar_tar_number(header->checksum, sizeof(header->checksum)); in phar_is_tar()
105 char save[sizeof(header->checksum)], *bname; in phar_is_tar()
112 memcpy(save, header->checksum, sizeof(header->checksum)); in phar_is_tar()
113 memset(header->checksum, ' ', sizeof(header->checksum)); in phar_is_tar()
115 memcpy(header->checksum, save, sizeof(header->checksum)); in phar_is_tar()
700 tar_header header; in phar_tar_writeheaders() local
720 memset((char *) &header, 0, sizeof(header)); in phar_tar_writeheaders()
740 memcpy(header.prefix, entry->filename, boundary - entry->filename); in phar_tar_writeheaders()
741 memcpy(header.name, boundary + 1, entry->filename_len - (boundary + 1 - entry->filename)); in phar_tar_writeheaders()
743 memcpy(header.name, entry->filename, entry->filename_len); in phar_tar_writeheaders()
746 phar_tar_octal(header.mode, entry->flags & PHAR_ENT_PERM_MASK, sizeof(header.mode)-1); in phar_tar_writeheaders()
748 if (FAILURE == phar_tar_octal(header.size, entry->uncompressed_filesize, sizeof(header.size)-1)) { in phar_tar_writeheaders()
755 if (FAILURE == phar_tar_octal(header.mtime, entry->timestamp, sizeof(header.mtime)-1)) { in phar_tar_writeheaders()
763 header.typeflag = entry->tar_type; in phar_tar_writeheaders()
766 strncpy(header.linkname, entry->link, strlen(entry->link)); in phar_tar_writeheaders()
769 strncpy(header.magic, "ustar", sizeof("ustar")-1); in phar_tar_writeheaders()
770 strncpy(header.version, "00", sizeof("00")-1); in phar_tar_writeheaders()
771 strncpy(header.checksum, " ", sizeof(" ")-1); in phar_tar_writeheaders()
772 entry->crc32 = phar_tar_checksum((char *)&header, sizeof(header)); in phar_tar_writeheaders()
774 if (FAILURE == phar_tar_octal(header.checksum, entry->crc32, sizeof(header.checksum)-1)) { in phar_tar_writeheaders()
784 if (sizeof(header) != php_stream_write(fp->new, (char *) &header, sizeof(header))) { in phar_tar_writeheaders()