eschmid Mon Jan 7 02:56:27 2002 EDT Modified files: /phpdoc funcparse.awk funcsummary.awk genfunclist genfuncsummary Log: Readded because genfuncsummary in ./scripts doesn't work. Index: phpdoc/funcparse.awk diff -u /dev/null phpdoc/funcparse.awk:1.14 --- /dev/null Mon Jan 7 02:56:27 2002 +++ phpdoc/funcparse.awk Mon Jan 7 02:56:27 2002 @@ -0,0 +1,23 @@ +BEGIN { parse=0; FS="[\"(,]"; } +/^.*function_entry.*$/ { parse=1; } +/^.*function_entry.*_class_functions.*$/ { parse=0; } +/^.*function_entry.*OrbitStruct.*$/ { parse=0; } +/^.*function_entry.*OrbitObject.*$/ { parse=0; } +/^.*shutdown_function_entry.*$/ { parse=0; } +/^.*\(function_entry.*$/ { parse=0; } +/^.*function_entry \*ptr.*$/ { parse=0; } +/^.*\(zend_function_entry.*$/ { parse=0; } +/^.*zend_function_entry \*ptr.*$/ { parse=0; } +/NULL.*?NULL.*?NULL/ { parse=0; } +/^[[:space:]]{0}/ { parse=0; } +/^[[:space:]]*{/ { if(parse) { print $2; } } +/^[[:space:]]*PHP_FE/ { if(parse) { print $2; } } +/^[[:space:]]*PHP_FALIAS/ { if(parse) { print $2; } } +/^[[:space:]]*PHP_NAMED_FE/ { if(parse) { print $2; } } +/^[[:space:]]*PHP_STATIC_FE/ { if(parse) { print $3; } } +/^[[:space:]]*ZEND_FE/ { if(parse) { print $2; } } +/^[[:space:]]*ZEND_FALIAS/ { if(parse) { print $2; } } +/^[[:space:]]*ZEND_NAMED_FE/ { if(parse) { print $2; } } +/^[[:space:]]*cybercash_functions/ { if (parse) { print $2; } } +/^[[:space:]]*UODBC_FE/ { if(parse) { print "odbc_"$2; } } +/^<IN_PHP>/ { if(match($2,"^[A-Za-z0-9_]+$")) print $2; } Index: phpdoc/funcsummary.awk diff -u /dev/null phpdoc/funcsummary.awk:1.3 --- /dev/null Mon Jan 7 02:56:27 2002 +++ phpdoc/funcsummary.awk Mon Jan 7 02:56:27 2002 @@ -0,0 +1,29 @@ +/^[[:space:]]*\/\*[[:space:]]*\{\{\{[[:space:]]*proto/ { + split($0,proto,"proto[[:space:]]+|\*/[[:space:]]*$"); + parse=1; + same=1; + lc=0; +} +/\*\// { + if(parse) { + lines=""; + for(i=0;i<lc;i++) { + lines = sprintf("%s %s ",lines,line[i]); + } + if(!same) { + split($0,temp,"\*/[[:space:]]*$"); + lines = sprintf("%s %s ",lines,temp[1]); + } + printf("%s --- %s\n",proto[2],lines); + parse=0; + } + next; +} +{ + if(parse && !same) { + split($0,temp,"\*/[[:space:]]*$"); + line[lc++]=temp[1]; + + } + same=0; +} Index: phpdoc/genfunclist diff -u /dev/null phpdoc/genfunclist:1.8 --- /dev/null Mon Jan 7 02:56:27 2002 +++ phpdoc/genfunclist Mon Jan 7 02:56:27 2002 @@ -0,0 +1,41 @@ +#!/bin/sh +# +# +----------------------------------------------------------------------+ +# | PHP HTML Embedded Scripting Language | +# +----------------------------------------------------------------------+ +# | Copyright (c) 1997 - 2001 PHP Development Team (See Credits file) | +# +----------------------------------------------------------------------+ +# | This program is free software; you can redistribute it and/or modify | +# | it under the terms of one of the following licenses: | +# | | +# | A) the GNU General Public License as published by the Free Software | +# | Foundation; either version 2 of the License, or (at your option) | +# | any later version. | +# | | +# | B) the PHP License as published by the PHP Development Team and | +# | included in the distribution in the file: LICENSE | +# | | +# | This program is distributed in the hope that it will be useful, | +# | but WITHOUT ANY WARRANTY; without even the implied warranty of | +# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | +# | GNU General Public License for more details. | +# | | +# | You should have received a copy of both licenses referred to here. | +# | If you did not, or have any questions about PHP licensing, please | +# | contact [EMAIL PROTECTED] | +# +----------------------------------------------------------------------+ +# | Authors: Ariel Shkedi <[EMAIL PROTECTED]> or <[EMAIL PROTECTED]> | +# | Rasmus Lerdorf <[EMAIL PROTECTED]> | +# +----------------------------------------------------------------------+ +# +# $Id: genfunclist,v 1.8 2002/01/07 07:56:27 eschmid Exp $ + +for i in `find $1 -name "*.[c]" -print -o -name "*.ec" -print | xargs egrep -li +function_entry` ; do +echo $i | sed -e 's/\.\.\//# /' +awk -f funcparse.awk < $i | sort +done +if test -f $1/language-scanner.lex # only in PHP3 sources +then +echo $1/language-scanner.lex | sed -e 's/\.\.\//# /' +awk -f funcparse.awk < $1/language-scanner.lex | sort +fi Index: phpdoc/genfuncsummary diff -u /dev/null phpdoc/genfuncsummary:1.9 --- /dev/null Mon Jan 7 02:56:27 2002 +++ phpdoc/genfuncsummary Mon Jan 7 02:56:27 2002 @@ -0,0 +1,12 @@ +#!/bin/sh +# $Id: genfuncsummary,v 1.9 2002/01/07 07:56:27 eschmid Exp $ + +for i in `find $1 -name "*.[ch]" -print -o -name "*.ec" -print | xargs egrep -li "{{{ +proto"` ; do +echo $i | sed -e 's/\.\.\//# /' +awk -f funcsummary.awk < $i | sort +1 | awk -F "---" '{ print $1; print $2; }' | sed +'s/^[[:space:]]+//' +done +if test -f $1/language-scanner.lex # only in PHP3 +then +awk -f funcsummary.awk < $1/language-scanner.lex | sort +1 | awk -F "---" '{ print +$1; print $2; }' +fi + \ No newline at end of file