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)]; 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()
680 tar_header header; in phar_tar_writeheaders() local
700 memset((char *) &header, 0, sizeof(header)); in phar_tar_writeheaders()
720 memcpy(header.prefix, entry->filename, boundary - entry->filename); in phar_tar_writeheaders()
721 memcpy(header.name, boundary + 1, entry->filename_len - (boundary + 1 - entry->filename)); in phar_tar_writeheaders()
723 memcpy(header.name, entry->filename, entry->filename_len); in phar_tar_writeheaders()
726 phar_tar_octal(header.mode, entry->flags & PHAR_ENT_PERM_MASK, sizeof(header.mode)-1); in phar_tar_writeheaders()
728 if (FAILURE == phar_tar_octal(header.size, entry->uncompressed_filesize, sizeof(header.size)-1)) { in phar_tar_writeheaders()
735 if (FAILURE == phar_tar_octal(header.mtime, entry->timestamp, sizeof(header.mtime)-1)) { in phar_tar_writeheaders()
743 header.typeflag = entry->tar_type; in phar_tar_writeheaders()
746 strncpy(header.linkname, entry->link, strlen(entry->link)); in phar_tar_writeheaders()
749 strncpy(header.magic, "ustar", sizeof("ustar")-1); in phar_tar_writeheaders()
750 strncpy(header.version, "00", sizeof("00")-1); in phar_tar_writeheaders()
751 strncpy(header.checksum, " ", sizeof(" ")-1); in phar_tar_writeheaders()
752 entry->crc32 = phar_tar_checksum((char *)&header, sizeof(header)); in phar_tar_writeheaders()
754 if (FAILURE == phar_tar_octal(header.checksum, entry->crc32, sizeof(header.checksum)-1)) { in phar_tar_writeheaders()
764 if (sizeof(header) != php_stream_write(fp->new, (char *) &header, sizeof(header))) { in phar_tar_writeheaders()