summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_system_parsing.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-27 16:58:43 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-27 16:58:43 -0500
commitdb10a1eb1fb1da87d1403b7c9b6658b880ca5d1b (patch)
tree3e5dafb5cdfe24a775ddd9a12e04f7ef5de20a7b /pts-core/functions/pts-functions_system_parsing.php
parent502ac8e9fb41cfc4fb24222e3ec0d1c2f3833ed8 (diff)
downloadphoronix-test-suite-upstream-db10a1eb1fb1da87d1403b7c9b6658b880ca5d1b.tar.gz
phoronix-test-suite-upstream-db10a1eb1fb1da87d1403b7c9b6658b880ca5d1b.tar.xz
phoronix-test-suite-upstream-db10a1eb1fb1da87d1403b7c9b6658b880ca5d1b.zip
pts-core: Eliminate use of most preg_ functions
Diffstat (limited to 'pts-core/functions/pts-functions_system_parsing.php')
-rw-r--r--pts-core/functions/pts-functions_system_parsing.php15
1 files changed, 2 insertions, 13 deletions
diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
index ebbcbe7..bd10b64 100644
--- a/pts-core/functions/pts-functions_system_parsing.php
+++ b/pts-core/functions/pts-functions_system_parsing.php
@@ -537,15 +537,8 @@ function read_ati_overdrive($attribute, $adapter = 0)
if($od_option == $attribute)
{
- $od_value = trim($line_r[1]);
-
- if(function_exists("preg_replace"))
- {
- $od_value = preg_replace("/\s+/", " ", $od_value);
- }
-
+ $od_value = pts_trim_spaces($line_r[1]);
$od_value = str_replace(array("%"), "", $od_value);
-
$od_value_r = explode(" ", $od_value);
if(count($od_value_r) == 1)
@@ -596,11 +589,7 @@ function read_system_memory_usage($TYPE = "TOTAL", $READ = "USED")
if(!empty($grab_line))
{
- if(function_exists("preg_replace"))
- {
- $grab_line = trim(preg_replace("/\s+/", " ", $grab_line));
- }
-
+ $grab_line = pts_trim_spaces($grab_line);
$mem_parts = explode(" ", $grab_line);
if($READ == "USED")