cvs: phpdoc /scripts mk_ini_set_table.sh

From: Date: Thu, 21 Nov 2002 02:22:49 +0000
Subject: cvs: phpdoc /scripts mk_ini_set_table.sh
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969349846@lists.php.net to get a copy of this message
jmcastagnetto Wed Nov 20 21:22:49 2002 EDT Modified files: /phpdoc/scripts mk_ini_set_table.sh Log: Fix for bug #19635 Index: phpdoc/scripts/mk_ini_set_table.sh diff -u phpdoc/scripts/mk_ini_set_table.sh:1.2 phpdoc/scripts/mk_ini_set_table.sh:1.3 --- phpdoc/scripts/mk_ini_set_table.sh:1.2 Sat Apr 27 02:23:59 2002 +++ phpdoc/scripts/mk_ini_set_table.sh Wed Nov 20 21:22:48 2002 @@ -2,54 +2,22 @@ # Quick hack to make a table of PHP options # and where they can be changed -# Jesus M. Castagnetto -# Mon Mar 19 04:57:02 PST 2001 +# Uses GNU grep and GNU awk +# Author: Jesus M. Castagnetto +# Created: Mon Mar 19 04:57:02 PST 2001 # Updated: Thu Apr 25 11:42:26 PDT 2002 # - look through all PHP_INI_ containing files # - save table in the new split dir for the function +# Updated: Wed Nov 20 18:16:12 PST 2002 +# - rearrange the order of the tables, put the PHP_INI_* definitions first. cfiles=grep -rl PHP_INI_ ../php4/* ini_set_table="en/reference/info/functions/ini_set_table"; awk 'BEGIN { - print "<table>\n <title>Configuration options</title>" - print " <tgroup cols=\"3\">"; - print " <thead>"; - print " <row>"; - print " <entry>Name</entry>"; - print " <entry>Default</entry>"; - print " <entry>Changeable</entry>"; - print " </row>"; - print " </thead>"; - print " <tbody>"; -} -$0 ~ /PHP_INI_.*\(/ && $0 !~ /^static/ && $0 !~ /PHP_INI_(BEGIN|END)/ { -nf = split($0,tmp,","); - -varname = substr(tmp[1], index(tmp[1], "\"")); -gsub("\"", "", varname); - -vardef = tmp[2]; -gsub("(\t| )+", "", vardef); -#if (index(vardef, "\"")) -# gsub("\"", "", vardef); - -varmod = tmp[3]; -gsub("(\t| )+", "", varmod); - -print " <row>"; -print " <entry>" varname "</entry>" -print " <entry>" vardef "</entry>" -print " <entry>" varmod "</entry>" -print " </row>"; -}; -END { - print " </tbody>"; - print " </tgroup>"; - print "</table>"; print "<note>"; print " <para>"; - print " The PHP_INI_* constants are defined as follows:"; + print " The PHP_INI_* constants used in the table below are defined as follows:"; print " <table>"; print " <thead>"; print " <row>"; @@ -84,6 +52,41 @@ print " </table>"; print " </para>"; print "</note>"; -}' $cfiles > $ini_set_table + print "<table>\n <title>Configuration options</title>" + print " <tgroup cols=\"3\">"; + print " <thead>"; + print " <row>"; + print " <entry>Name</entry>"; + print " <entry>Default</entry>"; + print " <entry>Changeable</entry>"; + print " </row>"; + print " </thead>"; + print " <tbody>"; +} +$0 ~ /PHP_INI_.*\(/ && $0 !~ /^static/ && $0 !~ /PHP_INI_(BEGIN|END)/ { +nf = split($0,tmp,","); + +varname = substr(tmp[1], index(tmp[1], "\"")); +gsub("\"", "", varname); + +vardef = tmp[2]; +gsub("(\t| )+", "", vardef); +#if (index(vardef, "\"")) +# gsub("\"", "", vardef); + +varmod = tmp[3]; +gsub("(\t| )+", "", varmod); + +print " <row>"; +print " <entry>" varname "</entry>" +print " <entry>" vardef "</entry>" +print " <entry>" varmod "</entry>" +print " </row>"; +}; +END { + print " </tbody>"; + print " </tgroup>"; + print "</table>"; + }' $cfiles > $ini_set_table ls -l $ini_set_table

« previous php.doc (#969349846) next »