diff options
author | Pierre Joye <pajoye@php.net> | 2008-10-23 16:16:56 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2008-10-23 16:16:56 +0000 |
commit | 08a1795767ee50d8ef8dfcbe6b701e4b420115e2 (patch) | |
tree | cfa2b5f694bbf723a31d082d5aa52b2d6578be70 | |
parent | 4fc1246d11e49c25f4ce22652a547dfc92a9c377 (diff) | |
download | php-git-08a1795767ee50d8ef8dfcbe6b701e4b420115e2.tar.gz |
- remove unused files
-rw-r--r-- | ext/zip/lib/mkstemp.c | 136 | ||||
-rw-r--r-- | ext/zip/lib/unistd.h | 3 | ||||
-rw-r--r-- | ext/zip/lib/zip_alias.h | 45 | ||||
-rw-r--r-- | ext/zip/lib/zipint_alias.h | 49 |
4 files changed, 0 insertions, 233 deletions
diff --git a/ext/zip/lib/mkstemp.c b/ext/zip/lib/mkstemp.c deleted file mode 100644 index 3ac587eafe..0000000000 --- a/ext/zip/lib/mkstemp.c +++ /dev/null @@ -1,136 +0,0 @@ -/* $NiH: mkstemp.c,v 1.3 2006/04/23 14:51:45 wiz Exp $ */ - -/* Adapted from NetBSB libc by Dieter Baron */ - -/* NetBSD: gettemp.c,v 1.13 2003/12/05 00:57:36 uebayasi Exp */ - -/* - * Copyright (c) 1987, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/types.h> -#include <sys/stat.h> - -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - - -int -_zip_mkstemp(char *path) -{ - int fd; - char *start, *trv; - struct stat sbuf; - pid_t pid; - - /* To guarantee multiple calls generate unique names even if - the file is not created. 676 different possibilities with 7 - or more X's, 26 with 6 or less. */ - static char xtra[2] = "aa"; - int xcnt = 0; - - pid = getpid(); - - /* Move to end of path and count trailing X's. */ - for (trv = path; *trv; ++trv) - if (*trv == 'X') - xcnt++; - else - xcnt = 0; - - /* Use at least one from xtra. Use 2 if more than 6 X's. */ - if (*(trv - 1) == 'X') - *--trv = xtra[0]; - if (xcnt > 6 && *(trv - 1) == 'X') - *--trv = xtra[1]; - - /* Set remaining X's to pid digits with 0's to the left. */ - while (*--trv == 'X') { - *trv = (pid % 10) + '0'; - pid /= 10; - } - - /* update xtra for next call. */ - if (xtra[0] != 'z') - xtra[0]++; - else { - xtra[0] = 'a'; - if (xtra[1] != 'z') - xtra[1]++; - else - xtra[1] = 'a'; - } - - /* - * check the target directory; if you have six X's and it - * doesn't exist this runs for a *very* long time. - */ - for (start = trv + 1;; --trv) { - if (trv <= path) - break; - if (*trv == '/') { - *trv = '\0'; - if (stat(path, &sbuf)) - return (0); - if (!S_ISDIR(sbuf.st_mode)) { - errno = ENOTDIR; - return (0); - } - *trv = '/'; - break; - } - } - - for (;;) { - if ((fd = open(path, O_CREAT | O_EXCL | O_RDWR, 0600)) >= 0) - return (1); - if (errno != EEXIST) - return (0); - - /* tricky little algorithm for backward compatibility */ - for (trv = start;;) { - if (!*trv) - return (0); - if (*trv == 'z') - *trv++ = 'a'; - else { - if (isdigit((unsigned char)*trv)) - *trv = 'a'; - else - ++*trv; - break; - } - } - } - /*NOTREACHED*/ -} diff --git a/ext/zip/lib/unistd.h b/ext/zip/lib/unistd.h deleted file mode 100644 index 2ef435c012..0000000000 --- a/ext/zip/lib/unistd.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef _MSC_VER -#include <unistd.h> -#endif diff --git a/ext/zip/lib/zip_alias.h b/ext/zip/lib/zip_alias.h deleted file mode 100644 index 27a7b45dfb..0000000000 --- a/ext/zip/lib/zip_alias.h +++ /dev/null @@ -1,45 +0,0 @@ - -#define zip_source_cmd php_ziplib__zip_source_cmd -#define zip_source_callback php_ziplib__zip_source_callback -#define zip_stat php_ziplib__zip_stat -#define zip php_ziplib__zip -#define zip_file php_ziplib__zip_file -#define zip_source php_ziplib__zip_source -#define zip_add php_ziplib__zip_add -#define zip_add_dir php_ziplib__zip_add_dir -#define zip_close php_ziplib__zip_close -#define zip_delete php_ziplib__zip_delete -#define zip_error_clear php_ziplib__zip_error_clear -#define zip_error_get php_ziplib__zip_error_get -#define zip_error_get_sys_type php_ziplib__zip_error_get_sys_type -#define zip_error_to_str php_ziplib__zip_error_to_str -#define zip_fclose php_ziplib__zip_fclose -#define zip_file_error_clear php_ziplib__zip_fille_error_clear -#define zip_file_error_get php_ziplib__zip_file_error_get -#define zip_file_strerror php_ziplib__zip_file_strerror -#define zip_fopen php_ziplib__zip_fopen -#define zip_fopen_index php_ziplib__zip_fopen_index -#define zip_fread php_ziplib__zip_fread -#define zip_get_archive_comment php_ziplib__zip_get_archive_comment -#define zip_get_file_comment php_ziplib__zip_get_file_comment -#define zip_get_name php_ziplib__zip_get_name -#define zip_get_num_files php_ziplib__zip_get_num_files -#define zip_name_locate php_ziplib__zip_name_locate -#define zip_open php_ziplib__zip_open -#define zip_rename php_ziplib__zip_rename -#define zip_replace php_ziplib__zip_replace -#define zip_set_archive_comment php_ziplib__zip_set_archive_comment -#define zip_set_file_comment php_ziplib__zip_set_file_comment -#define zip_source_buffer php_ziplib__zip_source_buffer -#define zip_source_file php_ziplib__zip_source_file -#define zip_source_filep php_ziplib__zip_source_filep -#define zip_source_free php_ziplib__zip_source_free -#define zip_source_function php_ziplib__zip_source_function -#define zip_source_zip php_ziplib__zip_source_zip -#define zip_stat php_ziplib__zip_stat -#define zip_stat_index php_ziplib__zip_stat_index -#define zip_stat_init php_ziplib__zip_stat_init -#define zip_strerror php_ziplib__zip_strerror -#define zip_unchange php_ziplib__zip_unchange -#define zip_unchange_all php_ziplib__zip_unchange_all -#define zip_unchange_archive php_ziplib__zip_unchange_archive diff --git a/ext/zip/lib/zipint_alias.h b/ext/zip/lib/zipint_alias.h deleted file mode 100644 index e8541b36ee..0000000000 --- a/ext/zip/lib/zipint_alias.h +++ /dev/null @@ -1,49 +0,0 @@ - -/* state of change of a file in zip archive */ -#define zip_state php_ziplib__zip_state -#define zip_error php_ziplib__zip_error -#define zip_dirent php_ziplib__zip_dirent -#define zip_cdir php_ziplib__zip_cdir -#define zip_source php_ziplib__zip_source -#define zip_entry php_ziplib__zip_entry - -#define _zip_err_str php_ziplib___zip_err_str -#define _zip_nerr_str php_ziplib___zip_nerr_str -#define _zip_err_type php_ziplib___zip_err_type - -#define _zip_cdir_free php_ziplib___zip_cdir_free -#define _zip_cdir_new php_ziplib___zip_cdir_new -#define _zip_cdir_write php_ziplib___zip_cdir_write - -#define _zip_dirent_finalize php_ziplib___zip_dirent_finalize -#define _zip_dirent_init php_ziplib___zip_dirent_init -#define _zip_dirent_read php_ziplib___zip_dirent_read -#define _zip_dirent_write php_ziplib___zip_dirent_write - -#define _zip_entry_free php_ziplib___zip_entry_free -#define _zip_entry_init php_ziplib___zip_entry_init -#define _zip_entry_new php_ziplib___zip_entry_new - -#define _zip_error_clear php_ziplib___zip_error_clear -#define _zip_error_copy php_ziplib___zip_error_copy -#define _zip_error_fini php_ziplib___zip_error_fini -#define _zip_error_get php_ziplib___zip_error_get -#define _zip_error_init php_ziplib___zip_error_init -#define _zip_error_set php_ziplib___zip_error_set -#define _zip_error_strerror php_ziplib___zip_error_strerror - -#define _zip_file_fillbuf php_ziplib___zip_file_fillbuf -#define _zip_file_get_offset php_ziplib___zip_file_get_offset - -#define _zip_free php_ziplib___zip_free -#define _zip_get_name php_ziplib___zip_get_name -#define _zip_local_header_read php_ziplib___zip_local_header_read -#define _zip_memdup php_ziplib___zip_memdup -#define _zip_name_locate php_ziplib___zip_name_locate -#define _zip_new php_ziplib___zip_new -#define _zip_read2 php_ziplib___zip_read2 -#define _zip_read4 php_ziplib___zip_read4 -#define _zip_replace php_ziplib___zip_replace -#define _zip_set_name php_ziplib___zip_set_name -#define _zip_unchange php_ziplib___zip_unchange -#define _zip_unchange_data php_ziplib___zip_unchange_data |