For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > January 2006 > cvs: phpdoc /scripts zendapi_protos.php









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phpdoc /scripts zendapi_protos.php
Hartmut Holzgraefe

2006-01-22, 7:04 pm

hholzgra Mon Jan 23 00:33:28 2006 UTC

Modified files:
/phpdoc/scripts zendapi_protos.php
Log:
also detect uppercase wrappers


http://cvs.php.net/viewcvs.cgi/phpd...0&diff_format=u
Index: phpdoc/scripts/zendapi_protos.php
diff -u phpdoc/scripts/zendapi_protos.php:1.39 phpdoc/scripts/zendapi_protos.php:1.40
--- phpdoc/scripts/zendapi_protos.php:1.39 Sun Jan 22 23:35:24 2006
+++ phpdoc/scripts/zendapi_protos.php Mon Jan 23 00:33:28 2006
@@ -29,9 +29,9 @@
"../TSRM/tsrm_virtual_cwd.h",
);

-$functions_dir = array("ZEND"=>"../en/internals/zendapi/functions",
- "TSRM"=>"../en/internals/tsrm/functions",
- "CWD" =>"../en/internals/tsrm/functions",);
+$api_dir = array("ZEND"=>"../en/internals/zendapi",
+ "TSRM"=>"../en/internals/tsrm",
+ "CWD" =>"../en/internals/tsrm",);


$functions = array();
@@ -116,7 +116,7 @@

// next we look for macros that seem to be just wrappers around existing functions
// TODO catch multiline definitions
- if (preg_match('|^#define\s+([a-z0-9_]+)\((.*)\)\s+(\w+)\(|U', $line, $matches)) {
+ if (preg_match('|^#define\s+(\w+)\((.*)\)\s+(\w+)\(|U', $line, $matches)) {
$wrapper = $matches[1];
$param_list = $matches[2];
$function = $matches[3];
@@ -166,10 +166,11 @@

function create_page($function, $return_type, $params, $api_type, $infile)
{
- global $overwrite, $functions_dir;
+ global $overwrite, $api_dir;

// now generate the doc filename for this function
- $filename = $functions_dir[$api_type]."/".$function.".xml";
+ $functype = (strtolower($function) == $function) ? "function" : "macro";
+ $filename = $api_dir[$api_type]."/".$functype."s/".$function.".xml";

// only proceed it fhe file doesn't exist yet (no overwrites)
// and do not expose functions staring with '_'
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com