From 68de62de576d60f31266e247c7b9f308a0e68dd6 Mon Sep 17 00:00:00 2001 From: Xuefer Date: Tue, 20 Aug 2013 02:55:04 +0000 Subject: [PATCH] decompiler: more sample templating trick git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1344 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- devel/run | 4 +++- mod_disassembler/sample.cpp.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/devel/run b/devel/run index 1e3fbd7..5765442 100755 --- a/devel/run +++ b/devel/run @@ -244,7 +244,9 @@ run() { shift case "$1" in *.cpp.php) - cpp -C -P -traditional-cpp -DPHP_VERSION=$phpVersion $1 \ + < "$1" \ + sed -r -e 's#__#____#g' \ + | cpp -C -P -traditional-cpp -DPHP_VERSION=$phpVersion \ | sed -r -e 's#^ +##g' -e 's#\t +#\t#g' -e 's#____#__#g' > sample.php || exit $? shift ./php-cli -c devel.ini ./bin/phpdc.phpr sample.php "$@" | tee decompiled.php diff --git a/mod_disassembler/sample.cpp.php b/mod_disassembler/sample.cpp.php index 749f264..f635d67 100644 --- a/mod_disassembler/sample.cpp.php +++ b/mod_disassembler/sample.cpp.php @@ -531,8 +531,8 @@ require 'require.php'; require_once 'require_once.php'; include 'include.php'; include_once 'include_once.php'; -echo ____FILE____; -echo ____LINE____; +echo __FILE__; +echo __LINE__; #if PHP_VERSION >= 530 echo 'PHP 5.3+ code testing'; const CONST_VALUE = 1;