cvs: php4 /pear/scripts pearize.in

From: Date: Sun, 25 Aug 2002 18:21:10 +0000
Subject: cvs: php4 /pear/scripts pearize.in
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5960@lists.php.net to get a copy of this message
pajoye Sun Aug 25 14:21:10 2002 EDT Modified files: /php4/pear/scripts pearize.in Log: Remove $_ENV usages Remove $env arg in all functions and uses getenv instead Note only 'USER' env var is used Index: php4/pear/scripts/pearize.in diff -u php4/pear/scripts/pearize.in:1.6 php4/pear/scripts/pearize.in:1.7 --- php4/pear/scripts/pearize.in:1.6 Tue Apr 16 18:14:27 2002 +++ php4/pear/scripts/pearize.in Sun Aug 25 14:21:10 2002 @@ -1,22 +1,22 @@ #!@prefix@/bin/php -Cq <?php // -*- PHP -*- -main($argc, $argv, $_ENV); +main($argc, $argv); // {{{ main() -function main(&$argc, &$argv, &$env) +function main(&$argc, &$argv) { global $debug; $debug = false; - $file = check_options($argc, $argv, $env); + $file = check_options($argc, $argv); parse_package_file($file); - make_makefile_in($env); + make_makefile_in(); } // }}} // {{{ check_options() -function check_options($argc, $argv, $env) +function check_options($argc, $argv) { global $debug; array_shift($argv); @@ -47,7 +47,7 @@ // }}} // {{{ make_makefile_in() -function make_makefile_in(&$env) +function make_makefile_in() { global $libdata, $debug; if (sizeof($libdata) > 1) { @@ -66,7 +66,7 @@ die("Could not create Makefile.in in current directory.\n"); } - $who = $env["USER"]; + $who = getenv("USER"); $when = gmdate('Y-m-d h:i'); fwrite($wp, "# This file was generated by `pearize' by $who at $when GMT\n\n"); @@ -95,7 +95,7 @@ { global $in_file, $curlib, $curelem, $libdata, $cdata; global $currinstalldir, $baseinstalldir; - + $in_file = false; $curlib = ''; $curelem = ''; @@ -103,12 +103,12 @@ $cdata = array(); $baseinstalldir = array(); $currinstalldir = array(); - + $xp = xml_parser_create(); xml_set_element_handler($xp, "start_handler", "end_handler"); xml_set_character_data_handler($xp, "cdata_handler"); xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false); - + $fp = @fopen($file, "r"); if (!is_resource($fp)) { die("Could not open file `$file'.\n");

« previous php.pear.cvs (#5960) next »