diff --git a/htdocs/demo/report/index.php b/htdocs/demo/report/index.php
index fb7cf29c0..88cf4f1ea 100644
--- a/htdocs/demo/report/index.php
+++ b/htdocs/demo/report/index.php
@@ -1,7 +1,7 @@
$code
)
);
-
+
$opts = array('http' =>
array(
'method' => 'POST',
@@ -21,37 +21,37 @@
'content' => $postdata
)
);
-
+
$context = stream_context_create($opts);
-
+
return @file_get_contents('http://cppcheck.sourceforge.net/cgi-bin/democlient.cgi', false, $context);
}
-
+
function cut_string($string, $length = 1024) {
if (strlen($string) > $length) {
return substr($string, 0, $length);
}
return $string;
}
-
+
//--------------------------------------------------------------------------------
// XML output...
//--------------------------------------------------------------------------------
if ($isXmlOutput) { //if XML output...
header('Content-Type: text/xml');
-
+
if (!$isCodePosted) { //if NO code posted...
echo "\n\n";
exit;
}
-
+
$output = get_democlient_output(cut_string($_POST['code']));
-
+
if ($output === false) { //if NO demo client output...
echo "\n\n";
exit;
}
-
+
echo $output;
exit;
}
@@ -121,28 +121,28 @@
return array();
}
}
-
+
if ($isCodePosted) { //if code posted...
include_once '../../site/geshi/geshi.php';
-
+
$code = cut_string($_POST['code']);
-
+
$geshi = new GeSHi($code, 'cpp');
$geshi->enable_classes();
$geshi->set_header_type(GESHI_HEADER_PRE_TABLE);
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
$geshi->set_overall_class('geshicode');
-
+
echo "
Input
\n";
echo $geshi->parse_code();
-
+
echo "Output
\n";
-
+
$output = get_democlient_output($code);
-
+
if (!$output === false) {
$results = parse_democlient_output($output);
-
+
if (!empty($results)) {
echo "\n";
echo "\n";
diff --git a/htdocs/index.php b/htdocs/index.php
index 8b6ba0704..193387a2d 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -115,7 +115,7 @@ add Cppcheck as an external tool.
You are welcome to contribute. Help is needed.
- Testing
- - Pick a project and test it's source with latest version. Write tickets to
+
- Pick a project and test it's source with latest version. Write tickets to
Trac about issues you
find from Cppcheck. If you test open source projects and write bug reports to
them, check the issues in the “Found bugs”