Index: /branches/1.0/coverager.c
===================================================================
--- /branches/1.0/coverager.c	(revision 239)
+++ /branches/1.0/coverager.c	(revision 240)
@@ -234,4 +234,5 @@
 			zend_hash_move_forward(XG(coverages));
 		}
+		efree(outfilename);
 	}
 
Index: /branches/1.0/coverager/config.php.example
===================================================================
--- /branches/1.0/coverager/config.php.example	(revision 239)
+++ /branches/1.0/coverager/config.php.example	(revision 240)
@@ -13,5 +13,11 @@
 function ob_filter_path_nicer($o)
 {
-	$o = str_replace("/home/", "{H}/", $o);
+	$sep = DIRECTORY_SEPARATOR;
+	$o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}$sep", $o);
+	$xcachedir = realpath(dirname(__FILE__) . "$sep..$sep");
+	$o = str_replace($xcachedir . $sep, "{XCache}$sep", $o);
+	if ($sep == '/') {
+		$o = str_replace("/home/", "{H}/", $o);
+	}
 	return $o;
 }
Index: /branches/1.0/coverager/coverager.php
===================================================================
--- /branches/1.0/coverager/coverager.php	(revision 239)
+++ /branches/1.0/coverager/coverager.php	(revision 240)
@@ -58,5 +58,7 @@
 		$this->path = isset($_GET['path']) ? $_GET['path'] : '';
 		$this->path = preg_replace('!\.{2,}!', '.', $this->path);
-		$this->path = preg_replace('![\\\\/]{2,}!', '/', $this->path);
+		$qsep = preg_quote(DIRECTORY_SEPARATOR, '!');
+		$this->path = preg_replace("![\\\\$qsep]{2,}!", DIRECTORY_SEPARATOR, $this->path);
+		$this->path = preg_replace("!$qsep$!", '', $this->path);
 		if ($this->path == '/') {
 			$this->path = '';
@@ -114,5 +116,5 @@
 			list($tplfile, $tpllines, $tplcov) = $this->loadTplCov($fileinfo['cov'], substr($this->outpath, $this->datadir_len));
 			if ($tplfile) {
-				$tplcov = sprint_cov($tplinfo['tplcov'], $tpllines);
+				$tplcov = sprint_cov($tplcov, $tpllines);
 				unset($tpllines);
 			}
Index: /branches/1.0/coverager/coverager.tpl.php
===================================================================
--- /branches/1.0/coverager/coverager.tpl.php	(revision 239)
+++ /branches/1.0/coverager/coverager.tpl.php	(revision 240)
@@ -2,5 +2,4 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-	<meta http-equiv="Content-Language" content="en-us" />
 <?php
 echo <<<HEAD
@@ -61,4 +60,5 @@
 	global $cycle;
 	if ($info['files'] || $info['todos']) {
+		$srcdir .= DIRECTORY_SEPARATOR;
 		$c = $cycle->next();
 		$srcdir_html = htmlspecialchars($srcdir);
