Lines Matching refs:pass

1176 static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pass *pass) /* {{{ */  in phar_zip_applysignature()  argument
1188 spprintf(pass->error, 0, "phar error: unable to create temporary file for the signature file"); in phar_zip_applysignature()
1191 tell = php_stream_tell(pass->filefp); in phar_zip_applysignature()
1193 php_stream_seek(pass->filefp, 0, SEEK_SET); in phar_zip_applysignature()
1194 php_stream_copy_to_stream_ex(pass->filefp, newfile, tell, NULL); in phar_zip_applysignature()
1195 tell = php_stream_tell(pass->centralfp); in phar_zip_applysignature()
1196 php_stream_seek(pass->centralfp, 0, SEEK_SET); in phar_zip_applysignature()
1197 php_stream_copy_to_stream_ex(pass->centralfp, newfile, tell, NULL); in phar_zip_applysignature()
1202 if (FAILURE == phar_create_signature(phar, newfile, &signature, &signature_length, pass->error)) { in phar_zip_applysignature()
1203 if (pass->error) { in phar_zip_applysignature()
1204 char *save = *(pass->error); in phar_zip_applysignature()
1205 spprintf(pass->error, 0, "phar error: unable to write signature to zip-based phar: %s", save); in phar_zip_applysignature()
1219 spprintf(pass->error, 0, "phar error: unable to create temporary file for signature"); in phar_zip_applysignature()
1228 if (pass->error) { in phar_zip_applysignature()
1229 …spprintf(pass->error, 0, "phar error: unable to write signature to zip-based phar %s", phar->fname… in phar_zip_applysignature()
1240 phar_zip_changed_apply_int(&entry, (void *)pass); in phar_zip_applysignature()
1243 if (pass->error && *(pass->error)) { in phar_zip_applysignature()
1262 struct _phar_zip_pass pass; in phar_zip_flush() local
1266 pass.error = &temperr; in phar_zip_flush()
1445 pass.old = oldfile; in phar_zip_flush()
1446 pass.filefp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1448 if (!pass.filefp) { in phar_zip_flush()
1459 pass.centralfp = php_stream_fopen_tmpfile(); in phar_zip_flush()
1461 if (!pass.centralfp) { in phar_zip_flush()
1465 pass.free_fp = pass.free_ufp = 1; in phar_zip_flush()
1479 zend_hash_apply_with_argument(&phar->manifest, phar_zip_changed_apply, (void *) &pass); in phar_zip_flush()
1488 php_stream_close(pass.centralfp); in phar_zip_flush()
1490 php_stream_close(pass.filefp); in phar_zip_flush()
1497 if (FAILURE == phar_zip_applysignature(phar, &pass)) { in phar_zip_flush()
1502 cdir_size = php_stream_tell(pass.centralfp); in phar_zip_flush()
1503 cdir_offset = php_stream_tell(pass.filefp); in phar_zip_flush()
1506 php_stream_seek(pass.centralfp, 0, SEEK_SET); in phar_zip_flush()
1510 int ret = php_stream_copy_to_stream_ex(pass.centralfp, pass.filefp, PHP_STREAM_COPY_ALL, &clen); in phar_zip_flush()
1519 php_stream_close(pass.centralfp); in phar_zip_flush()
1526 if (sizeof(eocd) != php_stream_write(pass.filefp, (char *)&eocd, sizeof(eocd))) { in phar_zip_flush()
1533 …if (ZSTR_LEN(phar->metadata_tracker.str) != php_stream_write(pass.filefp, ZSTR_VAL(phar->metadata_… in phar_zip_flush()
1540 if (sizeof(eocd) != php_stream_write(pass.filefp, (char *)&eocd, sizeof(eocd))) { in phar_zip_flush()
1548 if (phar->fp && pass.free_fp) { in phar_zip_flush()
1553 if (pass.free_ufp) { in phar_zip_flush()
1564 phar->fp = pass.filefp; in phar_zip_flush()
1571 phar->fp = pass.filefp; in phar_zip_flush()
1577 php_stream_rewind(pass.filefp); in phar_zip_flush()
1578 php_stream_copy_to_stream_ex(pass.filefp, phar->fp, PHP_STREAM_COPY_ALL, NULL); in phar_zip_flush()
1580 php_stream_close(pass.filefp); in phar_zip_flush()