summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2003-02-27 17:43:39 +0000
committerSVN Migration <svn@php.net>2003-02-27 17:43:39 +0000
commit078bcec0997ad0e07b720c43cc9e6d0e046a75ab (patch)
tree36cb0f6be2ef078fe3374de8c087b93ecf82f812 /scripts
parentfd61f69077f6156ca71dde60ecfd9ed9765a02db (diff)
downloadphp-git-PHP-5.tar.gz
This commit was manufactured by cvs2svn to create branch 'PHP_5'.PHP-5
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.frag65
-rwxr-xr-xscripts/apache/apconf-conv.sh24
-rwxr-xr-xscripts/apache/aphtaccess-conv.sh24
-rw-r--r--scripts/apache/conffix.awk23
-rw-r--r--scripts/apache/htaccessfix.awk23
-rwxr-xr-xscripts/dev/conv_proto30
-rwxr-xr-xscripts/dev/conv_z_macros61
-rwxr-xr-xscripts/dev/credits26
-rw-r--r--scripts/ext_skel_ng/README36
-rw-r--r--scripts/ext_skel_ng/TODO16
-rw-r--r--scripts/ext_skel_ng/dummy.gifbin377 -> 0 bytes
-rw-r--r--scripts/ext_skel_ng/ext_skel_ng.php24
-rw-r--r--scripts/ext_skel_ng/extension.dtd93
-rw-r--r--scripts/ext_skel_ng/extension.xml174
-rw-r--r--scripts/ext_skel_ng/extension_parser.php1071
-rw-r--r--scripts/ext_skel_ng/php_constant.php38
-rw-r--r--scripts/ext_skel_ng/php_element.php74
-rw-r--r--scripts/ext_skel_ng/php_function.php232
-rw-r--r--scripts/ext_skel_ng/php_logo.php51
-rw-r--r--scripts/ext_skel_ng/php_resource.php65
-rw-r--r--scripts/ext_skel_ng/xml_stream_callback_parser.php35
-rw-r--r--scripts/ext_skel_ng/xml_stream_parser.php42
-rw-r--r--scripts/php-config.in32
-rwxr-xr-xscripts/phpextdist27
-rw-r--r--scripts/phpize.in56
-rw-r--r--scripts/phpize.m4123
26 files changed, 0 insertions, 2465 deletions
diff --git a/scripts/Makefile.frag b/scripts/Makefile.frag
deleted file mode 100644
index 7dc699d951..0000000000
--- a/scripts/Makefile.frag
+++ /dev/null
@@ -1,65 +0,0 @@
-
-#
-# Build environment install
-#
-
-phpincludedir = $(includedir)/php
-phpbuilddir = $(prefix)/lib/php/build
-
-BUILD_FILES = \
- scripts/phpize.m4 \
- build/mkdep.awk \
- build/shtool \
- Makefile.global \
- scan_makefile_in.awk \
- acinclude.m4
-
-bin_SCRIPTS = phpize php-config
-bin_src_SCRIPTS = phpextdist
-
-install-build:
- @echo "Installing build environment: $(INSTALL_ROOT)$(phpbuilddir)/"
- @$(mkinstalldirs) $(INSTALL_ROOT)$(phpbuilddir) $(INSTALL_ROOT)$(bindir) && \
- (cd $(top_srcdir) && cp $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir))
-
-HEADER_DIRS = \
- / \
- Zend \
- TSRM \
- ext/standard \
- ext/session \
- ext/xml \
- ext/xml/expat \
- main \
- ext/mbstring \
- ext/pgsql \
- regex
-
-install-headers:
- -@for i in $(HEADER_DIRS); do \
- paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
- done; \
- $(mkinstalldirs) $$paths && \
- echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
- for i in $(HEADER_DIRS); do \
- (cd $(top_srcdir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
- cd $(top_builddir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
- done; \
- cd $(top_srcdir)/sapi/embed && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/main
-
-install-programs:
- @echo "Installing helper programs: $(INSTALL_ROOT)$(bindir)/"
- @for prog in $(bin_SCRIPTS); do \
- echo " program: $$prog"; \
- $(INSTALL) -m 755 $(builddir)/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
- done
- @for prog in $(bin_src_SCRIPTS); do \
- echo " program: $$prog"; \
- $(INSTALL) -m 755 $(top_srcdir)/scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
- done
-
-$(builddir)/phpize: $(srcdir)/phpize.in $(top_builddir)/config.status
- (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
-
-$(builddir)/php-config: $(srcdir)/php-config.in $(top_builddir)/config.status
- (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
diff --git a/scripts/apache/apconf-conv.sh b/scripts/apache/apconf-conv.sh
deleted file mode 100755
index 6126bdc27d..0000000000
--- a/scripts/apache/apconf-conv.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "" ]; then
- echo "Usage: $0 /somewhere/httpd.conf"
- exit 1
-fi
-
-if [ ! -w $1 ]; then
- echo "You cannot write to $1"
- exit 1
-fi
-
-TMPFILE=tmpfile.$$
-
-awk -f conffix.awk <$1 >$TMPFILE
-
-if [ "$?" != 0 ]; then
- exit 1
-fi
-
-mv -f $1 $1.orig
-mv -f $TMPFILE $1
-exit 0
-
diff --git a/scripts/apache/aphtaccess-conv.sh b/scripts/apache/aphtaccess-conv.sh
deleted file mode 100755
index 1af59d2843..0000000000
--- a/scripts/apache/aphtaccess-conv.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "" ]; then
- echo "Usage: $0 /somewhere/.htaccess"
- exit 1
-fi
-
-if [ ! -w $1 ]; then
- echo "You cannot write to $1"
- exit 1
-fi
-
-TMPFILE=tmpfile.$$
-
-awk -f htaccessfix.awk <$1 >$TMPFILE
-
-if [ "$?" != 0 ]; then
- exit 1
-fi
-
-mv -f $1 $1.orig
-mv -f $TMPFILE $1
-exit 0
-
diff --git a/scripts/apache/conffix.awk b/scripts/apache/conffix.awk
deleted file mode 100644
index 88be6fade7..0000000000
--- a/scripts/apache/conffix.awk
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Id$
-
-/^[ \t]*php3_*/ {
- phpcommand=substr($1,6)
- phpvalue=tolower($2)
- print "<IfModule mod_php3.c>"
- print $0
- print "</IfModule>"
- print "<IfModule mod_php4.c>"
- if (phpvalue=="on") {
- print "php_admin_flag " phpcommand " on"
- } else if (phpvalue=="off") {
- print "php_admin_flag " phpcommand " off"
- } else {
- print "php_admin_value " phpcommand " " substr($0,index($0,$1)+length($1)+1)
- }
- print "</IfModule>"
-}
-
-! /^[ \t]*php3_*/ {
- print $0
-}
-
diff --git a/scripts/apache/htaccessfix.awk b/scripts/apache/htaccessfix.awk
deleted file mode 100644
index 3c784cd335..0000000000
--- a/scripts/apache/htaccessfix.awk
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Id$
-
-/^[ \t]*php3_*/ {
- phpcommand=substr($1,6)
- phpvalue=tolower($2)
- print "<IfModule mod_php3.c>"
- print $0
- print "</IfModule>"
- print "<IfModule mod_php4.c>"
- if (phpvalue=="on") {
- print "php_flag " phpcommand " on"
- } else if (phpvalue=="off") {
- print "php_flag " phpcommand " off"
- } else {
- print "php_value " phpcommand " " substr($0,index($0,$1)+length($1)+1)
- }
- print "</IfModule>"
-}
-
-! /^[ \t]*php3_*/ {
- print $0
-}
-
diff --git a/scripts/dev/conv_proto b/scripts/dev/conv_proto
deleted file mode 100755
index fad9cfaa83..0000000000
--- a/scripts/dev/conv_proto
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /bin/sh
-#
-# do some automatic conversion of prototypes
-#
-
-if test "$1" = "" ; then
- echo "usage: $0 list-of-files"
- exit 1
-fi
-
-tmpfile=`mktemp -q /tmp/asd.XXXXXX`
-
-if test "$?" != "0" ; then
- echo "$0: cannot create temporary file"
- exit 1
-fi
-
-for file in ${1+"$@"} ; do
- echo "working on $file"
- cat $file | \
- sed -e \
- 's/void php3_\(.*\)(INTERNAL_FUNCTION_PARAMETERS)/PHP_FUNCTION(\1)/' \
- -e 's/^extern void /void /' \
- -e 's/^extern PHP_FUNCTION/PHP_FUNCTION/' > $tmpfile
- cp $tmpfile $file
-done
-
-rm -f $tmpfile
-
-exit 0
diff --git a/scripts/dev/conv_z_macros b/scripts/dev/conv_z_macros
deleted file mode 100755
index 7d15c71202..0000000000
--- a/scripts/dev/conv_z_macros
+++ /dev/null
@@ -1,61 +0,0 @@
-#! /bin/sh
-#
-# +----------------------------------------------------------------------+
-# | PHP Version 4 |
-# +----------------------------------------------------------------------+
-# | Copyright (c) 1997-2002 The PHP Group |
-# +----------------------------------------------------------------------+
-# | This source file is subject to version 2.02 of the PHP license, |
-# | that is bundled with this package in the file LICENSE, and is |
-# | available at through the world-wide-web at |
-# | http://www.php.net/license/2_02.txt. |
-# | If you did not receive a copy of the PHP license and are unable to |
-# | obtain it through the world-wide-web, please send a note to |
-# | license@php.net so we can mail you a copy immediately. |
-# +----------------------------------------------------------------------+
-# | Author: Sascha Schumann <sascha@schumann.cx> |
-# +----------------------------------------------------------------------+
-#
-# $Id$
-
-for i in $@; do
- echo -n "Processing $i... "
- sed \
- -e 's/(\*\([^()]\+\))->type/Z_TYPE_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->type/Z_TYPE_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.type/Z_TYPE(\1)/g' \
- -e 's/(\*\([^()]\+\))->value\.dval/Z_DVAL_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.dval/Z_DVAL_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.dval/Z_DVAL(\1)/g' \
- -e 's/(\*\([^()]\+\))->value\.lval/Z_LVAL_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.lval/Z_LVAL_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.lval/Z_LVAL(\1)/g' \
- -e 's/(\*\([^()]\+\))->value\.ht/Z_ARRVAL_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.ht/Z_ARRVAL_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.ht/Z_ARRVAL(\1)/g' \
- -e 's/(\*\([^()]\+\))->value\.str\.val/Z_STRVAL_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.str\.val/Z_STRVAL_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.str\.val/Z_STRVAL(\1)/g' \
- -e 's/(\*\([^()]\+\))->value\.str\.len/Z_STRLEN_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.str\.len/Z_STRLEN_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.str\.len/Z_STRLEN(\1)/g' \
- -e 's/(\*\([^()]\+\))->value\.obj\.properties/Z_OBJPROP_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.obj\.properties/Z_OBJPROP_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.obj\.properties/Z_OBJPROP(\1)/g' \
- -e 's/(\*\([^()]\+\))->value\.obj\.ce/Z_OBJCE_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.obj\.ce/Z_OBJCE_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.obj\.ce/Z_OBJCE(\1)/g' \
- -e 's/(\*\([^()]\+\))->value\.obj/Z_OBJ_PP(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.obj/Z_OBJ_P(\1)/g' \
- -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.obj/Z_OBJ(\1)/g' \
- -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)->Z_\([A-Z_]\+\)(/Z_\2(\1->/g' \
- -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)->Z_\([A-Z_]\+\)(/Z_\2(\1->/g' \
- -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)->Z_\([A-Z_]\+\)(/Z_\2(\1->/g' \
- -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)\.Z_\([A-Z_]\+\)(/Z_\2(\1./g' \
- -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)\.Z_\([A-Z_]\+\)(/Z_\2(\1./g' \
- -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)\.Z_\([A-Z_]\+\)(/Z_\2(\1./g' \
- < $i > tmp && cp tmp $i
- echo "DONE"
-done
-
-rm -f tmp
diff --git a/scripts/dev/credits b/scripts/dev/credits
deleted file mode 100755
index b76fb311df..0000000000
--- a/scripts/dev/credits
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-awkprog='
-BEGIN { FS = "\n"; RS = "" }
-{ print "CREDIT_LINE(\""$1"\", \""$2"\");" }'
-
-for what in ext sapi
-do
- file=ext/standard/credits_$what.h
- cat >$file <<END
-/*
- DO NOT EDIT THIS FILE!
-
- it has been automaticaly created by php4/scripts/credits from
- the information found in the various php4/ext/.../CREDITS and
- php4/sapi/.../CREDITS files
-
- if you want to change an entry you have to edit the appropriate
- CREDITS file instead
-
-*/
-
-END
- # Do not process skeleton #
- files=`find "$what" -name CREDITS | grep -v "$what"/skeleton/CREDITS`
- awk "$awkprog" $files | sort -f | uniq >> $file
-done
diff --git a/scripts/ext_skel_ng/README b/scripts/ext_skel_ng/README
deleted file mode 100644
index 10d5cfd355..0000000000
--- a/scripts/ext_skel_ng/README
+++ /dev/null
@@ -1,36 +0,0 @@
-sorry, no real documentation yet ...
-just a short look at what is going on
-
-ext_skel_ng.php gets an extension description
-from an "extension.xml" file and generates working
-code and documentation stubs from that
-
-call "php ext_skel_ng.php" to see it at work,
-it will create a dummy extension including
-
-- module globals and ini paramter setup
-- function registration and stubbs
-- documentation framework
-- config.m4 (only minimal for now)
-- ...
-
-almost every aspect of an extension may now be
-configured using one xml description file instead
-of the old mixture of command line parameters
-and a proto file
-
-it is even possible to embed function code into
-the xml description right away, so it should be
-possible to create complete working extensions
-from just the xml description without further
-editing in a not to distant future
-
-for now almost all the 'helpfull comments' have
-been removed from the generated code. some of
-them (like 'uncomment this if you have ini params)
-just don't make sense anymore, others will come
-back (configurable) at a later state
-
-... have fun!
-
-Hartmut Holzgraefe <hholzgra@php.net>
diff --git a/scripts/ext_skel_ng/TODO b/scripts/ext_skel_ng/TODO
deleted file mode 100644
index 910d10cfe4..0000000000
--- a/scripts/ext_skel_ng/TODO
+++ /dev/null
@@ -1,16 +0,0 @@
-- more input checking
-- config.m4 support for
- - --with-...
- - library checks
- - header checks
- - C++ linking
- - ...
-- class implementation support
-- more documentation stuff
- - current output yet untested
- - classes
- - requirements (see also confing.m4)
-- protos
- - resource type specification
- - object type specification
- - callable types \ No newline at end of file
diff --git a/scripts/ext_skel_ng/dummy.gif b/scripts/ext_skel_ng/dummy.gif
deleted file mode 100644
index e44ab4306a..0000000000
--- a/scripts/ext_skel_ng/dummy.gif
+++ /dev/null
Binary files differ
diff --git a/scripts/ext_skel_ng/ext_skel_ng.php b/scripts/ext_skel_ng/ext_skel_ng.php
deleted file mode 100644
index e4313649fd..0000000000
--- a/scripts/ext_skel_ng/ext_skel_ng.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
- require_once "extension_parser.php";
-
- $ext = &new extension_parser(fopen("extension.xml", "r"));
-
- system("rm -rf {$ext->name}");
- mkdir($ext->name);
-
- // generate code
- $ext->write_header_file();
- $ext->write_code_file();
- if(isset($ext->logo)) {
- $fp = fopen("{$ext->name}/{$ext->name}_logo.h", "w");
- fwrite($fp, $ext->logo->h_code());
- fclose($fp);
- $ext->logo->h_code();
- }
-
- // generate project files for configure and ms dev studio
- $ext->write_config_m4();
- $ext->write_ms_devstudio_dsp();
-
- $ext->generate_documentation();
-?> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/extension.dtd b/scripts/ext_skel_ng/extension.dtd
deleted file mode 100644
index fa9ea8ce3f..0000000000
--- a/scripts/ext_skel_ng/extension.dtd
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
- -->
-
-<!ELEMENT extension (name|summary|description|license|maintainers|logo|release|changelog|functions|constants|globals|deps|resources)*>
-
-<!ELEMENT name (#PCDATA)>
-
-<!ELEMENT summary (#PCDATA)>
-
-<!ELEMENT description (#PCDATA)>
-
-<!ELEMENT maintainers (maintainer)+>
-
-<!ELEMENT maintainer (user|role|name|email)*>
-
-<!ELEMENT logo>
-<!ATTLIST logo
- src CDATA #REQURED
->
-
-<!ELEMENT user (#PCDATA)>
-
-<!ELEMENT role (#PCDATA)>
-
-<!ELEMENT email (#PCDATA)>
-
-<!ELEMENT changelog (release)*>
-
-<!ELEMENT release (version|license|state|date|notes|filelist|deps)*>
-
-<!ELEMENT version (#PCDATA)>
-
-<!ELEMENT state (#PCDATA)>
-
-<!ELEMENT license (#PCDATA)>
-
-<!ELEMENT date (#PCDATA)>
-
-<!ELEMENT notes (#PCDATA)>
-
-<!ELEMENT functions (function)*>
-<!ELEMENT function (summary|proto|description|code)*>
-<!ATTLIST function
- role (internal|private|public) "public"
- name CDATA #REQUIRED
->
-<!ELEMENT proto (#PCDATA)>
-<!ELEMENT code (#PCDATA)>
-
-<!ELEMENT constants (constant)*>
-<!ELEMENT constant (#PCDATA)>
-<!ATTLIST constant
- name CDATA #REQUIRED
- value CDATA #REQUIRED
- type (string|int|float) "string"
->
-
-<!ELEMENT globals (phpini|global)*>
-<!ELEMENT phpini (#PCDATA)>
-<!ATTLIST phpini
- name CDATA #REQUIRED
- type CDATA #REQUIRED
- value CDATA #REQUIRED
- access (system|perdir|user|all) "all"
- onupdate CDATA #IMPLIED
->
-<!ELEMENT global (#PCDATA)>
-<!ATTLIST global
- name CDATA #REQUIRED
- type CDATA #REQUIRED
->
-
-<!ELEMENT deps (with|lib|header|file|program)*>
-<!ELEMENT with (#PCDATA)>
-<!ATTLIST with
- defaults CDATA #REQUIRED
- testfile CDATA #REQUIRED
- name CDATA #IMPLIED
->
-<!ELEMENT lib (#PCDATA)>
-<!ATTLIST lib
- name CDATA #REQUIRED
- function CDATA #REQUIRED
- searchpath CDATA #IMPLIED
->
-
-<!ELEMENT resources (resource)*>
-<!ELEMENT resource (destruct)?>
-<!ATTLIST resource
- name CDATA #REQUIRED
- payload CDATA #IMPLIED
->
-<!ELEMENT destruct (#PCDATA)> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/extension.xml b/scripts/ext_skel_ng/extension.xml
deleted file mode 100644
index 17cca9d6d9..0000000000
--- a/scripts/ext_skel_ng/extension.xml
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE extension SYSTEM "extension.dtd">
-<extension>
- <name>dummy</name>
- <summary>experimental dummy extension</summary>
- <description>
- this is used for testing of the extension generater only
- </description>
-
- <maintainers>
- <maintainer>
- <user>hholzgra</user>
- <name>Hartmut Holzgraefe</name>
- <email>hholzgra@php.net</email>
- <role>lead</role>
- </maintainer>
- <maintainer>
- <user>dummy</user>
- <name>Crashtest Dummy</name>
- <email>dummy@example.com</email>
- <role>dummy</role>
- </maintainer>
- </maintainers>
-
- <logo src='dummy.gif'></logo>
-
- <release>
- <version>0.1</version>
- <date>2002-02-16</date>
- <state>alpha</state>
- <license>php</license>
- <notes>
- - first experimental draft
- </notes>
- </release>
-
- <changelog>
- </changelog>
-
-
- <deps>
- <!-- these are not yet used in any way :( -->
- <with defaults='/usr:/usr/local' testfile='include/dummy.h'></with>
- <lib name='dummy' function='dummy' searchpath='/usr/lib:/lib'></lib>
- </deps>
-
- <constants>
- <constant name="DUMMY_OK" type="int" value="1">dummy ok status</constant>
- <constant name="DUMMY_ERR" type="int" value="0">dummy fault status</constant>
- </constants>
-
- <globals>
- <global name="foobar" type="int"></global>
- <phpini name="foo_int" type="int" value="42" access="system">some int value</phpini>
- <phpini name="foo_bool" type="int" value="on" access="all" onupdate="OnUpdateBool"></phpini>
- <phpini name="foo_string" type="string" value="foobar" access="all" ></phpini>
- </globals>
-
- <resources>
- <resource name="dummy_resource" payload="char *">
- <description>
- a dummy string resource
- </description>
- <destruct>
-<![CDATA[
- free(resource);
-]]>
- </destruct>
- </resource>
- <resource name="dummy_resource2">
- </resource>
- </resources>
-
-
- <functions>
-
- <function role='internal' name='MINIT'>
- <code>
-<![CDATA[
- int dummy = 42;
-
- dummy = dummy;
-]]>
- </code>
- </function>
-
- <function role='internal' name='MSHUTDOWN'>
- <code>
-<![CDATA[
- int dummy = 42;
-
- dummy = dummy;
-]]>
- </code>
- </function>
-
- <function role='internal' name='RINIT'>
- <code>
-<![CDATA[
- int dummy = 42;
-
- dummy = dummy;
-]]>
- </code>
- </function>
-
- <function role='internal' name='RSHUTDOWN'>
- <code>
-<![CDATA[
- int dummy = 42;
-
- dummy = dummy;
-]]>
- </code>
- </function>
-
- <function role='internal' name='MINFO'>
- <code>
-<![CDATA[
- php_info_print_table_start();
- php_info_print_table_header(2, "test", "table");
- php_info_print_table_end();
-]]>
- </code>
- </function>
-
- <function role='private' name='myfunc'>
- <code>
-<![CDATA[
- static int myfunc(void) {
- return 23;
- }
-]]>
- </code>
- </function>
-
-
- <function role='public' name='dummy_int'>
- <summary>dummy integer conversion</summary>
- <proto>int dummy_int(int bar)</proto>
- <description>
-some funcy longer description
-
-foo
-bar
- </description>
- </function>
-
- <function role='public' name='dummy_resource'>
- <summary>dummy resource test</summary>
- <proto>resource dummy_resource(resource bar)</proto>
- </function>
-
- <function name='dummy_string'>
- <summary>dummy string conversion</summary>
- <proto>string dummy_string(string bar) foobar</proto>
- <code>
-<![CDATA[
- RETURN_STRINGL(bar, bar_len, 1);
-]]>
- </code>
- </function>
-
- <function name ="dummy_void">
- <proto>void dummy_void(void)</proto>
- </function>
-
- <function name ="dummy_void2">
- <proto>void dummy_void2()</proto>
- </function>
-
- </functions>
-
-</extension> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/extension_parser.php b/scripts/ext_skel_ng/extension_parser.php
deleted file mode 100644
index 3323f52593..0000000000
--- a/scripts/ext_skel_ng/extension_parser.php
+++ /dev/null
@@ -1,1071 +0,0 @@
-<?php
- // {{{ includes
-
- require_once "php_element.php";
- require_once "php_constant.php";
- require_once "php_function.php";
- require_once "php_resource.php";
- require_once "php_logo.php";
-
- require_once "xml_stream_parser.php";
- require_once "xml_stream_callback_parser.php";
-
- // }}}
-
- class extension_parser extends xml_stream_callback_parser {
-
- // {{{ constructor
-
- function extension_parser($stream) {
- $this->template_dir = dirname(realpath(__FILE__))."/templates";
-
- $this->name = "foobar";
-
- $this->release = array("version" => "unknown",
- "date" => date("Y-m-d"),
- "state" => "",
- "license" => "unknown",
- "notes" => "",
- );
-
- $this->constants = array();
- $this->resources = array();
- $this->functions = array();
- $this->internal_functions = array();
- $this->private_functions = array();
- $this->globals = array();
- $this->phpini = array();
- $this->users = array();
- $this->dependson = array();
-
- $this->files = array("c"=>array(), "h"=>array());
-
- parent::xml_stream_callback_parser($stream);
- }
-
- // }}}
-
- // {{{ parsing
-
- // {{{ general infos
- function _check_c_name($name, $msg) {
- if(!ereg("^[[:alpha:]_][[:alnum:]_]*$", $name)) {
- $this->error("$name is not a valid $msg");
- }
- }
-
- function handle_extension_name($attr) {
- $this->name = trim($this->cdata);
- $this->_check_c_name($this->name, "extension name");
- }
-
- function handle_extension_summary($attr) {
- $this->summary = trim($this->cdata);
- }
-
- function handle_extension_description($attr) {
- $this->description = $this->cdata;
- }
-
- function handle_extension_logo($attr) {
- $this->logo = &new php_logo($this->name, $attr);
- }
-
-
- function handle_release_version($attr) {
- $this->release['version'] = trim($this->cdata);
- }
-
- function handle_release_state($attr) {
- $this->release['state'] = trim($this->cdata);
- }
-
- function handle_release_license($attr) {
- $this->release['license'] = trim($this->cdata);
- }
-
- function handle_maintainers_maintainer_user($attr) {
- $this->user["user"] = trim($this->cdata);
- }
-
- function handle_maintainers_maintainer_name($attr) {
- $this->user["name"] = trim($this->cdata);
- }
-
- function handle_maintainers_maintainer_email($attr) {
- $this->user["email"] = trim($this->cdata);
- }
-
- function handle_maintainers_maintainer_role($attr) {
- $this->user["role"] = trim($this->cdata);
- }
-
- function handle_maintainers_maintainer($attr) {
- $this->users[$this->user["name"]] = $this->user;
- unset($this->user);
- }
-
-
-
- // }}}
-
- // {{{ constants
-
- function handle_constants_constant($attr) {
-
- $name = $attr["name"];
- $this->_check_c_name($name, "constant name");
-
- $value= $attr["value"];
- $type = isset($attr["type"]) ? $attr["type"] : "string";
-
- switch($type) {
- case "int":
- case "integer":
- $this->constants[] = &new php_constant($name, $value, "integer", trim($this->cdata));
- break;
-
- case "float":
- case "double":
- case "real":
- if (!is_numeric($value)) $this->error("invalid value for integer constant: '$value'");
- $this->constants[] = &new php_constant($name, $value, "float", trim($this->cdata));
- break;
-
- case "string":
- default:
- $this->constants[] = &new php_constant($name, $value, "string", trim($this->cdata));
- break;
- }
- }
-
- // }}}
-
- // {{{ resources
-
- function handle_resources_resource_destruct($attr) {
- $this->resource_destruct = $this->cdata;
- }
-
- function handle_resources_resource_description($attr) {
- $this->resource_description = $this->cdata;
- }
-
- function handle_resources_resource($attr) {
- $this->_check_c_name($attr['name'], "resource name");
-
- $this->resources[] = new php_resource($attr['name'],
- @$attr['payload'],
- @$this->resource_destruct,
- @$this->resource_description);
-
- unset($this->resource_description);
- unset($this->resource_destruct);
- }
-
- // }}}
-
- // {{{ functions
-
- function handle_functions_function_summary($attr) {
- $this->func_summary = trim($this->cdata);
- }
-
- function handle_functions_function_proto($attr) {
- $this->func_proto = trim($this->cdata);
- }
-
- function handle_functions_function_description($attr) {
- $this->func_desc = trim($this->cdata);
- }
-
- function handle_functions_function_code($attr) {
- $this->func_code = $this->cdata;
- }
-
- function handle_functions_function($attr) {
- $this->_check_c_name($attr['name'], "function name");
-
- $role = isset($attr['role']) ? $attr['role'] : "public";
- $function = new php_function($attr['name'], @$this->func_summary, @$this->func_proto, @$this->func_desc, @$this->func_code, $role);
- switch($role) {
- case "internal":
- $this->internal_functions[$attr['name']] = $function;
- break;
- case "private":
- $this->private_functions[$attr['name']] = $function;
- break;
- case "public":
- $this->functions[$attr['name']] = $function;
- break;
- default:
- $this->error("function role must be either public, private or internal");
- break;
- }
- unset($this->func_summary);
- unset($this->func_proto);
- unset($this->func_desc);
- unset($this->func_code);
- }
-
- // }}}
-
- // {{{ globals and php.ini
-
- function handle_globals_global($attr) {
- $this->_check_c_name($attr['name'], "variable name");
- if($attr["type"] == "string") $attr["type"] = "char*";
- $this->globals[$attr["name"]] = $attr;
- }
-
- function handle_globals_phpini($attr) {
- $this->_check_c_name($attr['name'], "php.ini directice name");
- $ini = array("name" => $attr["name"],
- "type" => $attr["type"],
- "value"=> $attr["value"],
- "desc" => trim($this->cdata)
- );
- switch($attr["access"]) {
- case "system":
- $ini["access"] = "PHP_INI_SYSTEM";
- break;
- case "perdir":
- $ini["access"] = "PHP_INI_PERDIR";
- break;
- case "user":
- $ini["access"] = "PHP_INI_USER";
- break;
- case "all":
- default:
- $ini["access"] = "PHP_INI_ALL";
- break;
- }
- if(isset($attr["onupdate"])) {
- $ini["onupdate"] = $attr["onupdate"];
- } else {
- switch($attr["type"]) {
- case "int":
- case "long":
- $ini["onupdate"] = "OnUpdateInt";
- break;
- case "float":
- case "double":
- $ini["onupdate"] = "OnUpdateFloat";
- break;
- case "string":
- $ini["type"] = "char*";
- // fallthru
- case "char*":
- $ini["onupdate"] = "OnUpdateString";
- break;
- }
- }
- $this->phpini[$attr["name"]] = $ini;
- $this->handle_globals_global($attr);
- }
-
- // }}}
-
- // }}}
-
- // {{{ output generation
-
- // {{{ docbook documentation
-
- function generate_documentation() {
- system("rm -rf {$this->name}/manual");
- mkdir("{$this->name}/manual");
-
- $docdir = "{$this->name}/manual/".$this->name;
- mkdir($docdir);
-
- $fp = fopen("$docdir/reference.xml", "w");
- fputs($fp,
-"<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- \$Revision$ -->
- <reference id='ref.{$this->name}'>
- <title>{$this->summary}</title>
- <titleabbrev>{$this->name}</titleabbrev>
-
- <partintro>
- <section id='{$this->name}.intro'>
- &reftitle.intro;
- <para>
-{$this->description}
- </para>
- </section>
-
- <section id='{$this->name}.requirements'>
- &reftitle.required;
- <para>
- </para>
- </section>
-
- &reference.{$this->name}.configure;
-
- <section id='{$this->name}.configuration'>
- &reftitle.runtime;
-");
-
- if(empty($this->phpini)) {
- fputs($fp, " &no.config;\n");
- } else {
- fputs($fp,
-" <table>
- <title>{$this->name} runtime configuration</title>
- <tgroup cols='3'>
- <thead>
- <row>
- <entry>directive</entry>
- <entry>default value</entry>
- <entry>descrpition</entry>
- </row>
- </thead>
- <tbody>
-");
- foreach($this->phpini as $directive) {
- fputs($fp,
-" <row>
- <entry>$directive[name]</entry>
- <entry>$directive[value]</entry>
- <entry>$directive[desc]</entry>
- </row>
-");
- }
- fputs($fp,
-" </tbody>
- </tgroup>
- </table>
-");
- }
-
- fputs($fp,
-" </section>
-
- <section id='{$this->name}.resources'>
- &reftitle.resources;
-");
-
- if (empty($this->resources)) {
- fputs($fp, " &no.resource;\n");
- } else {
- foreach ($this->resources as $resource) {
- fputs($fp, $resource->docbook_xml($this->name));
- }
- }
-
-
- fputs($fp,
-" </section>
-
- <section id='{$this->name}.constants'>
- &reftitle.constants;
-");
- if(empty($this->constants)) {
- fputs($fp, " &no.constants;\n");
- } else {
- fputs($fp,
-" <table>
- <title>{$this->name} constants</title>
- <tgroup cols='3'>
- <thead>
- <row>
- <entry>name</entry>
- <entry>value</entry>
- <entry>descrpition</entry>
- </row>
- </thead>
- <tbody>
-");
- foreach($this->constants as $constant) {
- fputs($fp, $constant->docbook_xml($this->name));
- }
- fputs($fp,
-" </tbody>
- </tgroup>
- </table>
-");
- }
- fputs($fp,
-" </section>
-
- </partintro>
-
-&reference.{$this->name}.functions;
-
- </reference>
-");
- fputs($fp, php_element::docbook_editor_footer());
-
- fclose($fp);
-
- mkdir("$docdir/functions");
- foreach($this->functions as $name => $function) {
- $filename = $docdir . "/functions/" . strtolower(str_replace("_", "-", $name)) . ".xml";
- $funcfile = fopen($filename, "w");
- fputs($funcfile, $function->docbook_xml());
- fclose($funcfile);
- }
- }
-
- // }}}
-
- // {{{ extension entry
-
- function generate_extension_entry() {
- return '
-/* {{{ '.$this->name.'_module_entry
- */
-zend_module_entry '.$this->name.'_module_entry = {
- STANDARD_MODULE_HEADER,
- "'.$this->name.'",
- '.$this->name.'_functions,
- PHP_MINIT('.$this->name.'), /* Replace with NULL if there is nothing to do at php startup */
- PHP_MSHUTDOWN('.$this->name.'), /* Replace with NULL if there is nothing to do at php shutdown */
- PHP_RINIT('.$this->name.'), /* Replace with NULL if there is nothing to do at request start */
- PHP_RSHUTDOWN('.$this->name.'), /* Replace with NULL if there is nothing to do at request end */
- PHP_MINFO('.$this->name.'),
- "'.$this->release['version'].'",
- STANDARD_MODULE_PROPERTIES
-};
-/* }}} */
-
-#ifdef COMPILE_DL_'.strtoupper($this->name).'
-ZEND_GET_MODULE('.$this->name.')
-#endif
-';
- }
-
- // }}}
-
- // {{{ globals and ini
-
- function generate_globals_c() {
- if (empty($this->globals)) return "";
-
- $code = "ZEND_DECLARE_MODULE_GLOBALS({$this->name})\n\n";
-
- if (!empty($this->phpini)) {
- $code .= "PHP_INI_BEGIN()\n";
- foreach ($this->phpini as $name => $ini) {
- $code .= " STD_PHP_INI_ENTRY(\"{$this->name}.$name\", \"$ini[value]\", $ini[access], $ini[onupdate], $name, zend_{$this->name}_globals, {$this->name}_globals)\n";
- }
- $code .= "PHP_INI_END()\n\n";
- $code .= "static void php_{$this->name}_init_globals(zend_{$this->name}_globals *{$this->name}_globals)\n";
- $code .= "{\n";
- foreach ($this->globals as $name => $ini) {
- $code .= " {$this->name}_globals->$name = ";
- if (strstr($ini["type"],"*")) {
- $code .= "NULL;\n";
- } else {
- $code .= "0;\n";
- }
- }
- $code .= "}\n\n";
- return $code;
- }
- }
-
- function generate_globals_h() {
- if (empty($this->globals)) return "";
-
- $code = "ZEND_BEGIN_MODULE_GLOBALS({$this->name})\n";
- foreach($this->globals as $name => $global) {
- $code .= " $global[type] $name;\n";
- }
- $code.= "ZEND_END_MODULE_GLOBALS({$this->name})\n";
-
- $upname = strtoupper($this->name);
-
- $code.= "
-
-#ifdef ZTS
-#define {$upname}_G(v) TSRMG({$this->name}_globals_id, zend_{$this->name}_globals *, v)
-#else
-#define {$upname}_G(v) ({$this->name}_globals.v)
-#endif
-
-";
-
- return $code;
- }
-
- // }}}
-
- // {{{ license and authoers
-
- function get_license() {
- $code = "/*\n";
- switch($this->release['license']) {
- case "php":
- $code.=
-' +----------------------------------------------------------------------+
- | PHP Version 4 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2002 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 2.02 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available at through the world-wide-web at |
- | http://www.php.net/license/2_02.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
-';
- break;
-
- default:
- $code.=
-" +----------------------------------------------------------------------+
- | unkown license: '{$this->release['license']}' |
- +----------------------------------------------------------------------+
-";
- break;
- }
-
- $code.= " +----------------------------------------------------------------------+\n";
- $prefix = "Authors: ";
- foreach($this->users as $name => $user) {
- $code .= sprintf(" | $prefix %-58s |\n", "$user[name] <$user[email]>");
- $prefix = str_repeat(" ",strlen($prefix));
- }
- $code.= " +----------------------------------------------------------------------+\n";
- $code.= "*/\n\n";
-
- $code.= "/* $ Id: $ */ \n\n";
-
- return $code;
- }
-
- // }}}
-
- // {{{ editor config footer
-
- function editor_config_c() {
- return '
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
-';
- }
-
- // }}}
-
- // {{{ header file
-
- function write_header_file() {
- $filename = "php_{$this->name}.h";
-
- $this->files["h"][] = $filename;
- $fp = fopen("{$this->name}/$filename", "w");
-
- $upname = strtoupper($this->name);
-
- fputs($fp, $this->get_license());
- fputs($fp, "#ifndef PHP_{$upname}_H\n");
- fputs($fp, "#define PHP_{$upname}_H\n\n");
-
- fputs($fp, "#ifndef PHP_HAVE_{$upname}\n\n");
-
- fputs($fp, "
-extern zend_module_entry {$this->name}_module_entry;
-#define phpext_{$this->name}_ptr &{$this->name}_module_entry
-
-#ifdef PHP_WIN32
-#define PHP_{$upname}_API __declspec(dllexport)
-#else
-#define PHP_{$upname}_API
-#endif
-
-PHP_MINIT_FUNCTION({$this->name});
-PHP_MSHUTDOWN_FUNCTION({$this->name});
-PHP_RINIT_FUNCTION({$this->name});
-PHP_RSHUTDOWN_FUNCTION({$this->name});
-PHP_MINFO_FUNCTION({$this->name});
-
-#ifdef ZTS
-#include \"TSRM.h\"
-#endif
-
-");
-
- fputs($fp, $this->generate_globals_h());
-
- fputs($fp, "\n");
-
- foreach($this->functions as $name => $function) {
- fputs($fp, "PHP_FUNCTION($name);\n");
- }
-
- fputs($fp, "\n");
-
- fputs($fp, "#endif /* PHP_HAVE_{$upname} */\n\n");
- fputs($fp, "#endif /* PHP_{$upname}_H */\n\n");
-
- fputs($fp, $this->editor_config_c());
-
- fclose($fp);
- }
-
- // }}}
-
- // {{{ internal functions
-
- function internal_functions_c() {
- $need_block = false;
-
- $code = "
-/* {{{ PHP_MINIT_FUNCTION */
-PHP_MINIT_FUNCTION({$this->name})
-{
-";
-
- if (count($this->globals)) {
- $code .= "\tZEND_INIT_MODULE_GLOBALS({$this->name}, php_{$this->name}_init_globals, NULL)\n";
- $need_block = true;
- }
-
- if (count($this->phpini)) {
- $code .= "\tREGISTER_INI_ENTRIES();\n";
- $need_block = true;
- }
-
- if (isset($this->logo)) {
- $code .= $this->logo->minit_code();
- $need_block = true;
- }
-
- if (count($this->constants)) {
- foreach ($this->constants as $constant) {
- $code .= $constant->c_code();
- }
- $need_block = true;
- }
-
- if (count($this->resources)) {
- foreach ($this->resources as $resource) {
- $code .= $resource->minit_code();
- }
- $need_block = true;
- }
-
- if (isset($this->internal_functions['MINIT'])) {
- if($need_block) $code .= "\n\t{\n";
- $code .= $this->internal_functions['MINIT']->code;
- if($need_block) $code .= "\n\t}\n";
- } else {
- $code .="\n\t/* add your stuff here */\n";
- }
- $code .= "
- return SUCCESS;
-}
-/* }}} */
-
-";
-
- $code .= "
-/* {{{ PHP_MSHUTDOWN_FUNCTION */
-PHP_MSHUTDOWN_FUNCTION({$this->name})
-{
-";
-
- if(count($this->phpini)) {
- $code .= "\tUNREGISTER_INI_ENTRIES();\n";
- }
-
- if(isset($this->internal_functions['MSHUTDOWN'])) {
- if(count($this->phpini)) $code .= "\n\t{\n";
- $code .= $this->internal_functions['MSHUTDOWN']->code;
- if(count($this->phpini)) $code .= "\n\t}\n";
- } else {
- $code .="\n\t/* add your stuff here */\n";
- }
-
- $code .= "
- return SUCCESS;
-}
-/* }}} */
-
-";
-
- $code .= "
-/* {{{ PHP_RINIT_FUNCTION */
-PHP_RINIT_FUNCTION({$this->name})
-{
-";
-
- if(isset($this->internal_functions['RINIT'])) {
- $code .= $this->internal_functions['RINIT']->code;
- } else {
- $code .= " /* add your stuff here */\n";
- }
-
- $code .= "
-\treturn SUCCESS;
-}
-/* }}} */
-
-";
-
- $code .= "
-/* {{{ PHP_RSHUTDOWN_FUNCTION */
-PHP_RSHUTDOWN_FUNCTION({$this->name})
-{
-";
-
- if(isset($this->internal_functions['RSHUTDOWN'])) {
- $code .= $this->internal_functions['RSHUTDOWN']->code;
- } else {
- $code .= " /* add your stuff here */\n";
- }
-
- $code .= "
-\treturn SUCCESS;
-}
-/* }}} */
-
-";
-
- $code .= "
-/* {{{ PHP_MINFO_FUNCTION */
-PHP_MINFO_FUNCTION({$this->name})
-{
- php_info_print_box_start(0);
-";
-
- if(isset($this->logo))
- {
- $code.= "
- php_printf(\"<img src='\");
- if (SG(request_info).request_uri) {
- php_printf(\"%s\", (SG(request_info).request_uri));
- }
- php_printf(\"?=%s\", ".($this->logo->id).");
- php_printf(\"' align={'right' alt='image' border='0'>\\n\");
-
-";
- }
-
- if(isset($this->summary)) {
- $code .= " php_printf(\"<p>{$this->summary}</p>\\n\");\n";
- }
- if(isset($this->release)) {
- $code .= " php_printf(\"<p>Version {$this->release['version']}{$this->release['state']} ({$this->release['date']})</p>\\n\");\n";
- }
-
- if(count($this->users)) {
- $code .= " php_printf(\"<p><b>Authors:</b></p>\\n\");\n";
- foreach($this->users as $user) {
- $code .= " php_printf(\"<p>$user[name] &lt;$user[email]&gt; ($user[role])</p>\\n\");\n";
- }
- }
-
- $code.=
-" php_info_print_box_end();
-";
-
- if(isset($this->internal_functions['MINFO'])) {
- $code .= "\n\t{\n";
- $code .= $this->internal_functions['MINFO']->code;
- $code .= "\n\t}\n";
- } else {
- $code .= "\t/* add your stuff here */\n";
- }
-
-
-if(count($this->phpini)) {
- $code .= "\n\tDISPLAY_INI_ENTRIES();";
-}
-$code .= "
-}
-/* }}} */
-
-";
-
- return $code;
- }
-
- // }}}
-
-
- function private_functions_c() {
- $code = "";
-
- foreach ($this->private_functions as $name => $func) {
- $code .= "\n\t/* {{{ $name() */\n{$func->code}\n\t/* }}} */\n\n";
- }
-
- return $code;
- }
-
- // {{{ public functions
-
- function public_functions_c() {
- $code = "";
-
- foreach($this->functions as $function) {
- $code .= $function->c_code();
- }
-
- return $code;
- }
-
- // }}}
-
-
- // {{{ code file
-
- function write_code_file() {
- $filename = "{$this->name}.c";
-
- $this->files["c"][] = $filename;
- $fp = fopen("{$this->name}/$filename", "w");
-
- $upname = strtoupper($this->name);
-
- fputs($fp, $this->get_license());
-
- fputs($fp, '
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <php.h>
-#include <php_ini.h>
-#include <SAPI.h>
-#include <ext/standard/info.h>
-
-');
- fputs($fp, "#include \"php_{$this->name}.h\"\n\n");
-
- if (isset($this->logo)) {
- fputs($fp, $this->logo->c_code());
- }
-
- if (!empty($this->globals)) {
- fputs($fp, "ZEND_DECLARE_MODULE_GLOBALS({$this->name})\n\n");
- }
-
- if (!empty($this->resources)) {
- foreach ($this->resources as $resource) {
- fputs($fp, $resource->c_code());
- }
- }
-
- fputs($fp, "/* {{{ {$this->name}_functions[] */\n");
- fputs($fp, "function_entry {$this->name}_functions[] = {\n");
- foreach($this->functions as $name => $function) {
- fputs($fp, sprintf("\tPHP_FE(%-20s, NULL)\n",$name));
- }
- fputs($fp, "};\n/* }}} */\n\n");
-
- fputs($fp, $this->generate_extension_entry());
-
- fputs($fp, "\n/* {{{ globals and ini entries */\n");
- fputs($fp, $this->generate_globals_c());
- fputs($fp, "/* }}} */\n\n");
-
- fputs($fp, $this->internal_functions_c());
-
- fputs($fp, $this->private_functions_c());
-
- fputs($fp, $this->public_functions_c());
-
- fputs($fp, $this->editor_config_c());
- }
-
- // }}}
-
-
- // {{{ config.m4 file
- function write_config_m4() {
-
- $upname = $this->name;
-
- $fp = fopen("{$this->name}/config.m4", "w");
- fputs($fp,
-"dnl
-dnl \$ Id: \$
-dnl
-
-PHP_ARG_ENABLE({$this->name} , whether to enable {$this->name} functions,
-[ --disable-{$this->name} Disable {$this->name} functions], yes)
-
-if test \"\$PHP_$upname\" != \"no\"; then
- AC_DEFINE(HAVE_$upname, 1, [ ])
- PHP_NEW_EXTENSION({$this->name}, ".join(" ", $this->files['c'])." , \$ext_shared)
-fi
-");
- fclose($fp);
- }
-
- // }}}
-
- // {{{ M$ dev studio project file
-
- function write_ms_devstudio_dsp() {
- // TODO files should come from external list
-
- $fp = fopen("{$this->name}/{$this->name}.dsp","w");
- fwrite($fp,
-'# Microsoft Developer Studio Project File - Name="'.$this->name.'" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG='.$this->name.' - Win32 Debug_TS
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "'.$this->name.'.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "'.$this->name.'.mak" CFG="'.$this->name.' - Win32 Debug_TS"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "'.$this->name.' - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "'.$this->name.' - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "'.$this->name.' - Win32 Release_TS"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release_TS"
-# PROP BASE Intermediate_Dir "Release_TS"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release_TS"
-# PROP Intermediate_Dir "Release_TS"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "'.strtoupper($this->name).'_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D "WIN32" /D "PHP_EXPORTS" /D "COMPILE_DL_'.strtoupper($this->name).'" /D ZTS=1 /D HAVE_'.strtoupper($this->name).'=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x407 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 php4ts.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_'.$this->name.'.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
-
-!ELSEIF "$(CFG)" == "'.$this->name.' - Win32 Debug_TS"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug_TS"
-# PROP BASE Intermediate_Dir "Debug_TS"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug_TS"
-# PROP Intermediate_Dir "Debug_TS"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "'.strtoupper($this->name).'_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D "COMPILE_DL_'.strtoupper($this->name).'" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_'.strtoupper($this->name).'=1 /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 php4ts_debug.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_'.$this->name.'.dll" /pdbtype:sept /libpath:"..\..\Debug_TS"
-
-!ENDIF
-
-# Begin Target
-
-# Name "'.$this->name.' - Win32 Release_TS"
-# Name "'.$this->name.' - Win32 Debug_TS"
-');
-
-
- fputs($fp,'
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-');
-
- foreach($this->files['c'] as $filename) {
- if($filename{0}!='/' && $filename{0}!='.') {
- $filename = "./$filename";
- }
- $filename = str_replace("/","\\",$filename);
-
- fputs($fp,"
-# Begin Source File
-
-SOURCE=$filename
-# End Source File
-");
- }
-
-fputs($fp,'
-# End Group
-');
-
-
-
-
-fputs($fp,'
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-');
- foreach($this->files['h'] as $filename) {
- if($filename{0}!='/' && $filename{0}!='.') {
- $filename = "./$filename";
- }
- $filename = str_replace("/","\\",$filename);
-
- fputs($fp,"
-# Begin Source File
-
-SOURCE=$filename
-# End Source File
-");
- }
-
-fputs($fp,
-'# End Group
-# End Target
-# End Project
-');
-
-
-
-fclose($fp);
- }
-
-// }}}
-
- // }}}
-
- }
-
-?> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/php_constant.php b/scripts/ext_skel_ng/php_constant.php
deleted file mode 100644
index fd1ac36352..0000000000
--- a/scripts/ext_skel_ng/php_constant.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- class php_constant extends php_element {
- function php_constant($name, $value, $type="string", $desc="") {
- $this->name = $name;
- $this->value= $value;
- $this->type = $type;
- $this->desc = $desc;
- }
-
- function c_code() {
- switch($this->type) {
- case "integer":
- return "REGISTER_LONG_CONSTANT(\"{$this->name}\", {$this->value}, 0);\n";
-
- case "float":
- return "REGISTER_DOUBLE_CONSTANT(\"{$this->name}\", {$this->value}, 0);\n";
-
- case "string":
- return "REGISTER_STRING_CONSTANT(\"{$this->name}\", \"$value\", ".strlen($this->value).", 0);\n";
- }
- }
-
- function docbook_xml() {
- return trim("
-<row>
- <entry>
- <constant id='constant".strtolower(str_replace("_","-",$this->name))."'>$name</constant>
- (<link linkend='language.types.integer'>integer</link>)
- </entry>
- <entry>{$this->value}</entry>
- <entry>{$this->desc}</entry>
-</row>
-")."\n";
- }
- }
-
-?> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/php_element.php b/scripts/ext_skel_ng/php_element.php
deleted file mode 100644
index 83de9dc110..0000000000
--- a/scripts/ext_skel_ng/php_element.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-class php_element {
- function is_type($name) {
- $types = array("void" => "void",
- "bool" => "bool",
- "boolean" => "bool",
- "int" => "int",
- "integer" => "int",
- "float" => "float",
- "double" => "float",
- "real" => "float",
- "string" => "string",
- "array" => "array",
- "object" => "object",
- "resource" => "resource",
- "mixed" => "mixes",
- );
-
- if(isset($types[$name])) {
- return $types[$name];
- } else {
- return false;
- }
- }
-
- function is_name($name) {
- if(ereg("[a-zA-Z0-9_]",$name)) {
- // TODO reserved words
- return true;
- }
- return false;
- }
-
-
- function c_code() {
- return "";
- }
-
- function h_code() {
- return "";
- }
-
- function docbook_xml() {
- return "";
- }
-
- function docbook_editor_footer($level=3) {
- return '
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:1
-sgml-indent-data:t
-indent-tabs-mode:nil
-sgml-parent-document:nil
-sgml-default-dtd-file:"'.str_repeat("../",$level).'manual.ced"
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-End:
-vim600: syn=xml fen fdm=syntax fdl=2 si
-vim: et tw=78 syn=sgml
-vi: ts=1 sw=1
--->
-';
- }
-}
-
-?> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/php_function.php b/scripts/ext_skel_ng/php_function.php
deleted file mode 100644
index 5360e79772..0000000000
--- a/scripts/ext_skel_ng/php_function.php
+++ /dev/null
@@ -1,232 +0,0 @@
-<?php
-
- class php_function extends php_element {
- // all known php types
- function php_function($name, $summary, $proto, $desc="", $code="", $role="") {
- $this->name = $name;
- $this->summary = $summary;
- $this->desc = empty($desc) ? "&warn.undocumented.func;" : $desc;
- $this->code = $code;
- $this->role = empty($role) ? "public" : $role;
- if($this->role === "public") $this->parse_proto($proto);
- }
-
- function parse_proto($proto) {
- // 'tokenize' it
- $len=strlen($proto);
- $name="";
- $tokens=array();
- for($n=0;$n<$len;$n++) {
- $char = $proto{$n};
- if(ereg("[a-zA-Z0-9_]",$char)) {
- $name.=$char;
- } else {
- if($name) $tokens[]=$name;
- $name="";
- if(trim($char)) $tokens[]=$char;
- }
- }
- if($name) $tokens[]=$name;
-
- $n=0;
- $opts=0;
- $params=array();
- $return_type = ($this->is_type($tokens[$n])) ? $tokens[$n++] : "void";
- if(! $this->is_name($tokens[$n])) die("$tokens[$n] is not a valid function name");
- $function_name = $tokens[$n++];
- if($tokens[$n]!='(') die("'(' expected instead of '$tokens[$n]'");
- if($tokens[++$n]!=')') {
- for($param=0;$tokens[$n];$n++,$param++) {
- if($tokens[$n]=='[') {
- $params[$param]['optional']=true;
- $opts++;
- $n++;
- if($param>0) {
- if ($tokens[$n]!=',') die("',' expected after '[' instead of $token[$n]");
- $n++;
- }
- }
- if(!$this->is_type($tokens[$n])) die("type name expected instead of $tokens[$n]");
- $params[$param]['type']=$tokens[$n];
- $n++;
- if($this->is_name($tokens[$n])) {
- $params[$param]['name']=$tokens[$n];
- $n++;
- }
- if($tokens[$n]=='[') {
- $n--;
- continue;
- }
- if($tokens[$n]==',') continue;
- if($tokens[$n]==']') break;
- if($tokens[$n]==')') break;
- }
- }
- $numopts=$opts;
- while($tokens[$n]==']') {
- $n++;
- $opts--;
- }
- if($opts!=0) die ("'[' / ']' count mismatch");
- if($tokens[$n] != ')') die ("')' expected instead of $tokens[$n]");
-
- $this->name = $function_name;
- $this->returns = $return_type;
- $this->params = $params;
- $this->optional = $numopts;
- }
-
- function c_code() {
- $code = "";
-
- switch($this->role) {
- case "public":
- $code .= "\n/* {{{ proto {$this->returns} {$this->name}(";
- if(isset($this->params)) {
- foreach($this->params as $key => $param) {
- if(!empty($param['optional']))
- $code.=" [";
- if($key)
- $code.=", ";
- $code .= $param['type']." ";
- if($param['type'] !== 'void') {
- $code .= $param['name'];
- }
- }
- }
- for($n=$this->optional; $n>0; $n--) {
- $code .= "]";
- }
- $code .= ")\n ";
- if(!empty($this->summary)) {
- $code .= $this->summary;
- }
- $code .= " */\n";
- $code .= "PHP_FUNCTION({$this->name})\n";
- $code .= "{\n";
- if(isset($this->params) && count($this->params)) {
- $arg_string="";
- $arg_pointers=array();
- $optional=false;
- $res_fetch="";
- foreach($this->params as $param) {
- if($param["type"] === "void") continue;
- $name = $param['name'];
- $arg_pointers[]="&$name";
- if(isset($param['optional'])&&!$optional) {
- $optional=true;
- $arg_string.="|";
- }
- switch($param['type']) {
- case "bool":
- $arg_string.="b";
- $code .= " zend_bool $name = 0;\n";
- break;
- case "int":
- $arg_string.="l";
- $code .= " long $name = 0;\n";
- break;
- case "float":
- $arg_string.="d";
- $code .= " double $name = 0.0;\n";
- break;
- case "string":
- $arg_string.="s";
- $code .= " char * $name = NULL;\n";
- $code .= " int {$name}_len = 0;\n";
- $arg_pointers[]="&{$name}_len";
- break;
- case "array":
- $arg_string.="a";
- $code .= " zval * $name = NULL;\n";
- break;
- case "object":
- $arg_string.="o";
- $code .= " zval * $name = NULL;\n";
- break;
- case "resource":
- $arg_string.="r";
- $code .= " zval * $name = NULL;\n";
- $code .= " int * {$name}_id = -1;\n";
- $arg_pointers[]="&{$name}_id";
- $res_fetch.=" if ($name) {\n"
- ." ZEND_FETCH_RESOURCE(???, ???, $name, {$name}_id, \"???\", ???_rsrc_id);\n"
- ." }\n";
- break;
- case "mixed":
- $arg_string.="z";
- $code .= " zval * $name = NULL;\n";
- break;
- }
- }
- }
-
- if(isset($arg_string) && strlen($arg_string)) {
- $code .= " int argc = ZEND_NUM_ARGS();\n\n";
- $code .= "\n if (zend_parse_parameters(argc TSRMLS_CC, \"$arg_string\", ".join(", ",$arg_pointers).") == FAILURE) return;\n";
- if($res_fetch) $code.="\n$res_fetch\n";
- } else {
- $code .= " if (ZEND_NUM_ARGS()>0) { WRONG_PARAM_COUNT; }\n\n";
- }
-
- $code .= " php_error(E_WARNING, \"{$this->name}: not yet implemented\");\n";
- $code .= "}\n/* }}} */\n\n";
- break;
- case "internal":
- if(!empty($this->code)) {
- $code .= " {\n";
- $code .= $this->code."\n";
- $code .= " }\n";
- }
- break;
- case "private":
- $code .= $this->code."\n";
- break;
- }
- return $code;
- }
-
- function docbook_xml() {
- $xml =
-'<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision$ -->
- <refentry id="function.'.strtolower(str_replace("_","-",$this->name)).'">
- <refnamediv>
- <refname>'.$this->name.'</refname>
- <refpurpose>'.$this->summary.'</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <methodsynopsis>
-';
-
- $xml .= " <type>{$this->returns}</type><methodname>{$this->name}</methodname>\n";
- if(empty($this->params)) {
- $xml .= " <void/>\n";
- } else {
- foreach($this->params as $key => $param) {
- if(isset($param['optional'])) {
- $xml .= " <methodparam choice='opt'>";
- } else {
- $xml .= " <methodparam>";
- }
- $xml .= "<type>$param[type]</type><parameter>$param[name]</parameter>";
- $xml .= "</methodparam>\n";
- }
- }
-
-$xml .=
-' </methodsynopsis>
- <para>
-'.$this->desc.'
- </para>
- </refsect1>
- </refentry>
-';
- $xml .= $this->docbook_editor_footer(4);
-
- return $xml;
- }
- }
-
-?> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/php_logo.php b/scripts/ext_skel_ng/php_logo.php
deleted file mode 100644
index 5d2adf6fad..0000000000
--- a/scripts/ext_skel_ng/php_logo.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
- class php_logo extends php_element {
- function php_logo($name, $attr) {
- $this->name = $name;
- $this->attr = $attr;
- $this->id = '"'.strtoupper($name).'_LOGO_ID"';
-
- $this->data = file_get_contents($attr['src']);
- $this->size = strlen($this->data);
-
- $this->mime_type = "image/gif";
- }
-
- function docbook_xml($base) {
- return "";
- }
-
- function minit_code() {
- return " php_register_info_logo({$this->id}, \"{$this->mime_type}\", {$this->name}_logo, {$this->size});\n";
- }
-
- function c_code() {
- return "
-static unsigned char {$this->name}_logo[] = {
-#include \"{$this->name}_logo.h\"
-};
-";
- }
-
- function h_code() {
- $len = strlen($this->data);
- $code = " ";
- $i=0;
- for($n = 0; $n < $len; $n++) {
- $code .= sprintf(" %3d",ord($this->data[$n]));
- if($n == $len - 1) break;
- $code .= ",";
- if(++$i==8) {
- $code .= "\n ";
- $i=0;
- }
- }
-
- $code .= "\n";
-
- return $code;
- }
- }
-
-?> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/php_resource.php b/scripts/ext_skel_ng/php_resource.php
deleted file mode 100644
index ea99405841..0000000000
--- a/scripts/ext_skel_ng/php_resource.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-
- class php_resource extends php_element {
- function php_resource($name, $payload, $destruct, $description) {
- $this->name = $name;
- $this->payload = $payload;
- $this->destruct = $destruct;
- $this->description = $description;
-
- if (empty($this->destruct) && strstr($this->payload, "*")) {
- $this->destruct = " free(resource);\n";
- }
-
- if(empty($this->payload)) {
- $this->payload = "int";
- }
- }
-
- function docbook_xml($base) {
- return "
- <section id='$base.resources.{$this->name}'>
- <title><litera>{$this->name}</literal></title>
- <para>
- {$this->description}
- </para>
- </section>
-";
- }
-
- function minit_code() {
- return "
-le_{$this->name} = zend_register_list_destructors_ex({$this->name}_dtor,
- NULL,
- \"{$this->name}\",
- module_number);
-
-";
- }
-
- function c_code() {
- return "
-int le_{$this->name};
-
-void {$this->name}_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
-{
- {$this->payload} resource = ({$this->payload})(rsrc->ptr);
-
- {$this->destruct}
-}
-";
- }
-
- function h_code() {
- $upname = strtoupper($this->name);
-
- return "
-#define {$upname}_FETCH(r, z) ZEND_FETCH_RESOURCE(r, {$this->payload}, z, -1, ${$this->name}, le_{$this->name }); \
- if(!r) { RETURN_FALSE; }
-
-#define {$upname}_REGISTER(r) ZEND_REGISTER_RESOURCE(return_value, r, le_{$this->name });
-";
- }
- }
-
-?> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/xml_stream_callback_parser.php b/scripts/ext_skel_ng/xml_stream_callback_parser.php
deleted file mode 100644
index 50f1a1c5be..0000000000
--- a/scripts/ext_skel_ng/xml_stream_callback_parser.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
- class xml_stream_callback_parser extends xml_stream_parser {
- function xml_stream_callback_parser ($stream) {
- $this->cdata = "";
- $this->tags = array();
- $this->attrs = array();
-
- parent::xml_stream_parser($stream);
- }
-
- function cdata($parser, $cdata) {
- $this->cdata .= $cdata;
- }
-
- function tag_open($parser, $tag, $attributes) {
- array_push($this->tags, $tag);
- array_push($this->attrs, $attributes);
- }
-
- function tag_close($parser, $tag) {
- $attributes = array_pop($this->attrs);
-
- for ($tags = $this->tags; count($tags); array_shift($tags)) {
- $method = "handle_".join("_", $tags);
- if(method_exists($this, $method)) {
- $this->$method($attributes);
- break;
- }
- }
-
- $this->cdata = "";
- array_pop($this->tags);
- }
- }
-?> \ No newline at end of file
diff --git a/scripts/ext_skel_ng/xml_stream_parser.php b/scripts/ext_skel_ng/xml_stream_parser.php
deleted file mode 100644
index 626c50b154..0000000000
--- a/scripts/ext_skel_ng/xml_stream_parser.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-class xml_stream_parser {
- var $parser;
-
- function xml_stream_parser($stream)
- {
- if(!is_resource($stream)) die("not a stream");
- if(get_resource_type($stream) != "stream") die("not a stream");
-
- $this->parser = xml_parser_create();
-
- xml_set_object($this->parser, $this);
- xml_set_element_handler($this->parser, "tag_open", "tag_close");
- xml_set_character_data_handler($this->parser, "cdata");
- xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
-
- while(!feof($stream)) {
- xml_parse($this->parser, fgets($stream), feof($stream));
- }
- xml_parser_free($this->parser);
- }
-
- function tag_open($parser, $tag, $attributes)
- {
- var_dump($parser, $tag, $attributes);
- }
-
- function cdata($parser, $cdata)
- {
- var_dump($parser, $cdata);
- }
-
- function tag_close($parser, $tag)
- {
- var_dump($parser, $tag);
- }
-
- function error($msg) {
- die("$msg in line ".xml_get_current_line_number($this->parser));
- }
-} // end of class xml
-?> \ No newline at end of file
diff --git a/scripts/php-config.in b/scripts/php-config.in
deleted file mode 100644
index abdab2ce0e..0000000000
--- a/scripts/php-config.in
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /bin/sh
-
-prefix="@prefix@"
-version="@PHP_VERSION@"
-includedir="@includedir@/php"
-includes="-I$includedir -I$includedir/main -I$includedir/Zend"
-ldflags="@PHP_LDFLAGS@"
-libs="@EXTRA_LIBS@"
-if test '@TSRM_DIR@' != ''; then
- includes="$includes -I$includedir/TSRM"
-fi
-extension_dir='@EXTENSION_DIR@'
-
-case "$1" in
---prefix)
- echo $prefix;;
---includes)
- echo $includes;;
---ldflags)
- echo $ldflags;;
---libs)
- echo $libs;;
---extension-dir)
- echo $extension_dir;;
---version)
- echo $version;;
-*)
- echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--version]"
- exit 1;;
-esac
-
-exit 0
diff --git a/scripts/phpextdist b/scripts/phpextdist
deleted file mode 100755
index 97df70020d..0000000000
--- a/scripts/phpextdist
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-if test $# -lt 2; then
- echo "usage: phpextdist <extension> <version>";
- exit 1
-fi
-
-phpize=`php-config --prefix`/bin/phpize
-distname="$1-$2"
-
-if test ! -f Makefile.in || test ! -f config.m4; then
- echo "Did not find required files in current directory"
- exit 1
-fi
-
-rm -rf modules *.lo *.o *.la config.status config.cache \
-config.log libtool php_config.h config_vars.mk Makefile
-
-myname=`basename \`pwd\``
-cd ..
-cp -rp $myname $distname
-cd $distname
-$phpize
-cd ..
-tar cf $distname.tar $distname
-rm -rf $distname $distname.tar.*
-gzip --best $distname.tar
-mv $distname.tar.gz $myname
diff --git a/scripts/phpize.in b/scripts/phpize.in
deleted file mode 100644
index 66ba42068a..0000000000
--- a/scripts/phpize.in
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-
-prefix='@prefix@'
-phpdir="$prefix/lib/php/build"
-includedir="$prefix/include/php"
-builddir="`pwd`"
-
-FILES_BUILD="mkdep.awk shtool"
-FILES="acinclude.m4 Makefile.global scan_makefile_in.awk"
-CLEAN_FILES="$FILES *.lo *.la *.o .deps .libs/ build/ include/ modules/ install-sh \
- mkinstalldirs missing config.nice config.sub config.guess configure configure.in \
- aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache \
- config.log config.status Makefile Makefile.fragments Makefile.objects"
-
-if test ! -r config.m4; then
- echo "Cannot find config.m4. "
- echo "Make sure that you run $0 in the top level source directory of the module"
- exit 1
-fi
-
-# Cleanup
-if test "$1" = "--clean"; then
- echo "Cleaning.."
- for i in $CLEAN_FILES; do
- test -e && rm -rf $i
- done
- exit 0
-fi
-
-test -d build || mkdir build
-
-(cd $phpdir && cp $FILES_BUILD "$builddir"/build)
-(cd $phpdir && cp $FILES "$builddir")
-
-sed \
--e "s#@prefix@#$prefix#" \
-< $phpdir/phpize.m4 > configure.in
-
-touch install-sh mkinstalldirs missing
-
-aclocal
-autoconf
-autoheader
-libtoolize -f -c
-
-# dumping API NOs:
-PHP_API_VERSION=`grep -E '#define PHP_API_VERSION' $includedir/main/php.h|sed 's/#define PHP_API_VERSION//'`
-ZEND_MODULE_API_NO=`grep -E '#define ZEND_MODULE_API_NO' $includedir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO//'`
-ZEND_EXTENSION_API_NO=`grep -E '#define ZEND_EXTENSION_API_NO' $includedir/Zend/zend_extensions.h|sed 's/#define ZEND_EXTENSION_API_NO//'`
-
-echo "Configuring for:"
-echo " PHP Api Version: "$PHP_API_VERSION
-echo " Zend Module Api No: "$ZEND_MODULE_API_NO
-echo " Zend Extension Api No: "$ZEND_EXTENSION_API_NO
-
-exit 0
diff --git a/scripts/phpize.m4 b/scripts/phpize.m4
deleted file mode 100644
index 9f1371716e..0000000000
--- a/scripts/phpize.m4
+++ /dev/null
@@ -1,123 +0,0 @@
-dnl This file becomes configure.in for self-contained extensions.
-
-AC_INIT(config.m4)
-
-PHP_INIT_BUILD_SYSTEM
-
-AC_DEFUN(PHP_WITH_PHP_CONFIG,[
- AC_ARG_WITH(php-config,
-[ --with-php-config=PATH],[
- PHP_CONFIG=$withval
-],[
- PHP_CONFIG=php-config
-])
-
- prefix=`$PHP_CONFIG --prefix 2>/dev/null`
- INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
- EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
-
- if test -z "$prefix"; then
- AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH)
- fi
- AC_MSG_CHECKING(for PHP prefix)
- AC_MSG_RESULT($prefix)
- AC_MSG_CHECKING(for PHP includes)
- AC_MSG_RESULT($INCLUDES)
- AC_MSG_CHECKING(for PHP extension directory)
- AC_MSG_RESULT($EXTENSION_DIR)
-])
-dnl
-AC_DEFUN(PHP_EXT_BUILDDIR,[.])dnl
-AC_DEFUN(PHP_EXT_DIR,[""])dnl
-AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir])dnl
-AC_DEFUN(PHP_ALWAYS_SHARED,[
- ext_output="yes, shared"
- ext_shared=yes
- test "[$]$1" = "no" && $1=yes
-])dnl
-dnl
-abs_srcdir=`(cd $srcdir && pwd)`
-abs_builddir=`pwd`
-
-PHP_CONFIG_NICE(config.nice)
-
-AC_PROG_CC
-AC_PROG_CC_C_O
-
-PHP_RUNPATH_SWITCH
-PHP_SHLIB_SUFFIX_NAME
-PHP_WITH_PHP_CONFIG
-
-PHP_BUILD_SHARED
-
-AC_PREFIX_DEFAULT()
-
-AC_ARG_WITH(openssl,
-[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ],
-[
- if test "$withval" != "no"; then
- PHP_WITH_SHARED
- PHP_OPENSSL=$withval
- ext_openssl_shared=yes
- ext_shared=yes
- PHP_SETUP_OPENSSL
- fi
-])
-
-sinclude(config.m4)
-
-enable_static=no
-enable_shared=yes
-
-AC_PROG_LIBTOOL
-AC_PROG_AWK
-
-all_targets='$(PHP_MODULES)'
-install_targets=install-modules
-phplibdir="`pwd`/modules"
-CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
-CFLAGS_CLEAN=$CFLAGS
-
-test "$prefix" = "NONE" && prefix="/usr/local"
-test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
-
-PHP_SUBST(PHP_MODULES)
-PHP_SUBST(all_targets)
-PHP_SUBST(install_targets)
-
-PHP_SUBST(prefix)
-PHP_SUBST(exec_prefix)
-PHP_SUBST(libdir)
-PHP_SUBST(prefix)
-PHP_SUBST(phplibdir)
-
-PHP_SUBST(PHP_COMPILE)
-PHP_SUBST(CC)
-PHP_SUBST(CFLAGS)
-PHP_SUBST(CFLAGS_CLEAN)
-PHP_SUBST(CPP)
-PHP_SUBST(CPPFLAGS)
-PHP_SUBST(CXX)
-PHP_SUBST(DEFS)
-PHP_SUBST(EXTENSION_DIR)
-PHP_SUBST(EXTRA_LDFLAGS)
-PHP_SUBST(EXTRA_LIBS)
-PHP_SUBST(INCLUDES)
-PHP_SUBST(LEX)
-PHP_SUBST(LEX_OUTPUT_ROOT)
-PHP_SUBST(LFLAGS)
-PHP_SUBST(LDFLAGS)
-PHP_SUBST(SHARED_LIBTOOL)
-PHP_SUBST(LIBTOOL)
-PHP_SUBST(SHELL)
-PHP_SUBST(AWK)
-
-PHP_GEN_BUILD_DIRS
-PHP_GEN_GLOBAL_MAKEFILE
-
-test -d modules || mkdir modules
-touch .deps
-
-AC_CONFIG_HEADER(config.h)
-
-AC_OUTPUT()