goba Sun Apr 3 14:47:43 2005 EDT
Modified files:
/phpdoc/scripts file-entities.php.in
Log:
fix some spelling and reuse cygwin check result
http://cvs.php.net/diff.php/phpdoc/scripts/file-entities.php.in?r1=1.34&r2=1.35&ty=u
Index: phpdoc/scripts/file-entities.php.in
diff -u phpdoc/scripts/file-entities.php.in:1.34
phpdoc/scripts/file-entities.php.in:1.35
--- phpdoc/scripts/file-entities.php.in:1.34 Wed Mar 2 13:50:06 2005
+++ phpdoc/scripts/file-entities.php.in Sun Apr 3 14:47:41 2005
@@ -17,7 +17,7 @@
| Gabor Hojtsy <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: file-entities.php.in,v 1.34 2005/03/02 18:50:06 nlopess Exp $
+ $Id: file-entities.php.in,v 1.35 2005/04/03 18:47:41 goba Exp $
*/
/**
@@ -50,10 +50,8 @@
// Zend API integration info (either a path or "not found")
$zendapi = ("@ZENDAPI@" == "not found" ? FALSE : "@ZENDAPI@");
-// when php compiled on cygwin, the working path have to be /cygdrive..
-// the below preg_replace have to be done only using binary php complied on
MSVC.
-// let's find if php was complied by cygwin:
-$cygwin_complied = eregi("CYGWIN",php_uname()) ? true : false;
+// If PHP is compiled on Cygwin, the working path have to start with /cygdrive.
+$cygwin_compiled = eregi("CYGWIN",php_uname()) ? true : false;
// The output directory, which we need to parse for windows specific
// things, and correct all problems is needed.
@@ -61,7 +59,7 @@
$out_dir = abs_path(strip_cygdrive("@WORKDIR@"));
// this path if used for saving the ent file:
-$script_out_dir = $cygwin_complied ? "@WORKDIR@" : $out_dir;
+$script_out_dir = $cygwin_compiled ? "@WORKDIR@" : $out_dir;
// The documentation source directory
$srcdir = abs_path("@SRCDIR@");
@@ -430,9 +428,11 @@
* @return string windows style path
*/
function strip_cygdrive($path){
+ global $cygwin_compiled;
- if (!eregi('windows', php_uname()))
+ if ($cygwin_compiled) {
return $path;
+ }
return preg_replace(array('!^/cygdrive/(\w)/!', '@^/home/.+$@'),
array('\1:/', strtr(dirname(dirname(__FILE__)), '\\', '/')), $path);
}