From 0e5d551a56dffa29ebfa241c8e144064f8922714 Mon Sep 17 00:00:00 2001 From: SVN Migration Date: Wed, 26 Sep 2007 15:44:16 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'PHP_5_3'. --- ext/enchant/CREDITS | 2 + ext/enchant/config.m4 | 36 ++++++++++ ext/enchant/docs/examples/example1.php | 25 +++++++ ext/enchant/tests/broker_describe.phpt | 28 ++++++++ ext/enchant/tests/broker_free.phpt | 21 ++++++ ext/enchant/tests/broker_init.phpt | 15 ++++ ext/enchant/tests/broker_request_dict.phpt | 31 +++++++++ ext/enchant/tests/hindi_correct.txt | 1 + ext/enchant/tests/hindi_incorrect.txt | 1 + ext/fileinfo/EXPERIMENTAL | 0 ext/fileinfo/config.w32 | 13 ++++ ext/fileinfo/fileinfo.php | 29 ++++++++ ext/fileinfo/package.xml | 44 ++++++++++++ ext/phar/build_precommand.php | 60 ++++++++++++++++ ext/phar/phar/directorygraphiterator.inc | 34 +++++++++ ext/phar/phar/directorytreeiterator.inc | 54 +++++++++++++++ ext/phar/phar/invertedregexiterator.inc | 27 ++++++++ ext/phar/phar/phar.inc | 80 ++++++++++++++++++++++ 18 files changed, 501 insertions(+) create mode 100644 ext/enchant/CREDITS create mode 100755 ext/enchant/config.m4 create mode 100644 ext/enchant/docs/examples/example1.php create mode 100644 ext/enchant/tests/broker_describe.phpt create mode 100644 ext/enchant/tests/broker_free.phpt create mode 100644 ext/enchant/tests/broker_init.phpt create mode 100644 ext/enchant/tests/broker_request_dict.phpt create mode 100644 ext/enchant/tests/hindi_correct.txt create mode 100644 ext/enchant/tests/hindi_incorrect.txt create mode 100644 ext/fileinfo/EXPERIMENTAL create mode 100644 ext/fileinfo/config.w32 create mode 100644 ext/fileinfo/fileinfo.php create mode 100644 ext/fileinfo/package.xml create mode 100755 ext/phar/build_precommand.php create mode 100755 ext/phar/phar/directorygraphiterator.inc create mode 100755 ext/phar/phar/directorytreeiterator.inc create mode 100755 ext/phar/phar/invertedregexiterator.inc create mode 100755 ext/phar/phar/phar.inc diff --git a/ext/enchant/CREDITS b/ext/enchant/CREDITS new file mode 100644 index 0000000000..481febbfc2 --- /dev/null +++ b/ext/enchant/CREDITS @@ -0,0 +1,2 @@ +enchant +Pierre-Alain Joye, Ilia Alshanetsky diff --git a/ext/enchant/config.m4 b/ext/enchant/config.m4 new file mode 100755 index 0000000000..b59cd8fb3c --- /dev/null +++ b/ext/enchant/config.m4 @@ -0,0 +1,36 @@ +dnl +dnl $Id$ +dnl + +PHP_ARG_WITH(enchant,for ENCHANT support, +[ --with-enchant[=DIR] Include enchant support. + GNU Aspell version 1.1.3 or higher required.]) + +if test "$PHP_ENCHANT" != "no"; then + PHP_NEW_EXTENSION(enchant, enchant.c, $ext_shared) + if test "$PHP_ENCHANT" != "yes"; then + ENCHANT_SEARCH_DIRS=$PHP_ENCHANT + else + ENCHANT_SEARCH_DIRS="/usr/local /usr" + fi + for i in $ENCHANT_SEARCH_DIRS; do + if test -f $i/include/enchant/enchant.h; then + ENCHANT_DIR=$i + ENCHANT_INCDIR=$i/include/enchant + elif test -f $i/include/enchant.h; then + ENCHANT_DIR=$i + ENCHANT_INCDIR=$i/include + fi + done + + if test -z "$ENCHANT_DIR"; then + AC_MSG_ERROR(Cannot find enchant) + fi + + ENCHANT_LIBDIR=$ENCHANT_DIR/lib + + AC_DEFINE(HAVE_ENCHANT,1,[ ]) + PHP_SUBST(ENCHANT_SHARED_LIBADD) + PHP_ADD_LIBRARY_WITH_PATH(enchant, $ENCHANT_LIBDIR, ENCHANT_SHARED_LIBADD) + PHP_ADD_INCLUDE($ENCHANT_INCDIR) +fi diff --git a/ext/enchant/docs/examples/example1.php b/ext/enchant/docs/examples/example1.php new file mode 100644 index 0000000000..9d503f74e6 --- /dev/null +++ b/ext/enchant/docs/examples/example1.php @@ -0,0 +1,25 @@ + diff --git a/ext/enchant/tests/broker_describe.phpt b/ext/enchant/tests/broker_describe.phpt new file mode 100644 index 0000000000..4c03f6f4dd --- /dev/null +++ b/ext/enchant/tests/broker_describe.phpt @@ -0,0 +1,28 @@ +--TEST-- +enchant_broker_describe() function +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +OK diff --git a/ext/enchant/tests/broker_free.phpt b/ext/enchant/tests/broker_free.phpt new file mode 100644 index 0000000000..d00c22a974 --- /dev/null +++ b/ext/enchant/tests/broker_free.phpt @@ -0,0 +1,21 @@ +--TEST-- +enchant_broker_free() function +--SKIPIF-- + +--FILE-- + +--EXPECT-- +OK +OK diff --git a/ext/enchant/tests/broker_init.phpt b/ext/enchant/tests/broker_init.phpt new file mode 100644 index 0000000000..359a653359 --- /dev/null +++ b/ext/enchant/tests/broker_init.phpt @@ -0,0 +1,15 @@ +--TEST-- +enchant_broker_init() function +--SKIPIF-- + +--FILE-- + +--EXPECT-- +OK diff --git a/ext/enchant/tests/broker_request_dict.phpt b/ext/enchant/tests/broker_request_dict.phpt new file mode 100644 index 0000000000..5744da6747 --- /dev/null +++ b/ext/enchant/tests/broker_request_dict.phpt @@ -0,0 +1,31 @@ +--TEST-- +enchant_broker_request_dict() function +--SKIPIF-- + +--FILE-- + +--EXPECT-- +OK +OK diff --git a/ext/enchant/tests/hindi_correct.txt b/ext/enchant/tests/hindi_correct.txt new file mode 100644 index 0000000000..cced6b86fa --- /dev/null +++ b/ext/enchant/tests/hindi_correct.txt @@ -0,0 +1 @@ +इस पृष्ठ में एक लिंक बनाने के लिये इस प्रतीक को खीचें व छोड़ें diff --git a/ext/enchant/tests/hindi_incorrect.txt b/ext/enchant/tests/hindi_incorrect.txt new file mode 100644 index 0000000000..1f7353c958 --- /dev/null +++ b/ext/enchant/tests/hindi_incorrect.txt @@ -0,0 +1 @@ +इस पृष्ठ में एक लिंक बनाने के लिये इस प्रतीक को खच व छड diff --git a/ext/fileinfo/EXPERIMENTAL b/ext/fileinfo/EXPERIMENTAL new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ext/fileinfo/config.w32 b/ext/fileinfo/config.w32 new file mode 100644 index 0000000000..08d09e61f5 --- /dev/null +++ b/ext/fileinfo/config.w32 @@ -0,0 +1,13 @@ +// $Id$ +// vim:ft=javascript + +ARG_WITH("fileinfo", "fileinfo support", "no"); + +if (PHP_FILEINFO != 'no' && + CHECK_HEADER_ADD_INCLUDE('magic.h', 'CFLAGS_FILEINFO') && + CHECK_LIB(PHP_DEBUG != 'no'?'libmagic-staticd.lib':'libmagic-static.lib', + 'fileinfo', PHP_FILEINFO)) { + EXTENSION('fileinfo', 'fileinfo.c'); + AC_DEFINE('USE_MAGIC_STATIC', '', ''); +} + diff --git a/ext/fileinfo/fileinfo.php b/ext/fileinfo/fileinfo.php new file mode 100644 index 0000000000..1ee9efbeb8 --- /dev/null +++ b/ext/fileinfo/fileinfo.php @@ -0,0 +1,29 @@ +buffer(file_get_contents($file)) . "\n"; +} +?> diff --git a/ext/fileinfo/package.xml b/ext/fileinfo/package.xml new file mode 100644 index 0000000000..a274e47161 --- /dev/null +++ b/ext/fileinfo/package.xml @@ -0,0 +1,44 @@ + + + + Fileinfo + libmagic bindings + + + iliaa + Ilia Alshanetsky + ilia@php.net + lead + + + +This extension allows retrieval of information regarding vast majority of file. +This information may include dimensions, quality, length etc... + +Additionally it can also be used to retrieve the mime type for a particular +file and for text files proper language encoding. + + PHP + + stable + 1.0.4 + 2006-11-07 + + 1) Fixed detection of magic files + 2) Fixed build problems with older version of libmagic + + + + + + + + + + + + + + diff --git a/ext/phar/build_precommand.php b/ext/phar/build_precommand.php new file mode 100755 index 0000000000..8904afdf05 --- /dev/null +++ b/ext/phar/build_precommand.php @@ -0,0 +1,60 @@ +#!/usr/bin/php + + +/** @file phar.php + * @ingroup Phar + * @brief class Phar Pre Command + * @author Marcus Boerger + * @date 2007 - 2007 + * + * Phar Command + */ +foreach(array("SPL", "Reflection", "Phar") as $ext) +{ + if (!extension_loaded($ext)) + { + echo "$argv[0] requires PHP extension $ext.\n"; + exit(1); + } +} + +') { + $f[$c] = substr($f[$c], 0,-2); + } + while ($c && (strlen($f[$c]) == 0 || $f[$c] == "\n" || $f[$c] == "\r\n")) + { + unset($f[$c--]); + } + echo join('', $f); + echo "\n}\n\n"; +} + +echo 'new PharCommand($argc, $argv);'."\n"; + +?> diff --git a/ext/phar/phar/directorygraphiterator.inc b/ext/phar/phar/directorygraphiterator.inc new file mode 100755 index 0000000000..5808e3b89e --- /dev/null +++ b/ext/phar/phar/directorygraphiterator.inc @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/ext/phar/phar/directorytreeiterator.inc b/ext/phar/phar/directorytreeiterator.inc new file mode 100755 index 0000000000..8e65d0db12 --- /dev/null +++ b/ext/phar/phar/directorytreeiterator.inc @@ -0,0 +1,54 @@ +getDepth(); $l++) { + $tree .= $this->getSubIterator($l)->hasNext() ? '| ' : ' '; + } + return $tree . ($this->getSubIterator($l)->hasNext() ? '|-' : '\-') + . $this->getSubIterator($l)->__toString(); + } + + /** Aggregates the inner iterator + */ + function __call($func, $params) + { + return call_user_func_array(array($this->getSubIterator(), $func), $params); + } +} + +?> \ No newline at end of file diff --git a/ext/phar/phar/invertedregexiterator.inc b/ext/phar/phar/invertedregexiterator.inc new file mode 100755 index 0000000000..7eea533a22 --- /dev/null +++ b/ext/phar/phar/invertedregexiterator.inc @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/ext/phar/phar/phar.inc b/ext/phar/phar/phar.inc new file mode 100755 index 0000000000..a7c6f6d5fe --- /dev/null +++ b/ext/phar/phar/phar.inc @@ -0,0 +1,80 @@ + \ No newline at end of file -- 2.50.1